System Administration Guide: Devices and File Systems

Using USB Mass Storage Devices

Starting in the Solaris 9 release, the following USB removable mass storage devices are supported:

For information about using USB mass storage devices with the Oracle Solaris ZFS file system, see What's New in USB Devices?

For a complete list of USB devices that are supported in the Oracle Solaris OS, see:

http://www.sun.com/io_technologies/USB.html

In previous Solaris releases, all USB storage devices were identified as removable media devices, which provides many of the following advantages, including automatic mounting. In the Solaris 10 6/06 release, USB mass storage devices are identified as hotpluggable devices but also enjoy the advantages of USB removable devices that are listed below. For more information about the hotpluggable behavior, see USB and 1394 (FireWire) Support Enhancements.

For more information on using USB mass storage devices, see scsa2usb(7D).

Using USB Diskette Devices

USB diskette devices appear as removable media devices. USB diskette devices are not managed by the fd (floppy) driver. Applications that issue ioctl(2) calls intended for the fd (native floppy) driver will fail. Applications that issue only read(2) and write(2) calls will succeed. Other applications, such as SunPCI and rmformat, also succeed.

The USB diskette device is identified as a SCSI removable media device. The device is available for access under the /rmdisk directory.

For more information on how to use USB diskette devices, see Chapter 1, Managing Removable Media (Overview).

Using Non-Compliant USB Mass Storage Devices

Some devices might be supported by the USB mass storage driver even though they do not identify themselves as compliant with the USB mass storage class or identify themselves incorrectly. The scsa2usb.conf file contains an attribute-override list that lists the vendor ID, product ID, and revision for matching mass storage devices, as well as fields for overriding the default device attributes. The entries in this list are commented out by default. These entries can be copied and uncommented to enable support of particular devices.

If you connect a USB mass storage device to a system running this Solaris release and the system is unable to use it, you can check the /kernel/drv/scsa2usb.conf file to see if there is a matching, commented entry for this device. Follow the information given in the scsa2usb.conf file to see if a particular device can be supported by using the override information.

For a listing of recommended USB mass storage devices, go to:

http://www.sun.com/io_technologies/USB.html

For more information, see scsa2usb(7D).

ProcedureHow to Use a Non-Complaint USB Mass Storage Device

  1. Become superuser.

  2. Add an entry to the /kernel/drv/scsa2usb.conf file.

    The following entry is appropriate for a USB memory stick.


    attribute-override-list = "vid=* reduced-cmd-support=true";
  3. Either reboot the system or do the following:

    1. Remove the device.

    2. Manually update the driver.


      # update_drv -f scsa2usb
      
    3. Add the device.

Hot-Plugging USB Mass Storage Devices

Hot-plugging a device means the device is added or removed without shutting down the operating system or powering off the system. All USB devices are hot-pluggable.

The removable media manager is now aware of hot-plugged devices. You can just plug in the device, which is mounted in a few seconds. If nothing happens, check to see if it is mounted.

Make sure that removable media services are running.


# svcs volfs
STATE          STIME    FMRI
online         10:39:12 svc:/system/filesystem/volfs:default

# svcs hal dbus rmvolmgr
STATE          STIME    FMRI
online         May_03   svc:/system/dbus:default
online         May_03   svc:/system/hal:default
online         May_03   svc:/system/filesystem/rmvolmgr:default

The file system can be mounted from the device if it is valid and it is recognized.

If it fails to mount, stop vold.


# svcadm disable volfs

If the file system on the device is not automatically mounted, try a manual mount.

Before hot-removing the device, find the name of the device in the eject -l command's alias name. Then eject the device's media. If you don't do this, the device is released and the port is usable again, but the file system on the device might have been damaged.

When you hot-plug a USB device, the device is immediately seen in the system's device hierarchy, as displayed in the prtconf command output. When you remove a USB device, the device is removed from the system's device hierarchy, unless you are using the device.

If you are using a device when it is unplugged, the device node remains, but the driver controlling this device stops all activity on the device. Any new I/O activity issued to this device returns an error.

In this situation, the system prompts you to plug in the original device. If the device is no longer available, stop the applications. After a few seconds, the port becomes available again.


Note –

Data integrity might be impaired if you remove an active or open device. Always close the device before removing, except the attached keyboard and mouse, which can be moved while active.


ProcedureHow to Add a USB Mass Storage Device Without vold Running

  1. For information on disabling removable media management, see How to Disable or Enable Removable Media Services.

  2. Verify that vold is not running.


    # svcs volfs
    STATE          STIME    FMRI
    disabled       10:39:12 svc:/system/filesystem/volfs:default
  3. Connect the USB mass storage device.

  4. Verify that the USB device has been added.

    Locate the USB disk device links, which might be among device links of non-USB storage devices, as follows:


    $ rmformat
    Looking for devices...
    1. Logical Node: /dev/rdsk/c3t0d0p0
       Physical Node: /pci@0,0/pci108e,4131@2,1/storage@4/disk@0,0
       Connected Device: USB2.0   Flash Disk       2.00
       Device Type: Removable

ProcedureHow to Add a USB Camera

If the camera's media uses a PCFS file system, it will be automatically mounted. If the device does not bind to the scsa2usb driver, use libusb applications for transferring the pictures. For more information, refer to /usr/sfw/share/doc/libusb/libusb.txt.

  1. Become superuser.

  2. Plug in and turn on the USB camera.

    The system creates a logical device for the camera. After the camera is plugged in, output is written to the /var/adm/messages file to acknowledge the device's connection. The system treats the camera as a storage device.

  3. Examine the output that is written to the /var/adm/messages file.


    # more /var/adm/messages
    

    Examining this output enables you to determine which logical device was created so that you can then use that device to access your images. The output looks similar to the following:


    Jul 15 09:53:35 buffy usba: [ID 349649 kern.info]    OLYMPUS, C-3040ZOOM,
     000153719068
    Jul 15 09:53:35 buffy genunix: [ID 936769 kern.info] scsa2usb1 is 
    /pci@0,0/pci925,1234@7,2/storage@2
    Jul 15 09:53:36 buffy scsi: [ID 193665 kern.info] sd3 at scsa2usb1: 
    target 0 lun 0

    Match the device with a mountable /dev/dsk link entry, by doing the following:


    # ls -l /dev/dsk/c*0 | grep /pci@0,0/pci925,1234@7,2/storage@2
     lrwxrwxrwx   1 root     root          58 Jun 14  2010 c3t0d0p0 ->
     ../../devices/pci@0,0/pci925,1234@7,2/storage@2/disk@0,0:a
  4. Mount the USB camera file system.

    The camera's file system is most likely a PCFS file system. If file system is PCFS, then it should be automatically mounted.

    To manually mount the file system on an x86 system, you would use syntax similar to the following:


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

    To manually mount the file system on a SPARC system, you would use syntax similar to the following:


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

    For information on mounting file systems, see Chapter 18, Mounting and Unmounting File Systems (Tasks).

    For information on mounting different PCFS file systems, see mount_pcfs(1M).

  5. Verify that the image files are available.

    For example:


    # ls /mnt/DCIM/100OLYMP/
    P7220001.JPG*  P7220003.JPG*  P7220005.JPG*
    P7220002.JPG*  P7220004.JPG*  P7220006.JPG*
  6. View and manipulate the image files created by the USB camera.

    For example:


    # /usr/dt/bin/sdtimage P7220001.JPG &
    
  7. Unmount the file system before disconnecting the camera.

    For example:


    # umount /mnt
    
  8. (Optional) Turn off and disconnect the camera.

ProcedureHow to Remove a USB Mass Storage Device Without vold Running

This is procedure is performed with removable media services disabled.

  1. Become superuser.

  2. For information on disabling removable media services, see How to Disable or Enable Removable Media Services.

  3. Verify that removable media services are not running.


    # svcs volfs
    STATE          STIME    FMRI
    disabled       Sep_29   svc:/system/filesystem/volfs:default
  4. Stop any active applications that are using the device.

  5. Unmount the device.

  6. Remove the device.

Preparing to Use a USB Mass Storage Device With vold Running

You can access information on removable media with or without using removable media services. For information on accessing information on removable media with GNOME's File Manager, see the GNOME desktop documentation.

After the USB device is formatted, it is usually mounted under the /rmdisk/label directory.

The device nodes are created under the /vol/dev directory. For more information on configuring removable storage devices, see rmmount.conf(4) or vold.conf(4).

The following procedures describe how to manage USB mass storage devices without vold running. The device nodes are created under the /dev/rdsk directory for character devices and under the /dev/dsk directory for block devices. Device links are created when the devices are hot-plugged. For more information, see scsa2usb(7D).

If the device cannot be identified by removable media services, then try to manually mount the device. First, use the rmformat command to identify the device path and then use the mount command to manually mount the device as superuser.

If the device is manually mounted, then you would unmount it using the umount command as superuser.

For more information about mounting and unmounting USB devices, see How to Mount or Unmount a USB Mass Storage Device Without vold Running.

ProcedureHow to Display USB Device Information

  1. Display information about USB devices.

    For example, use the prtconf command to display USB device information. The prtconf output in this example has been truncated to only display USB device information.


    $ prtconf
            usb, instance #0
                     hub, instance #2
                         device, instance #8
                             interface (driver not attached)
                         printer (driver not attached)
                         mouse, instance #14
                         device, instance #9
                             keyboard, instance #15
                             mouse, instance #16
                         storage, instance #7
                             disk (driver not attached)
                         communications, instance #10
                             modem (driver not attached)
                             data (driver not attached)
                     storage, instance #0
                         disk (driver not attached)
                     storage, instance #1
                         disk (driver not attached)

    For example, use the rmformat command to display USB device information.


    $ rmformat
    Looking for devices...
         1. Volmgt Node: /vol/dev/aliases/cdrom0
            Logical Node: /dev/rdsk/c0t2d0s2
            Physical Node: /pci@1f,0/pci@1,1/ide@3/sd@2,0
            Connected Device:    LG    CD-ROM CRD-8322B 1.03
            Device Type: CD Reader

ProcedureHow to Create a File System on a USB Mass Storage Device

A USB diskette must be formatted before you can add a file system to it. All other USB mass storage devices just need a PCFS or UFS file system before they can be used. Keep the following key points in mind when formatting a USB device:


Note –

Perform steps 4-5 only if you need to format a USB diskette.


  1. Become superuser.

  2. Add the USB device to your system. For information on hot-plugging USB devices, see:

  3. (Optional) Identify the USB device.

    For example:


    # cd /dev/rdsk
    # ls -l c*0 | grep usb
    lrwxrwxrwx   1 root  root   55 Mar  5 10:35 c2t0d0s0 ->
    ../../devices/pci@1f,0/usb@c,3/storage@3/disk@0,0:a,raw

    In this example, the diskette device is c2t0d0s0.

  4. Insert a diskette into the diskette drive, if necessary.

  5. Format the diskette, if necessary.


    % rmformat -F long raw-device
    

    For example, on a SPARC system:


    % rmformat -F long /dev/rdsk/c2t0d0s2
    

    For example, on an x86 system:


    % rmformat -F long /dev/rdsk/c3t0d0p0
    
  6. Determine the file system type and make sure the device is unmounted. Then, select one of the following:

    For more information about unmounting a USB device, see How to Mount or Unmount a USB Mass Storage Device Without vold Running.

    • Create a PCFS file system.


      # mkfs -F pcfs -o nofdisk,size=size raw-device
      

      Specify the -size option in 512-byte blocks.

      The following example shows how to create a PCFS file system on a 1.4-MB diskette on a SPARC system:


      # mkfs -F pcfs /dev/rdsk/c2t0d0p0
      Construct a new FAT file system on /dev/rdsk/c2t0d0p0: (y/n)? y
      

      The following example shows how to create a PCFS file system on a 1.4-MB diskette on an x86 system:


      # mkfs -F pcfs /dev/rdsk/c2t0d0s2
      Construct a new FAT file system on /dev/rdsk/c2t0d0s2: (y/n)? y
      

      The following example shows how to create a PCFS file system on a 100-MB USB memory stick on a SPARC system:


      # mkfs -F pcfs /dev/rdsk/c5t0d0s2:c
      

      The following example shows how to create a PCFS file system on a 100-MB USB memory stick on an x86 system:


      # mkfs -F pcfs /dev/rdsk/c5t0d0p0:c
      

      This command can take several minutes to complete.

    • Create a UFS file system.


      # newfs raw-device
      

      For example:


      # newfs /dev/rdsk/c4t0d0s7
      

      Consider using the newfs -f 4096 option or newfs -T option for large USB hard disks.


      Note –

      UFS file system overhead consumes a significant portion of space on a diskette, due to a diskette's limited storage capacity.


    See the next two procedures for a detailed example of creating a PCFS file system and modifying slices on a USB mass storage device.

ProcedureHow to Create a File System on a USB Mass Storage Device Without vold Running

Use this procedure to add a file system to a USB mass storage device with removable media services disabled.

A USB diskette must be formatted before you can add a file system to it. All other USB mass storage devices just need a PCFS or UFS file system before they can be used. Keep the following key points in mind when formatting a USB diskette:


Note –

Perform steps 7–8 only if you need to format a USB diskette.


  1. Become superuser.

  2. For information on disabling removable media services, see How to Disable or Enable Removable Media Services.

  3. Verify that removable media services are not running.


    # svcs volfs
    STATE          STIME    FMRI
    disable        10:39:12 svc:/system/filesystem/volfs:default
  4. Add the USB device to your system.

    For information on hot-plugging USB devices, see:

  5. (Optional) Identify the USB device.

    The following example identifies a USB diskette device.


    # cd /dev/rdsk
    # ls -l c*0 | grep usb
    lrwxrwxrwx   1 root  root   55 Mar  5 10:35 c2t0d0s0 ->
    ../../devices/pci@1f,0/usb@c,3/storage@3/disk@0,0:a,raw

    In this example, the diskette device is c2t0d0s0.

  6. Insert a diskette into the diskette drive, if necessary.

  7. Format the diskette, if necessary.


    % rmformat -F long raw-device
    

    For example, on a SPARC system:


    % rmformat -F long /dev/rdsk/c2t0d0s2
    

    For example, on an x86 system:


    % rmformat -F long /dev/rdsk/c3t0d0p0
    
  8. Determine the file system type and select one of the following:

    • Create a PCFS file system.


      # mkfs -F pcfs -o nofdisk,size=size raw-device
      

      Specify the -size option in 512-byte blocks.

      The following example shows how to create a PCFS file system on a 1.4-MB diskette on a SPARC system:


      # mkfs -F pcfs -o nofdisk,size=2880 /dev/rdsk/c4t0d0s2
      

      The following example shows how to create a PCFS file system on a 1.4-MB diskette on an x86 system:


      # mkfs -F pcfs -o nofdisk,size=2880 /dev/rdsk/c4t0d0p0
      

      The following example shows how to create a PCFS file system on a 100-MB USB memory stick on a SPARC system:


      # mkfs -F pcfs /dev/rdsk/c5t0d0s2:c
      

      The following example shows how to create a PCFS file system on a 100-MB USB memory stick on an x86 system:


      # mkfs -F pcfs /dev/rdsk/c5t0d0p0:c
      

      This command can take several minutes to complete.

    • Create a UFS file system.


      # newfs raw-device
      

      For example:


      # newfs /dev/rdsk/c4t0d0s7
      

      Consider using the newfs -f 4096 option or newfs -T option for large USB hard disks.


      Note –

      UFS file system overhead consumes a significant portion of space on a diskette, due to a diskette's limited storage capacity.


    See the next two procedures for a detailed example of creating a PCFS file system and modifying slices on a USB mass storage device.

ProcedureHow to Modify Partitions and Create a PCFS File System on a USB Mass Storage Device Without vold Running

The following steps describe how to delete an existing partition, create a new partition, and then create a PCFS file system on the USB device with removable media services disabled. Make sure you back up any data before you perform this task.

  1. Become superuser.

  2. For information about disabling removable media services, see How to Disable or Enable Removable Media Services.

  3. Start the fdisk utility.

    For example:


    # fdisk /dev/rdsk/c3t0d0p0
    
  4. Delete the partition by selecting option 3.

    For example:


          Total disk size is 29 cylinders
                 Cylinder size is 2048 (512 byte) blocks
    
                                                   Cylinders
          Partition   Status    Type          Start   End   Length    %
          =========   ======    ============  =====   ===   ======   ===
              1       Active    Solaris2          1    28      28     97
    
    SELECT ONE OF THE FOLLOWING:
       1. Create a partition
       2. Specify the active partition
       3. Delete a partition
       4. Change between Solaris and Solaris2 Partition IDs
       5. Exit (update disk configuration and exit)
       6. Cancel (exit without updating disk configuration)
    Enter Selection: 3
    
  5. Choose the partition number to delete.

    For example:


          Total disk size is 29 cylinders
                 Cylinder size is 2048 (512 byte) blocks
    
                                                   Cylinders
          Partition   Status    Type          Start   End   Length    %
          =========   ======    ============  =====   ===   ======   ===
              1       Active    Solaris2          1    28      28     97
    
    SELECT ONE OF THE FOLLOWING:
       1. Create a partition
       2. Specify the active partition
       3. Delete a partition
       4. Change between Solaris and Solaris2 Partition IDs
       5. Exit (update disk configuration and exit)
       6. Cancel (exit without updating disk configuration)
    Specify the partition number to delete (or enter 0 to exit): 1
    
    Partition deleted.
  6. Create a partition.

    For example:


          Total disk size is 29 cylinders
                 Cylinder size is 2048 (512 byte) blocks
    
                                                   Cylinders
          Partition   Status    Type          Start   End   Length    %
          =========   ======    ============  =====   ===   ======   ===
    
    WARNING: no partitions are defined!
    
    SELECT ONE OF THE FOLLOWING:
       1. Create a partition
       2. Specify the active partition
       3. Delete a partition
       4. Change between Solaris and Solaris2 Partition IDs
       5. Exit (update disk configuration and exit)
       6. Cancel (exit without updating disk configuration)
    Enter Selection: 1
    
  7. Select the FAT32 partition type.


          Total disk size is 29 cylinders
                 Cylinder size is 2048 (512 byte) blocks
    
                                                   Cylinders
          Partition   Status    Type          Start   End   Length    %
          =========   ======    ============  =====   ===   ======   ===
    
    WARNING: no partitions are defined!
    
    SELECT ONE OF THE FOLLOWING:
       1. Create a partition
       2. Specify the active partition
       3. Delete a partition
       4. Change between Solaris and Solaris2 Partition IDs
       5. Exit (update disk configuration and exit)
       6. Cancel (exit without updating disk configuration)
    Select the partition type to create:
       1=SOLARIS2  2=UNIX        3=PCIXOS     4=Other    
       5=DOS12     6=DOS16       7=DOSEXT     8=DOSBIG
       9=DOS16LBA  A=x86 Boot    B=Diagnostic C=FAT32
       D=FAT32LBA  E=DOSEXTLBA   F=EFI        0=Exit? c
    
  8. Specify the percentage of disk to use for this partition.


           Total disk size is 29 cylinders
                  Cylinder size is 2048 (512 byte) blocks
    
                                                   Cylinders
          Partition   Status    Type          Start   End   Length    %
          =========   ======    ============  =====   ===   ======   ===
    
    WARNING: no partitions are defined!
    
    SELECT ONE OF THE FOLLOWING:
       1. Create a partition
       2. Specify the active partition
       3. Delete a partition
       4. Change between Solaris and Solaris2 Partition IDs
       5. Exit (update disk configuration and exit)
       6. Cancel (exit without updating disk configuration)
    Select the partition type to create:
    Specify the percentage of disk to use for this partition (or type "c" to 
    specify the size in cylinders). 100
    
  9. Select whether the new partition should be the active partition or an inactive partition.


                  Total disk size is 29 cylinders
                  Cylinder size is 2048 (512 byte) blocks
    
                                                   Cylinders
          Partition   Status    Type          Start   End   Length    %
          =========   ======    ============  =====   ===   ======   ===
    
    WARNING: no partitions are defined!
    
    SELECT ONE OF THE FOLLOWING:
       1. Create a partition
       2. Specify the active partition
       3. Delete a partition
       4. Change between Solaris and Solaris2 Partition IDs
       5. Exit (update disk configuration and exit)
       6. Cancel (exit without updating disk configuration)
    Select the partition type to create:
    Should this become the active partition? If yes, it  will be activated 
    each time the computer is reset or turned on.
    Please type "y" or "n". n
    
  10. Update the disk configuration and exit.


          Total disk size is 29 cylinders
                 Cylinder size is 2048 (512 byte) blocks
    
                                                   Cylinders
          Partition   Status    Type          Start   End   Length    %
          =========   ======    ============  =====   ===   ======   ===
              1                 Win95 FAT32       1    28      28     97
    
    SELECT ONE OF THE FOLLOWING:
       1. Create a partition
       2. Specify the active partition
       3. Delete a partition
       4. Change between Solaris and Solaris2 Partition IDs
       5. Exit (update disk configuration and exit)
       6. Cancel (exit without updating disk configuration)
    Enter Selection: 5
    
  11. Create the PCFS file system on this partition.

    For example:


    # mkfs -F pcfs -o fat=32 /dev/rdsk/c3t0d0p0:c
    Construct a new FAT file system on /dev/rdsk/c3t0d0p0:c: (y/n)? y
    

ProcedureHow to Create a Solaris Partition and Modify the Slices on a USB Mass Storage Device Without vold Running

The following steps illustrate how to create a Solaris partition and modify the slices with removable media services disabled.

Make sure you back up any data before you perform this task.

  1. Become superuser.

  2. For information on disabling removable media services, see How to Disable or Enable Removable Media Services.

  3. Start the fdisk utility.

    For example:


    # fdisk /dev/rdsk/c5t0d0s2
    No fdisk table exists. The default partition for the disk is:
    
      a 100% "SOLARIS System" partition
    
    Type "y" to accept the default partition,  otherwise type "n" to edit the
     partition table.
    y
    
  4. Display the current slices.

    For example:


    # prtvtoc /dev/rdsk/c5t0d0s2
    * /dev/rdsk/c5t0d0s2 partition map
    *
    * Dimensions:
    *     512 bytes/sector
    *      63 sectors/track
    *     255 tracks/cylinder
    *   16065 sectors/cylinder
    *    5836 cylinders
    *    5836 accessible cylinders
    *
    * Flags:
    *   1: unmountable
    *  10: read-only
    *
    *                          First     Sector    Last
    * Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
           0      0    00          0  93755340  93755339
           2      0    00          0  93755340  93755339
  5. Create a text file with the slice information.

    For example:


    slices: 0 = 0, 5GB, "wm", "home" :
            1 = 8225280000, 6GB :
            2 = 0, 44GB, "wm", "backup" :
            6 = 16450560000, 15GB

    Make sure each slice starts on a cylinder boundary. For example, slice 1 starts at 822280000 bytes, which is the cylinder size in bytes multiplied by 1000.

    For more information, see the -s option description in rmformat(1).

  6. Create the slices by including the slice file created above.

    For example:


    # rmformat -s slice_file /dev/rdsk/c5t0d0s2
    
  7. View the new slice information.

    For example:


    # prtvtoc /dev/rdsk/c5t0d0s2
    * /dev/rdsk/c5t0d0s2 partition map
    *
    * Dimensions:
    *     512 bytes/sector
    *      63 sectors/track
    *     255 tracks/cylinder
    *   16065 sectors/cylinder
    *    5836 cylinders
    *    5836 accessible cylinders
    *
    * Flags:
    *   1: unmountable
    *  10: read-only
    *
    * Unallocated space:
    *       First     Sector    Last
    *       Sector     Count    Sector
    *    10485760   5579240  16064999
    *    28647912   3482088  32129999
    *    63587280  30168060  93755339
    *
    *                          First     Sector    Last
    * Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
           0      8    00          0  10485760  10485759
           1      3    01   16065000  12582912  28647911
           2      5    00          0  92274688  92274687
           6      4    00   32130000  31457280  63587279

ProcedureHow to Mount or Unmount a USB Mass Storage Device Without vold Running

The following steps illustrate how to mount and unmount a USB mass storage device with removable media services disabled.

  1. Become superuser.

  2. For information on disabling removable media services, see How to Disable or Enable Removable Media Services.

  3. Verify that removable media services are not running.


    # svcs volfs
    STATE          STIME    FMRI
    disabled       10:39:12 svc:/system/filesystem/volfs:default
  4. (Optional) Identify the device.

    For example:


    # cd /dev/rdsk
    # ls -l c*0 | grep usb
    lrwxrwxrwx   1 root  root   55 Mar  5 10:35 c2t0d0s0 ->
    ../../devices/pci@1f,0/usb@c,3/storage@3/disk@0,0:a,raw

    In this example, the diskette device is c2t0d0s0.

  5. Select one of the following to mount or unmount a USB mass storage device:

    • Mount a USB mass storage device.


      # mount [ -F fstype ] block-device mount-point
      

      This example shows how to mount a device with a UFS file system:


      # mount /dev/dsk/c1t0d0s2 /mnt
      

      This example shows how to mount a device with a PCFS file system on a SPARC system:


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

      This example shows how to mount a device with a PCFS file system on an x86 system:


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

      This example shows how to mount a CD with a read-only HSFS file system:


      # mount -F hsfs -o ro /dev/dsk/c1t0d0s2 /mnt
      
    • Unmount a USB mass storage device.

      First, be sure no one is using the file system on the device.

      For example:


      # fuser -c -u /mnt
      # umount /mnt
      
  6. Eject the device, which is optional for CD or diskette devices.


    # eject /dev/[r]dsk/cntndnsn
    

    For example:


    # eject /dev/rdsk/c1t0d0s2
    

Troubleshooting Tips for USB Mass Storage Devices

Keep the following tips in mind if you have problems adding or removing a USB mass storage device.

Check the /var/adm/messages file for failures to enumerate the device. For enumeration failures, possibly, insert the USB hub or remove a hub and connect it directly to a root USB hub.

Disabling Specific USB Drivers

You can disable specific types of USB devices by disabling their client driver. For example, USB printers can be disabled by disabling the usbprn driver that directs them. Disabling usbprn does not affect other kinds of devices, such as USB storage devices.

The following table identifies some USB device types and their corresponding drivers.

Device Type 

Driver to Disable 

Audio 

usb_ac and usb_as

HID (usually keyboard and mouse) 

hid

Storage 

scsa2usb

Printer 

usbprn

Serial 

usbser_edge

If you disable a driver for a USB device that is still connected to the system, you see a console message similar to the following:


usba10: WARNING: usba:    no driver found for device name

ProcedureHow to Disable Specific USB Drivers

  1. Become superuser.

  2. Exclude the driver alias entry from the /etc/system file.

    For example, include the following exclude statement to exclude the usbprn driver.


    exclude: usbprn
  3. Reboot the system.


    # init 6
    

ProcedureHow to Remove Unused USB Device Links

Use this procedure if a USB device is removed while the system is powered off. Removing the USB device while the system is powered off can leave device links for devices that do not exist.

  1. Become superuser.

  2. Close all applications that might be accessing the device.

  3. Remove the unused links for a specific USB class.

    For example:


    # devfsadm -C -c audio
    

    Or, just remove the dangling links:


    # devfsadm -C