생각하는 족족 고.따.구 냐..

Posted
Filed under About Knowledge/OS_Unix
Document Audience: SPECTRUM
Document ID: 72293
Title: How to Mount or Unmount a USB Mass Storage Device without VOLD running.
Update Date: Fri Jan 21 00:00:00 MST 2005
Products: Desktops & Workstations, Solaris
Technical Areas: USB (Universal Serial Bus) Port ===========================================================

Keyword(s):usb, mount, umount, vold, mass storage

Description: Top

 This document describes the procedure to mount and unmount filesystems on USB Mass Storage devices without the Volume Management daemon (vold) running.

Document Body: Top

Before doing this, be sure the lastest Recommended Patches for Solaris have been updated. See the mount(1M) man page for more details on the 'mount' and 'umount' commands.

 If the disk is unformatted and creating a filesystem is necessary, see Document ID 76911.

==================================
Mounting a USB Mass Storage device
==================================

1. Identify the symbolic link in the '/dev/dsk/' directory for the device you want to mount.

Optional : You may have stale '/dev/' links that could become cumbersome and misleading to work with. To clean this up, use the Cleanup mode of the devfsadm(1M) command :

# devfsadm -C

Symbolic links for USB devices are found in the '/dev/usb/' directory. The USB Mass Storage devices appear as 'mass-storageX', where "X" is an index number.

# ls -l /dev/usb/mass-storage*
lrwxrwxrwx 1 root root 53 Aug 10 16:06 /dev/usb/mass-storage0 -> ../../devices/pci@8,700000/usb@5,3/ storage@1:scsa2usb

 For these same devices, symbolic links are also created in the '/dev/dsk/' and /dev/rdsk/' directories.

# ls -l /dev/dsk/*s2 | grep usb
lrwxrwxrwx 1 root root 55 Aug 10 16:06 /dev/dsk/c3t0d0s2 -> ../../devices/pci@8,700000/usb@5,3/storage@1/disk@0,0:c

In the above example, notice the device path (/devices/pci@8,700000/usb@5,3/storage@1) matches for the symbolic links /dev/usb/mass-storage0 and /dev/dsk/c3t0d0s2.

2. Become SuperUser.

3. Mount the USB Mass Storage device filesystem.

Here is the basic command :

# mount -F /dev/dsk/

Where "X" is the appropriate values for your device (See step 1).

Here are some examples of mounting various devices.

  A. For a read-only CD-ROM filesystem (hsfs) :

    # mount -F hsfs -o -ro /dev/dsk/c1t0d0s2 /mnt

  B. For devices with pcfs (FAT) filesystems (Zip, Jaz, Flash or "key"-style) :

    # mount -F pcfs /dev/dsk/c3t0d0s2:c /mnt

4. Verify the filesystem is mounted.

  A. Use the mount(1M) command Example :

    # mount | grep /mnt
 
  B. Use the cd(1) and/or ls(1) commands

    Example :

    # cd /mnt
    # ls /mnt

  C. Use the df(1M) and/or du(1) commands

    Example :

    # df /mnt # du /mnt

====================================
Unmounting a USB Mass Storage Device
====================================

1. Become SuperUser.

2. Unmount the USB mass storage device.
 
Here is the basic command :

  # umount

  Example :

  # umount /mnt
2010/10/05 09:27 2010/10/05 09:27