usb-attached storage and a handy hint

A few weeks ago the disk in my laptop died on me. Started making this harsh clicking sound, everything totally locked up. Now I did have backups for a lot of my stuff, but not all of it.... and my procedure is to backup at the end of the day. This happened right after lunch. Doh! I dashed across the road from the office to get a replacement disk from the local bits-n-pieces shop, along with an external usb-attached enclosure, and that night did my damnedest to get any data whatsoever off that disk. No luck at all. A veritable piece of rotating rust it surely was. So I installed build 20 (current at the time), and bfu'd to whatever the nightly was, and tried to get my config and data back to some semblance of useful state. I also tried to mount the usb-attached disk (the dodgy one now in the external casing), but no dice. It wasn't until I read a post from FritS that I remembered a setting to use with scsa2usb(7D), which is what usb storage attaches with. In /kernel/drv/scsa2usb.conf is a lot of documentation about how to workaround the various, um, "implementation details" that we come across with consumer-grade hardware like usb enclosures. The bit that made it all work for me was this:
#       reduced-cmd-support     - "true" if the device cannot handle
#               mode sense, start/stop, and doorlock.
#               This is the only legal value for this parameter.
#
So I need to have the following line in my .conf file: attribute-override-list="vid=0x402 pid=0x5642 reduced-cmd-support=true"; Then a quick disconnect, modunload, update_drv
# echo yes | cfgadm -c disconnect usb2/3 # modunload -i `modinfo |awk '/scsa2usb/ {print $1}'` # update_drv -v scsa2usb
followed by a re-connect of the device, and joy oh joy I've got 60gb of usb-attached storage available for me. If there's a point to be made, it's this --- always read the manpage for your device driver, and check out its driver.conf file as well --- you might just learn something :-)
Comments:

Post a Comment:
Comments are closed for this entry.
About

I work at Oracle in the Solaris group. The opinions expressed here are entirely my own, and neither Oracle nor any other party necessarily agrees with them.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today