Task |
Description |
For Instructions |
---|---|---|
Add a USB mass storage device |
Add a USB mass storage device with vold running. | |
Add a USB mass storage device without vold running. | ||
Remove a USB mass storage device |
Remove a USB mass storage device with vold running. | |
Remove a USB mass storage device without vold running. |
How to Remove a USB Mass Storage Device Without vold Running |
|
Add a USB camera |
Add a USB camera to access digital images. |
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.
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. If the device is no longer available, stop the applications. After a few seconds, the port will become available again.
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.
This procedure describes how to add a USB device with vold running.
Connect the USB mass storage device.
Instruct vold to scan for new devices.
# touch /etc/vold.conf |
Restart vold.
# pkill -HUP vold |
Verify that the device has been added.
$ ls device-alias |
For more information on volume management device names, see Chapter 1, Managing Removable Media (Overview).
This procedure describes how to add a USB device without vold running.
If needed, see How to Prepare to Use USB Mass Storage Devices Without vold Running for information on disabling vold.
Connect the USB mass storage device.
Verify that the USB device has been added.
Locate the USB disk device links, which may be among device links of non-USB storage devices, as follows:
$ cd /dev/rdsk $ ls -l c*0 | grep usb lrwxrwxrwx 1 root root 67 Apr 30 15:12 c1t0d0s0 -> ../../devices/pci@1f,0/pci@5/pci@0/usb@8,2/storage@1/disk@0,0:a,raw |
The following procedure uses a Zip drive as an example of removing a USB device with vold running.
Stop any active applications that are using the device.
Unmount the device.
For example:
$ volrmmount -e zip0 |
Eject the device.
For example:
$ eject zip0 |
Become superuser and stop vold.
# /etc/init.d/volmgt stop |
Remove the USB mass storage device.
Start vold.
# /etc/init.d/volmgt start |
This procedure describes how to remove a USB device without vold running.
If needed, see How to Prepare to Use USB Mass Storage Devices Without vold Running for information on disabling vold.
Become superuser.
Stop any active applications that are using the device.
Remove the USB device.
Use this procedure to add a USB camera.
Become superuser.
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 camera is seen as a storage device to the system.
Examine the output that is written to the /var/adm/messages file.
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 will look similar to the following:
# more /var/adm/messages 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 Jul 15 2002 c3t0d0p0 -> ../../devices/pci@0,0/pci925,1234@7,2/storage@2/disk@0,0:a |
Mount the USB camera file system.
The camera's file system is most likely a PCFS file system. In order to mount the file system on the device created, the slice that represents the disk must be specified. The slice is normally s0 for a SPARC system, and p0 for an x86 system.
For example, to mount the file system on an x86 system, execute the following command:
# mount -F pcfs /dev/dsk/c3t0d0p0:c /mnt |
To mount the file system on a SPARC system, execute the following command:
# mount -F pcfs /dev/dsk/c3t0d0s0:c /mnt |
For information on mounting file systems, see Chapter 17, Mounting and Unmounting File Systems (Tasks).
For information on mounting different PCFS file systems, see mount_pcfs(1M).
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* |
View and manipulate the image files created by the USB camera.
# /usr/dt/bin/sdtimage P7220001.JPG & |
Unmount the file system before disconnecting the camera.
For example:
# umount /mnt |
Turn off and disconnect the camera.