Link to home
Start Free TrialLog in
Avatar of pdouglas
pdouglasFlag for United States of America

asked on

How Can I Mount a Thumb Drive on a Solaris Machine

Background: The system is a SunBlade 1000 using OS 5.8 with Solaris 8. The box has 4 USB ports, 2 of which are used and 2 are available for other devices. It also has a Removable Media Manager, though it does not "see" any devices attached to a USB port.

Question: I plug in a thumb drive (128 MB) to one of the 2 available USB ports, but the system does not seem to recognize it. Then I run devfsadm, which runs sucessfully. I can now see a symblic link in /dev/dsk displayed as follows:

     mass-storage0 -> ../../devices/pci@8,700000/usb@5,3/storage@3:devctl

I have no idea how to read this. If I cold just find the device, I think I could mount it, and then access is. Yes?

Any ideas on what to do next?

Thanks,

pdouglas
SOLUTION
Avatar of fim32
fim32

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I managed when I was looking at this Q: https://www.experts-exchange.com/questions/20873129/Mounting-USB-Flash-Memory-in-Solaris.html

I added my drive, then looked in /dev for something that had been created that hour, then mounted that following what I read in the 2 URL mentioned above
fim32,
great minds etc...
Avatar of pdouglas

ASKER

I tried the instructions at http://www.netsys.com/cgi-bin/display_article.cgi?1245 and it did not work. When I issue the command:

     mount -F pcfs /dev/rdsk/c4t0d0s2:c /flash

I get the msg:

     mount: mount-point /flash does not exist.

One thing I'm finding very confusing is why I have so many entries for the device. They are(essentially 8 entries for c3t0d0s0  and 8 for c4t0d0s0) as follows when I issue a ls -l:

lrwxrwxrwxr 1 root   root  c3t0d0s0  -> ../../devices/pci@8,700000/usb@5,3/storage@1/disk@0,0:a,raw
lrwxrwxrwxr 1 root   root  c3t0d0s1  -> ../../devices/pci@8,700000/usb@5,3/storage@1/disk@0,0:b,raw
lrwxrwxrwxr 1 root   root  c3t0d0s2  -> ../../devices/pci@8,700000/usb@5,3/storage@1/disk@0,0:c,raw
lrwxrwxrwxr 1 root   root  c3t0d0s3  -> ../../devices/pci@8,700000/usb@5,3/storage@1/disk@0,0:d,raw
lrwxrwxrwxr 1 root   root  c3t0d0s4  -> ../../devices/pci@8,700000/usb@5,3/storage@1/disk@0,0:e,raw
lrwxrwxrwxr 1 root   root  c3t0d0s5  -> ../../devices/pci@8,700000/usb@5,3/storage@1/disk@0,0:f,raw
lrwxrwxrwxr 1 root   root  c3t0d0s6  -> ../../devices/pci@8,700000/usb@5,3/storage@1/disk@0,0:g,raw
lrwxrwxrwxr 1 root   root  c3t0d0s7  -> ../../devices/pci@8,700000/usb@5,3/storage@1/disk@0,0:h,raw
lrwxrwxrwxr 1 root   root  c4t0d0s0  -> ../../devices/pci@8,700000/usb@5,3/storage@1/disk@0,0:a,raw
lrwxrwxrwxr 1 root   root  c4t0d0s1  -> ../../devices/pci@8,700000/usb@5,3/storage@1/disk@0,0:b,raw
lrwxrwxrwxr 1 root   root  c4t0d0s2  -> ../../devices/pci@8,700000/usb@5,3/storage@1/disk@0,0:c,raw
lrwxrwxrwxr 1 root   root  c4t0d0s3  -> ../../devices/pci@8,700000/usb@5,3/storage@1/disk@0,0:d,raw
lrwxrwxrwxr 1 root   root  c4t0d0s4  -> ../../devices/pci@8,700000/usb@5,3/storage@1/disk@0,0:e,raw
lrwxrwxrwxr 1 root   root  c4t0d0s5  -> ../../devices/pci@8,700000/usb@5,3/storage@1/disk@0,0:f,raw
lrwxrwxrwxr 1 root   root  c4t0d0s6  -> ../../devices/pci@8,700000/usb@5,3/storage@1/disk@0,0:g,raw
lrwxrwxrwxr 1 root   root  c4t0d0s7  -> ../../devices/pci@8,700000/usb@5,3/storage@1/disk@0,0:h,raw
You need to create a the mountpoint first.
i.e. mkdir /flash
Man, this just gets more bizarre by the minute. I created the directory, or so I thought. The mkdir command seemed to work, but no directory shows up. Which brings me to the question, *where* should I create this directory? The fact that *all* the objects I find in the /dev/dsk are simbolic links makes me think that my mkdir command did work, but somehow it placed the /flash directory somewhere else. Weird.
/flash should be under / (along with /var, /opt, /usr, /etc)
Ah, ok. That's where I'll make it. I managed to get it mounted, but there is another problem: I can transfer data to the flash drive from the Solaris machine, but when I put it on a PC (either Win2k or XP), the PC does not see the data.
I've only test XP --> solaris, and I won't get a chance to test Solaris --> XP today.  Try it both ways and let me know
Well, I was able to transfer data XP --> solaris --> XP. But unmounting the /flash is a real headache. In fact, this whole thing is much more headache than it's worth. I'm going to see about splitting teh points between you guys, liddler and fim32, since you both provided a lot of input.
>> But unmounting the /flash is a real headache
umount /flash
(making sures you've cd'ed out of the /flash directory frst)
Yes, I did this, but 2 processes associated with the /flash remain up and running. This results in teh umount command failing. The system reports that the drive is busy. I do a ps to find those PIDs, but kill will not kill them. Strange.
kill -9 <pid> should work
but before you do, which processes are they? vold? ksh?
vold - use eject, as vold is managing the drive for you
ksh - some one is in the /flash directory

lsof or fuser will return the pids that are accessing the directory
Is it necessary to mount/umount every time I plug and unplug a flash stick into the Solaris machine?
Avatar of durindil
durindil

Don't forget to navigate out of the /flash directory, or the umount will fail.  This is the most common reason for the umount error.  Also, in the future, if you can not create a /flash directory, just mount it to /mnt.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks, everyone! You've taught me a great deal.  :o)