This chapter describes the mount points and symbolic links that Volume Management creates to accommodate removable media.
This is a list of overview information in this chapter.
Volume Management provides access to all CD-ROM and diskette drives under /vol/dev:
Volume Management provides access to a system's diskette drive through subdirectories of /vol/dev; namely, diskette0 and rdiskette0.
If a system has a second diskette drive, Volume Management creates a second pair of directories named diskette1 and rdiskette1. For a third diskette drive, it would create diskette2 and rdiskette2. And so on for additional drives.
The diskette directories provide access to file systems, and the rdiskette directories provide access to raw characters. The diskettes themselves appear in subdirectories beneath the drive directories [In this and subsequent illustrations, some nodes are "grayed out" to draw attention to the other nodes. There is no structural significance to this convention; it is simply a means of highlighting.] :
The arrangement for CDs is similar, except that the block and raw directories are labelled /dsk and /rdsk, respectively, and the CD-ROM device is actually located one directory beneath them.
In the illustration above, the additional directory is named c0t6. That simply reflects a particular system's device naming conventions. The directory name on your system could be different, though it would have the same format.
The CDs themselves, however, follow a convention similar to diskettes, in that they are mounted beneath the directory belonging to their device:
As a result of this arrangement, a system with one diskette drive and one CD-ROM drive would have the following /vol/dev file system:
(Actually, /vol/dev includes an additional subdirectory named aliases, but that is described later in this section.)
To make access more convenient, Volume Management uses two special mount points, /floppy and /cdrom.
Volume Management mounts the /vol/dev/diskette0 and /vol/dev/dsk/c0t6 directories onto /floppy and /cdrom:
Because of these mount points, when you insert a diskette, you can access it under /floppy/diskette-name. Likewise, when you insert a CD, you can access it under /cdrom/cd-name.
However, these mount points depend on proper formatting. If a diskette is formatted, the mount succeeds, but if it is unformatted, the mount fails and the diskette is only available under /vol/dev/diskette0. You can format diskettes according to the instructions in the tasks "How to Format a UFS Diskette" or "How to Format a DOS Diskette".
If a system has multiple drives, they are mounted onto parallel directories such as /floppy/floppy0, /floppy/floppy1, /cdrom/cdrom0, etc.
As an additional convenience, Volume Management creates two separate sets of symbolic links:
One for file system access
One for raw device access
The symbolic links for file system access simply link the directories /floppy/floppy0 and /cdrom/cdrom0 to the diskette inserted into the first diskette drive and the CD inserted into the first CD-ROM drive:
/floppy/floppy0 --> /floppy/name --> /vol/dev/diskette0/name
/cdrom/cdrom0 --> /cdrom/cd-name --> /vol/dev/dsk/c0t6d0/cd-name
These links enable you to access floppies and CDs without knowing their names. You can use the link names, floppy0 or cdrom0, instead.
Diskettes and CDs inserted into subsequent drives would follow the naming conventions summarized in Table 11-3.
To make raw device access more convenient, Volume Management creates the aliases directory, under /vol/dev:
Beneath the aliases directory, Volume Management creates a set of symbolic links similar to those used for block access. In other words, for character access, these directories are equivalent:
/vol/dev/aliases/floppy0 --> /vol/dev/rdiskette0/diskette-name
/vol/dev/aliases/cdrom0 --> /vol/dev/rdsk/c0t6d0/cd-name
Like the symbolic links for file system access, the purpose of these links is to enable you to access a raw-character diskette or CD without knowing its name; in other words, by using the /vol/dev/aliases/floppy0 and /vol/dev/aliases/cdrom0 link names.
The example above shows only one symbolic link for diskettes and one for CDs. If your system had two diskettes or two CDs, there would be one symbolic link for each:
UFS formats are not portable between architectures, so they must be used on the architecture for which they were formatted. For instance, a UFS CD formatted 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).
Therefore, Volume Management cannot recognize and mount x86 UFS media on a SPARC platform--or SPARC UFS media on an x86 platform.
Most CDs are formatted according to the ISO 9660 standard (High Sierra File System--HSFS), which imposes no limitations on Volume Management, so incompatibility is seldom a problem with CDs.
With diskettes, UFS incompatibility can occur more often because formats can be established by the user. Be aware that if you format a UFS diskette on one architecture, you won't be able to use it on a different architecture. (For instructions, see "How to Format a UFS Diskette".)
Some CDs, particularly installation CDs, contain mixed formats; that is, part UFS, part ISO 9660. To accommodate the different formats, the CD 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. Furthermore, to make the CD usable by several different architectures (as in the case of installation, when different PROM architectures might be used to boot the system), more than one UFS format is loaded onto the CD:
When Volume Management encounters this arrangement, it simply ignores the UFS formats not specific to the local system's architecture and mounts the appropriate UFS slice and the ISO 9660 slice:
These slices appear as subdirectories both under /vol/dev/dsk/c0t6 and /cdrom/cdrom0:
$ ls /cdrom/cdrom0 S0 S2 $ ls /vol/dev/dsk/c0t6 S0 S2 |