Thursday Jun 29, 2006

Mounting USB Thumb Drive on Solaris NV: HowTo

I used vold to mount flash device on solaris Nevada.
I had lexar jumpDrive.
This method I learnt by trial and error, so I do not claim its flawless.
You may use it at your risk.

In order to make vold detect the USB flash device it's necessary
to obtain the correct controller id and target and fill in c*s2
for the line 'use rmdisk' in vold.conf file i.e.
use rmdisk drive /dev/rdsk/c3t0*s2 dev_rmdisk.so rmdisk%d
in /etc/vold.conf file

if vold is not using this file re start the daemon with -f /etc/vold.conf command and check if its running,
bash-3.00# ps -ef | grep vold
root 479 1 0 11:19:35 ? 0:03 /usr/sbin/vold -f /etc/vold.conf

Insert flash device check if it found by vold.
bash-3.00# volcheck -v
media was found

check the device linkage,
bash-3.00# eject -n
[...]
/dev/sr0 -> cdrom0
/dev/rsr0 -> cdrom0
rmdisk0 -> /vol/dev/rdsk/c3t0d0/noname
cdrom0 -> /vol/dev/rdsk/c1t0d0/nomedia

Verify Storage device size.
bash-3.00# iostat -En
[...]
Vendor: LEXAR Product: JUMPDRIVE SPORT Revision: 3000 Serial No:
Size: 0.52GB <519569408 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 5 Predictive Failure Analysis: 0

Find out volume management node, logical node
etc.
bash-3.00# rmformat -l
Looking for devices...
[...]
2. Volmgt Node: /vol/dev/aliases/rmdisk0
Logical Node: /dev/rdsk/c3t0d0p0
Physical Node: /pci@0,0/pci1025,7e@13,2/storage@7/disk@0,0
Connected Device: LEXAR JUMPDRIVE SPORT 3000
Device Type: Removable
Bus: USB
Size: 495.5 MB
Label:
Access permissions: Medium is not write protected.

Mount the device (name is found in earlier step) using volrmmount.
bash-3.00# volrmmount -i rmdisk0

Find out the location where the device is mounted.
bash-3.00# df -kl
Filesystem kbytes used avail capacity Mounted on
/vol/dev/dsk/c3t0d0/noname:c
507104 1208 505896 1% /rmdisk/noname

Copy files to the flash device mounted on location found above.
bash-3.00# cp ./some-file /rmdisk/noname

Unmount device.
bash-3.00# volrmmount -e rmdisk0

Remove media and check it is removed from kernel states as well.
bash-3.00# volcheck -v
no media was found

Comments:

Post a Comment:
Comments are closed for this entry.