Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
28.  Using USB Devices (Overview/Tasks) About USB in the Solaris Environment SPARC: USB Power Management  Previous   Contents   Next 
   
 

Guidelines for USB Cables

Never use USB cable extenders that are available in the market. Always use a hub with longer cables to connect devices. Always use fully rated (12 Mbit/sec) 20/28 AWG cables for connecting USB devices.

Using USB Mass Storage Devices (Task Map)

Task

Description

For Instructions

1. Add a hot-pluggable USB mass storage device

Add a hot-pluggable USB mass storage device with vold running.

"How to Add a Hot-Pluggable USB Mass Storage Device With vold Running"

 

Add a hot-pluggable USB mass storage device without vold running.

"How to Add a Hot-Pluggable USB Mass Storage Device Without vold Running"

2. Remove a hot-pluggable USB mass storage device

Remove a hot-pluggable USB mass storage device with vold running.

"How to Remove a Hot-Pluggable USB Mass Storage Device With vold Running"

 

Remove a hot-pluggable USB mass storage device without vold running.

"How to Remove a Hot-Pluggable USB Mass Storage Device Without vold Running"

3. Mount a USB mass storage device

Mount a hot-pluggable USB mass storage device with vold running.

"How to Mount or Unmount a USB Mass Storage Device With vold Running"

 

Mount a hot-pluggable USB mass storage device without vold running.

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

4. Add a hot-pluggable USB camera

Add a hot-pluggable USB camera to access digital images.

"How to Add a Hot-Pluggable USB Camera"

Using USB Mass Storage Devices

Removable mass storage devices such as USB CD-RWs, disks, DVDs, digital cameras, Zip, Jaz, Clik!, SmartMedia, CompactFlash, and ORB are supported, starting with the Solaris 9 release.

For a complete list of USB devices that are supported in the Solaris environment, see http://www.sun.com/io_technologies/storagesolutions.html.

These devices can be managed with or without volume management. For information on managing devices with volume management, see vold(1M).

Using Non-Compliant USB Mass Storage Devices

If you connect a USB mass storage device to a system running the Solaris 9 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. For a listing of recommended USB mass storage devices, go to http://www.sun.com/io.

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, and can be copied and uncommented to enable support of particular devices.

Follow the information given in the scsa2usb.conf file to see if a particular device can be supported by using the override information.

For more information, see scsa2usb(7D).

Hot-Plugging USB Devices

Hot-plugging a device means the device is added or removed without shutting down the operating system or powering off the system.

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 the device is in use.

If the USB device is in use when it is removed, the hot-plug behavior is a little different. If a device is in use 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 is returned with an error.

In this situation, the system prompts you to plug in the original device. To recover from accidentally removing a busy USB device, do the following:

  1. Plug the original device into the same port.

  2. Stop the application that is using the device.

  3. Remove the device.

The USB port remains unusable until the original device has been plugged in again. If the device is no longer available, the port remains unusable until the next reboot.


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


How to Add a Hot-Pluggable USB Mass Storage Device With vold Running

This procedure describes how to add a hot-pluggable USB device with vold running.

  1. Insert the USB mass storage device.

  2. Restart vold.

    # pkill -HUP vold
  3. Verify that the device has been added.

    $ ls device-alias

How to Add a Hot-Pluggable USB Mass Storage Device Without vold Running

This procedure describes how to add a hot-pluggable USB device without vold running.

  1. Add a hot-pluggable USB device into the USB port.

  2. Verify that the USB device has been added.

    $ ls /dev/rdsk/cntndnsn

How to Remove a Hot-Pluggable USB Mass Storage Device With vold Running

The following procedure uses a Zip drive as an example of removing a hot-pluggable USB device with vold running.

  1. Unmount the device.

    $ volrmmount -e zip0
  2. Stop any active applications that are using the device.

  3. Eject the device.

    $ eject zip0
  4. Become superuser and stop vold.

    # /etc/init.d/volmgt stop
  5. Remove the USB mass storage device.

  6. Start vold.

    # /etc/init.d/volmgt start

How to Remove a Hot-Pluggable USB Mass Storage Device Without vold Running

This procedure describes how to remove a hot-pluggable USB device without vold running.

  1. Become superuser.

  2. Stop any active applications that are using the device.

  3. Remove the hot-pluggable USB device.

    1. Unmount the device.

      # umount /mount-point
    2. Remove the device.

Mounting USB Mass Storage Devices With or Without vold Running

If you are running Solaris Common Desktop Environment (CDE), the USB removable mass storage devices are managed by the Removable Media Manager component of the CDE File Manager. For more information on the CDE File Manager, see dtfile(1).


Note - You must include the /usr/dt/man directory in your MANPATH variable to display the man pages listed in this section. You must also have the /usr/dt/bin directory in your path and have CDE running to use these commands, or have a DISPLAY variable set to use these commands remotely.


The following table identifies the commands Removable Media Manager uses to manage storage devices from the CDE environment.

Command

Man Page

Task

sdtmedia_format

sdtmedia_format(1)

Format and label a device

sdtmedia_prop

sdtmedia_prop(1)

Display properties of a device

sdtmedia_prot

sdtmedia_prot(1)

Change device protection

sdtmedia_slice

sdtmedia_slice(1)

Create or modify slices on a device

After the USB device is formatted, it is usually mounted under the /rmdisk/label directory. For more information on configuring removable storage devices, see rmmount.conf(4) or vold.conf(4).

The device nodes are created under the /vol/dev directory. For more information, see scsa2usb(7D).

You can use USB mass storage devices without the volume manager (vold) running. Here are two ways to avoid using the volume manager.

  • Stop vold by issuing this command:

    # /etc/init.d/volmgt stop
  • Keep vold running, but do not register the USB mass storage devices with it. Remove volume manager registration of USB mass storage devices by commenting the following line in the /etc/vold.conf file, like this:

    # use rmdisk drive /dev/rdsk/c*s2 dev_rmdisk.so rmdisk%d

    After this line is commented, restart vold.

    # /etc/init.d/volmgt start 

    Caution - If you comment out this line and other SCSI or ATAPI Zip or Jaz removable devices are in the system, vold registration for these devices would be disabled as well.


    For more information, see vold.conf(4).

 
 
 
  Previous   Contents   Next