You can access information on removable media with or without using volume management. For information on accessing information on removable media with GNOME's File Manager, see the GNOME desktop documentation.
Volume management (vold) actively manages all removable media devices. So, any attempt to access removable media with device names such as /dev/rdsk/cntndnsn or /dev/dsk/cntndnsn will be unsuccessful.
You can access all removable media with different names. The following table describes the different media names that can be accessed with or without volume management.
Table 3–1 Removable Media Names
Media |
Volume Management Device Name |
Volume Management Device Alias Name |
Device Name |
---|---|---|---|
First diskette drive |
/floppy |
/vol/dev/aliases/floppy0 |
/dev/rdiskette /vol/dev/rdiskette0/ volume-name |
First, second, third CD-ROM or DVD-ROM drives |
/cdrom0 /cdrom1 /cdrom2 |
/vol/dev/aliases/cdrom0 /vol/dev/aliases/cdrom1 /vol/dev/aliases/cdrom2 |
/vol/dev/rdsk/cntn[dn]/ volume-name |
USB memory stick |
/rmdisk/noname |
/vol/dev/aliases/rmdisk0 |
/vol/dev/dsk/cntndn/volume-name:c |
Most CDs and DVDs are formatted to the ISO 9660 standard, which is portable. So, most CDs and DVDs can be mounted by volume management. However, CDs or DVDs with UFS file systems are not portable between architectures. So, they must be used on the architecture for which they were designed.
For example, a CD or DVD with a UFS file system for a SPARC® platform cannot be recognized by an x86 platform. Likewise, an x86 UFS CD cannot be mounted by volume management on a SPARC platform. The same limitation generally applies to diskettes. However, some architectures share the same bit structure, so occasionally a UFS format specific to one architecture will be recognized by another architecture. Still, the UFS file system structure was not designed to guarantee this compatibility.
To accommodate the different formats, the CD or DVD is split into slices. Slices are similar in effect to partitions on hard disks. The 9660 portion is portable, but the UFS portion is architecture-specific. If you are having trouble mounting a CD or DVD, particularly if it is an installation CD or DVD, make sure that its UFS file system is appropriate for your system's architecture. For example, you can check the label on the CD or DVD.
Generally, most modern bus types support hot-plugging. If your system's bus type supports hot-plugging, you might only need to do step 5 below. If your system's bus type does not support hot-plugging, you might have to do the following tasks, which are described in steps 1-6 below.
Create the /reconfigure file.
Reboot the system so that volume management recognizes the new media drive.
For more information about hot-plugging devices, see Chapter 6, Dynamically Configuring Devices (Tasks).
Create the /reconfigure file.
# touch /reconfigure |
Bring the system to run level 0.
# init 0 |
Turn off power to the system.
Connect the new media drive.
See your hardware handbook for specific instructions.
Turn on power to the system.
The system automatically comes up to multiuser mode.
Occasionally, you might want to manage media without using removable media services. This section describes how to disable and enable removable media services.
Disabling these services means that you would have to mount all media manually by using the mount command.
Ensure that the media is not being used.
If you are not sure whether you have found all users of the media, use the fuser command, see How to Determine If Removable Media Is Still in Use.
Become superuser.
Select one of the following:
You can disable some or all removable media features in this release:
To prevent volumes from mounting outside of user sessions, disable the rmvolmgr service. For example:
# svcadm disable rmvolmgr |
To prevent any volume management, disable the dbus, hal, and rmvolmgr services.
# svcadm disable rmvolmgr # svcadm disable dbus # svcadm disable hal |
Disabling these services means that you would have to mount all media manually by using the mount command.
Enable removable media services.
# svcadm enable rmvolmgr # svcadm enable dbus # svcadm enable hal |
Insert the media.
List the contents of the media.
% ls /media |
Use the appropriate device name to access information by using the command-line interface. See Table 3–1 for an explanation of device names.
This example shows how to access information on a diskette.
$ ls /media/floppy |
This example shows how to access information on a USB memory stick.
$ ls /media/usb-name |
This example shows how to access information on a DVD or CD.
$ ls /media sol_10_1008_sparc cdrom |
This example shows how to view the symbolic links on a DVD or CD.
$ ls -lL /cdrom/cdrom0 total 929 -r--r--r-- 1 root root 6557 Jul 31 2008 Copyright -r--r--r-- 1 root root 460262 Jul 31 2008 JDS-THIRDPARTYLICENSEREADME drwxr-xr-x 2 root bin 2048 Oct 27 13:20 License drwxr-xr-x 7 root root 2048 Oct 27 13:21 Solaris_10 drwxr-xr-x 2 root root 2048 Oct 27 13:21 boot -rwxr-xr-x 1 root root 257 Oct 27 12:57 installer drwxr-xr-x 5 root root 2048 Oct 27 13:21 platform |
You can access files and directories on removable media as with any other file system. The only significant restrictions are related to ownership and permissions.
For instance, if you copy a file from a CD into your file system, you are the owner. However, you won't have write permissions because the file on the CD never had them. You must change the permissions yourself.
Ensure that the media is mounted.
$ ls /media |
The ls command displays the contents of a mounted media. If no contents are displayed, see How to Access Information on Removable Media.
(Optional) Copy the files or directories.
For example, for a DVD, you would do the following:
$ cp /media/sol_10_1008_sparc/Solaris_10/Tools/add_install_client . $ ls -l -rwxr-xr-x 1 pmorph gelfs 64065 Jul 25 2008 add_install_client |
Identify the processes that are accessing the media.
# fuser -u /media |
The -u displays the user of the media.
For more information, see fuser(1M).
(Optional) Kill the process accessing the media.
# fuser -u -k /media |
The -k kills the processes accessing the media.
Killing the processes that are accessing the media should only be used in emergency situations.
Verify that the process is gone.
# pgrep process-ID |
The following example shows that the user pmorph, is accessing the /media/sol_10_1008_sparc/Solaris_10/Tools directory.
# fuser -u /media/sol_10_1008_sparc/Solaris_10/Tools /media/sol_10_1008_sparc/Solaris_10/Tools: 723c(pmorph) 316c(pmorph) |
Ensure that the media is not being used.
Remember, media is “being used” if a shell or an application is accessing any of its files or directories. If you are not sure whether you have found all users of a CD (for example, a shell hidden behind a desktop tool might be accessing it), use the fuser command. See How to Determine If Removable Media Is Still in Use.
Eject the media.
# eject media |
For example, for a CD, you would do the following:
# eject cdrom |
For example, for a USB memory stick, you would do the following:
# eject rmdisk0 |
You can view the removable device name with the eject -l command.