Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

System Administration Guide: Devices and File Systems
Previous Next

Using USB Mass Storage Devices

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

  • CD-RWs

  • Hard disks

  • DVDs

  • Digital cameras

  • Diskette devices

  • SmartMedia and CompactFlash devices

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

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

https://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 Express 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.

  • Starting in the Solaris Express 6/05 release, a hot-pluggable device is automatically mounted. For more information, see vold Provides Awareness of Hot-Plugged USB Devices.

  • USB storage devices with standard MS-DOS or Windows (FAT) file systems are supported.

  • You can use the user-friendly rmformat command to create slices. You can also use the fdisk command to partition a USB device, but never use the format utility or the rmformat -F command to physically format a USB drive.

  • Use the rmformat command to display all USB devices with media inserted. For example, see How to Display USB Device Information.

  • Non-root users can now access USB storage devices, since the mount command is no longer needed. The device is automatically mounted and is available under the /media directory. If a new device is connected while the system is down, do a reconfiguration boot with the boot -r command so that the device is recognized.

  • These devices can be managed with or without removable media services.

  • Disks with FAT file systems can be mounted and accessed. For example:

    mount -F pcfs /dev/dsk/c2t0d0s0:c /mnt
  • All USB storage devices are now power managed, except for those that support LOG SENSE pages. Devices with LOG SENSE pages are usually SCSI drives connected through a USB-to-SCSI bridge device.

  • Applications might work differently with USB mass storage devices. Keep the following issues in mind when using applications with USB storage devices:

    • Applications might make incorrect assumptions about the size of the media since only smaller devices like diskettes were removable previously.

    • Requests by applications to eject media on devices where this would be inapplicable, such as a hard drive, will succeed and do nothing.

    • If you prefer the behavior in previous Solaris releases where all USB mass storage were treated as removable media devices, then you can force the old behavior by updating the /kernel/drv/scsa2usb.conf file.

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 /media 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:

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

For more information, see scsa2usb(7D).

How 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 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 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.


How to Add a USB Mass Storage Device
  1. Become superuser or a console user.
  2. Connect the USB mass storage device.
  3. Verify that the USB device has been added.

    For example:

    $ rmformat
     Looking for devices...
           1. Logical Node: /dev/rdsk/c3t0d0p0
              Physical Node: /[email protected],0/pci108e,[email protected],1/[email protected]/[email protected],0
              Connected Device: SanDisk  Cruzer Micro     0.3
              Device Type: Removable
              Bus: USB
              Size: 245.0 MB
              Label: <None>
              Access permissions: Medium is not write protected.
  4. Verify that the device is automatically mounted under the /media directory.

    For example:

    $ ls /media/NONAME
    aa  bb

    You can also use the rmmount -l command to list the paths and nicknames of mountable devices. If the device has been mounted under the /media directory, you will see output similar to the following:

    $ rmmount -l
    /dev/dsk/c3t0d0p0:1  rmdisk0,NONAME,/media/NONAME
How 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 
    /[email protected],0/pci925,[email protected],2/[email protected]
    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 /[email protected],0/pci925,[email protected],2/[email protected]
     lrwxrwxrwx   1 root     root          58 Jun 30  2004 c3t0d0p0 ->
     ../../devices/[email protected],0/pci925,[email protected],2/[email protected]/[email protected],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 19, 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.
How to Remove a USB Mass Storage Device
  1. Become superuser or a console user.
  2. Stop any active applications that are using the device.
  3. Unmount the device.
    $ rmumount NONAME

    Or, use the umount command as superuser. For example:

    # umount /media/NONAME

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

  4. Remove the device.

Preparing to Use a USB Mass Storage Device

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 /media/label directory.

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 a device is mounted by removable media services then you can unmount it by using the rmumount command. 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.

How to Display USB Device Information

  • 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. Logical Node: /dev/rdsk/c3t0d0p0
              Physical Node: /[email protected],0/pci108e,[email protected],1/[email protected]/[email protected],0
              Connected Device: SanDisk  Cruzer Micro     0.3
              Device Type: Removable
              Bus: USB
              Size: 245.0 MB
              Label: <None>
              Access permissions: Medium is not write protected.

How 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:

    # rmformat
    Looking for devices...
         1. Logical Node: /dev/rdsk/c2t0d0p0
            Physical Node: /[email protected],0/pci108e,[email protected],1/[email protected]/[email protected]/[email protected],0
            Connected Device: MITSUMI  USB FDD          1039
            Device Type: Floppy drive
            Bus: USB
            Size: 1.4 MB
            Label: <None>
            Access permissions: Medium is not write protected.

    In this example, the diskette device is c2t0d0p0.

  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.

    • 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-Mbyte 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-Mbyte 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-Mbyte 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-Mbyte 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.

How to Modify Partitions and Create a PCFS File System on a USB Mass Storage Device

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. Make sure you backup any data before you perform this task.

  1. Become superuser.
  2. Start the fdisk utility.

    For example:

    # fdisk /dev/rdsk/c3t0d0p0
  3. 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
  4. 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.
  5. 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
  6. 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
  7. 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
  8. 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
  9. 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
  10. Create the PCFS file system on this partition.

    Make sure the device is unmounted before creating the new file system. For more information about unmounting a USB device, see How to Mount or Unmount a USB Mass Storage Device.

    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

How to Create a Solaris Partition and Modify the Slices on a USB Mass Storage Device

The following steps illustrate how to create a Solaris partition and modify the slices.

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

  1. Become superuser.
  2. 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
  3. 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
  4. 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).

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

    For example:

    # rmformat -s slice_file /dev/rdsk/c5t0d0s2
  6. 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

How to Mount or Unmount a USB Mass Storage Device

The following steps illustrate how to mount and unmount a USB mass storage device.

  1. Become superuser or console user.
  2. (Optional) Identify the device.

    For example:

    $ rmformat
     Looking for devices...
           1. Logical Node: /dev/rdsk/c3t0d0p0
              Physical Node: /[email protected],0/pci108e,[email protected],1/[email protected]/[email protected],0
              Connected Device: SanDisk  Cruzer Micro     0.3
              Device Type: Removable
              Bus: USB
              Size: 245.0 MB
              Label: <None>
              Access permissions: Medium is not write protected.

    In this example, the physical diskette device is c2t0d0p0.

    Or, identify the nickname for the device. For example:

    $ rmmount -l
    /dev/dsk/c2t0d0p0       floppy,floppy0,fd,fd0,diskette,diskette0,rdiskette,rdiskette0
  3. Select one of the following to mount or unmount a USB mass storage device:
    • Mount a USB mass storage device as a console user.

      You can use the rmmount command with device nicknames, mount points, or device paths, similar to the following:

      $ rmmount rmdisk0
      $ rmmount NONAME
      $ rmmount /dev/dsk/c3t0d0p0:1

      For example:

      $ rmmount NONAME
      NONAME /dev/dsk/c2t0d0p0 mounted
      $ ls /media/NONAME
      AA.TXT
    • Unmount a USB mass storage device as a console user.

      For example:

      $ rmumount NONAME  
      NONAME /dev/dsk/c2t0d0p0 unmounted
    • Mount a USB mass storage device as superuser.

      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 as superuser.

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

      For example:

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

    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.

  • If USB devices are added or removed when the system is down, you must perform a reconfiguration boot.

    ok boot -r

    If you have problems accessing a device that was connected while the system is running, try the following command:

    # devfsadm
  • Do not move devices around if the system has been powered down by a suspend operation. For more information, see SPARC: USB Power Management.

  • If a device has been hot removed while in use by applications and is no longer available, then stop the applications. Use the prtconf command to see whether the device node has been removed.

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

How 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

How 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
Previous Next

 
 
  Published under the terms fo the Public Documentation License Version 1.01. Design by Interspire