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.
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.
For information on disabling removable media management, see How to Disable or Enable Removable Media Services.
Verify that vold is not running.
# svcs volfs STATE STIME FMRI disabled 10:39:12 svc:/system/filesystem/volfs:default |
Connect the USB mass storage device.
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 |
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.
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 system treats the camera as a storage device.
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 |
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).
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.
For example:
# /usr/dt/bin/sdtimage P7220001.JPG & |
Unmount the file system before disconnecting the camera.
For example:
# umount /mnt |
(Optional) Turn off and disconnect the camera.
This is procedure is performed with removable media services disabled.
Become superuser.
For information on disabling removable media services, see How to Disable or Enable Removable Media Services.
Verify that removable media services are not running.
# svcs volfs STATE STIME FMRI disabled Sep_29 svc:/system/filesystem/volfs:default |
Stop any active applications that are using the device.
Unmount the device.
Remove the device.