Removable mass storage devices such as USB Zip, Jaz, Clik!, SmartMedia, CompactFlash, and ORB are supported, starting with the Solaris 8 10/00 release. See scsa2usb(7D) for a complete list of devices that are supported in the Solaris environment.
These devices can be managed with or without volume management. See vold(1M) for information on managing devices with volume management.
The following sections describes the tasks for managing USB devices in the Solaris environment.
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. See dtfile(1) for more information on the CDE File Manager.
You must include the /usr/dt/man in your MANPATH variable to display the man pages listed in this section. You must also have /usr/dt/bin 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 |
Task |
---|---|
sdtmedia_format(1) |
Format and label USB devices |
sdtmedia_prop(1) |
Display properties of the device |
sdtmedia_prot(1) |
Change device protection |
sdtmedia_slice(1) |
Create or modify slices on the device |
After the USB device is formatted, it is usually mounted under the /rmdisk/label directory. See rmmount.conf(4) for details on how to configure removable storage devices.
The following procedures describe how to manage USB mass storage devices with volume management. The device nodes are created under the /vol/dev directory. See scsa2usb(7D) for more information. The following procedures also describe how to add or remove hot-pluggable 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.
Display device aliases for all removable mass storage devices, including USB mass storage devices.
$ eject -n . . . rmdisk0 -> /vol/dev/rdsk/c4t0d0/clik40 (Generic USB storage) cdrom0 -> /vol/dev/rdsk/c0t6d0/audio_cd (Generic CD device) zip1 -> /vol/dev/rdsk/c2t0d0/fat32 (USB Zip device) zip0 -> /vol/dev/rdsk/c1t0d0/zip100 (USB Zip device) jaz0 -> /vol/dev/rdsk/c3t0d0/jaz1gb (USB Jaz device) |
Mount a USB mass storage device by using the device aliases listed previously.
$ volrmmount -i device-alias |
This example mounts a USB Jaz drive under /rmdisk/jaz0.
$ volrmmount -i jaz0 |
Unmount a USB mass storage device.
$ volrmmount -e device-alias |
This example unmounts a USB Zip drive from /rmdisk/zip0.
$ volrmmount -e zip0 |
Eject a USB device from a generic USB drive.
$ eject device-alias |
For example:
$ eject rmdisk0 |
The eject command also unmounts the device if it is not unmounted already. The command also terminates any active applications that access the device.
The following procedure uses a Zip drive as an example of removing a hot-pluggable USB device with vold running.
Unmount the device.
$ volrmmount -e zip0 |
(Optional) Stop any active applications that are using the device.
Eject the device.
$ 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 add a hot-pluggable USB device with vold running.
Insert the USB mass storage device.
Restart vold.
# pkill -HUP vold |
Verify the device has been added.
$ ls device-alias |
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 |
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.
See vold.conf(4) for details.
The following procedures describe how to manage USB mass storage devices without vold(1M) running. The device nodes are created under the /dev/rdsk directory for character devices and under the /dev/dsk directory for block devices. See scsa2usb(7D) for details.
Become superuser.
Mount a USB mass storage device.
# mount -F fs-type /dev/dsk/cntndnsn /mount-point |
This command might fail it the device is read only. Use the following command for CD-ROM devices.
# mount -F fs-type -o ro /dev/dsk/cntndnsn /mount-point |
For example:
# mount -F hsfs -o ro /dev/dsk/c0t6d0s2 /mnt |
Unmount a USB mass storage device.
# umount /mount-point |
Eject the device.
# eject /dev/[r]dsk/cntndnsn |
This procedure describes how to remove a hot-pluggable USB device without vold running.
This procedure describes how to add a hot-pluggable USB device without vold running.
Add a hot-pluggable USB device into the USB port.
Verify the USB device has been added.
$ ls /dev/rdsk/cntndnsn |
You can use the cdrw command to create and extract data from audio CDs. The cdrw command is available on the Software Supplement for the Solaris 8 Operating Environment 1/01 CD.
SCSI, ATAPI, and USB CD devices are supported. Currently, the only CD-RW device supported by Sun is the Sony Spress USB CD-RW.
The CD-R or CD-RW drive must be MMC compliant.
See the cdrw man page in the Solaris on Sun Hardware Reference Manual Supplement for information on using this command.
The cdrw command works with or without vold running. See the cdrw(1) and mkisofs(1M) man pages for more information.
Insert a CD into the CD-RW device.
The CD can be any CD that the device can read.
Check that the CD-RW drive is connected properly by listing the device.
# cdrw -l Node | Connected Device | Device type ----------------------+--------------------------------+----------------- /dev/rdsk/c0t0d0s2 | SONY CD-RW CRX120E 1.0k | CD Reader/Writer |
(Optional) If you do not see the drive in the list, you might have to do a reconfiguration boot so that the system recognizes the device.
# touch /reconfigure # init 6 |
Use this procedure to add a hot-pluggable USB camera.
Plug in and turn on the USB camera.
The USB subsystem and the SCSA subsystem create a logical device for the camera. After the camera is plugged in, output is written to the console window and the /var/adm/messages file.
Examine the output written to the console window.
Examining this output enables you to determine what logical device was created so that you can then use that device to access your images. The output will look 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 |
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 Intel system.
For example, to mount the file system on an Intel 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 “Mounting and Unmounting File Systems (Tasks)” in System Administration Guide, Volume 1.
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 & |
Unmount the file system before disconnecting the camera.
Unmount the file system by executing the following command:
% umount /mnt |
Turn off and disconnect the camera.