You can access information on removable media with or without using volume manager. For information on accessing information on removable media with CDE's File Manager, see “Using Removable Media with File Manager” in Solaris Common Desktop Environment: User's Guide.
Starting in the Solaris 8 6/00 release, volume manager (vold) actively manages all removable media devices. This means 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 18–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 |
First, second, third Jaz drive |
/rmdisk/jaz0 /rmdisk/jaz1 /rmdisk/jaz2 |
/vol/dev/aliases/jaz0 /vol/dev/aliases/jaz1 /vol/dev/aliases/jaz2 |
/vol/dev/rdsk/cntndn/ volume-name |
First, second, third Zip drive |
/rmdisk/zip0 /rmdisk/zip1 /rmdisk/zip2 |
/vol/dev/aliases/zip0 /vol/dev/aliases/zip1 /vol/dev/aliases/zip2 |
/vol/dev/rdsk/cntndn/ volume-name |
First, second, third, PCMCIA drive |
/pcmem/pcmem0 /pcmem/pcmem1 /pcmem/pcmem2 |
/vol/dev/aliases/pcmem0 /vol/dev/aliases/pcmem1 /vol/dev/aliases/pcmem2 |
/vol/dev/rdsk/cntndn/ volume-name |
Use this table to identify which removable media name to use with specific Solaris commands.
Solaris Command |
Device Name |
Usage Examples |
---|---|---|
ls, more, vi |
/floppy /cdrom /rmdisk/zip0 /rmdisk/jaz0 /pcmem/pcmem0 |
ls /floppy/myfiles/ more /cdrom/myfiles/filea |
fsck, newfs, mkfs |
/vol/dev/aliases/floppy0 /vol/dev/rdsk/cntndn |
newfs /vol/dev/aliases/floppy0 mkfs -F udfs /vol/dev/rdsk/cntndn |
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 applies to diskettes. (Actually, some architectures share the same bit structure, so occasionally a UFS format specific to one architecture will be recognized by another architecture, but 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, which 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 its UFS file system is appropriate for your system's architecture (check the label on the CD or DVD).
You can determine whether accessing your Jaz or Zip drives changes from previous Solaris releases, depending on the following:
If you are upgrading from the Solaris 8 6/00 release to the Solaris 9 release, you can continue to access your Jaz drives and Zip drives in the same way as in previous releases.
If you are freshly installing the Solaris 9 release, you cannot access your Jaz drives and Zip drives in the same way as in previous Solaris releases.
Follow these steps if you want to access your Jaz and Zip drives in the same way as in previous Solaris releases:
Comment the following line in the /etc/vold.conf file by inserting a pound (#) sign at the beginning of the text, like this:
# use rmdisk drive /dev/rdsk/c*s2 dev_rmdisk.so rmdisk%d |
Reboot the system.
Adding a new removable media drive involves creating the /reconfigure file and rebooting the system so that volume management recognizes the new media drive.
Become superuser.
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 comes up to multiuser mode automatically.
Occasionally, you might want to manage media without the help of volume management. This section describes how to stop and restart volume management.
Make sure media is not being used.
If you are not sure whether you have found all users of the media, use the fuser command, as described in How to Find Out If Removable Media Is Still in Use.
Become superuser.
Enter the volmgt stop command.
# /etc/init.d/volmgt stop # |
Insert the media.
Check for media in the drive.
% volcheck |
Use the appropriate device name to access information by using the command-line interface. See Table 18–1 for an explanation of device names.
List the contents of the media.
% ls /media |
Access information on a diskette as follows:
$ volcheck $ ls /floppy myfile |
Access information on a Jaz drive as follows:
$ volcheck $ ls /rmdisk jaz0/ jaz1/ |
Access information on a CD-ROM as follows:
$ volcheck $ ls /cdrom solaris_9_sparc/ |
View the symbolic links on a CD-ROM as follows:
$ ls -lL /cdrom/cdrom0 total 166 drwxr-xr-x 4 root root 2048 Jul 21 05:18 MU drwxr-xr-x 4 root root 2048 Jul 21 05:18 Solaris_7_MU3 -rwxr-xr-x 1 root root 30952 Jul 21 05:18 backout_mu -rwxr-xr-x 1 root root 49604 Jul 21 05:18 install_mu |
Access information on a PCMCIA memory card as follows
$ ls /pcmem/pcmem0 pcmem0 myfiles |
You can access files and directories on removable media just like any other file system. The only significant restrictions are ownership and permissions.
For instance, if you copy a file from a CD into your file system, you'll be the owner, but you won't have write permissions (because the file never had them on the CD). You'll have to change the permissions yourself.
Make sure 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 CD, you would do the following:
$ cp /cdrom/sol_8_u3_sparc_2/Solaris_8/EA/products/Live*/README* $ ls -l -r--r--r-- 1 pmorph users 3002 May 9 08:09 README_Live_Upgrade |
For example, for a PCMCIA memory card, you would do the following:
$ cp /pcmem/pcmem0/readme2.doc . $ cp -r /pcmem/pcmem0/morefiles . |
To play musical media from a media drive attached to a system running the Solaris release, you'll need to access public domain software, such as xmcd, that is available from the following locations:
http://www.ibiblio.org/tkan/xmcd
This site includes frequent updates to the xmcd software, which includes the version of xmcd that plays on newer Sun hardware, such as the Sun BladeTM systems.
http://www.sun.com/software/solaris/freeware/pkgs_download.html
Keep the following in mind when using the xmcd software with CDDA (CD Digital Audio) support to play musical media:
Use xmcd, version 3.1 (or later) on Sun Blade systems because this version has CDDA support, which must be enabled in order to listen to CDs on these systems.
Enable CDDA by launching xmcd, clicking on the options button (it has a hammer and screwdriver on the button), and then by clicking on “CDDA playback”.
When CDDA is enabled, audio is directed to the audio device, so headphones and external speakers should be connected to the audio device and not to the media drive itself.
CDDA can be enabled on other machines too. Enabling CDDA is required for playing media on the Sun Blade systems.
Consider the following issues as well:
If you are using xmcd with standard playback on a system that does not have an internal connection from the CD-ROM to the audio device, you must insert headphones into the CD-ROM drive's headphone port.
If you are using xmcd with standard playback on a system that does have an internal connection from the CD-ROM to the audio device, you can do either of the following:
Insert headphones into the headphone port of the CD-ROM drive.
Insert headphones into the headphone port on the audio device.
If you choose #2, you must do the following:
Select the internal CD as the input device.
Make sure that Monitor Volume is non-zero.
You can do both of these from sdtaudiocontrol's record panel.
Once you install the xmcd software, you can play a musical CD simply by inserting it into the CD-ROM drive and starting the xmcd control panel.
Install the xmcd software.
Insert the media into the media drive.
Invoke the xmcd command.
% ./xmcd & |
Identify the processes accessing the media.
# fuser -u [-k] /media |
-u |
Displays the user of the media. |
|
-k |
Kills the process accessing the media. |
For more information on using the fuser command, see fuser(1M).
(Optional) Kill the process accessing the media.
# fuser -u -k /media |
Killing the process accessing the media should only be used in emergency situations.
Verify the process is gone.
# pgrep process-ID |
The following example shows that the process 26230c, owner ripley, is accessing the /cdrom/cdrom0/Solaris_8/EA/products/Live_Upgrade_1.0 directory.
# fuser -u /cdrom/cdrom0/Solaris_8/EA/products/Live_Upgrade_1.0 /cdrom/cdrom0/Solaris_8/EA/products/Live_Upgrade_1.0: 26230c(ripley) |
Make sure 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 (a shell hidden behind a desktop tool might be accessing it), use the fuser command, as described in How to Find Out 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 PCMCIA memory card, you would do the following:
# eject pcmem0 |