Previous Table of Contents Next


Mounting a pcfs Diskette

You can mount a pcfs diskette that was formatted using the fdformat -d command, or a DOS diskette that was formatted on a DOS system. When you mount a pcfs file system, you can create, read, write, and delete files in the file system using SunOS file utilities, subject to DOS naming conventions. See the pcfs(7) manual page for more information about the format and features of the pcfs file system.

To mount a pcfs file system from a diskette:

1.  Insert the pcfs diskette in the drive.
2.  Become superuser.
3.  Type mount -F pcfs /dev/diskette mount-point and press Return. The file system is mounted on the mount-point you specify.

You can mount a pcfs file system with different mount options (for example, -o rw). See the mount_pcfs(1M) manual page for a description of the options that can be included in the list.

If you use pcfs diskettes frequently, you may want to add this entry to your /etc/vfstab file:

/dev/diskette   -    /pcfs    pcfs   -   no   rw

Create a directory named /pcfs to use as the mount point for the diskette. With the mount point and the entry in the /etc/vfstab file, you can mount a pcfs diskette by becoming superuser and typing mount /pcfs and pressing Return. Once the diskette is mounted, you can use any of the SunOS file utilities such as cp or mv to copy files to and from the diskette.

Unmounting a pcfs Diskette

When you are done with the pcfs diskette, you must unmount it before you can eject it. To unmount the diskette, type umount mount-point and press Return. To eject the diskette, type eject and press Return.

Administering Disks

The following sections describe the SunOS 5.x disk naming conventions, commands for finding disk information (du, prtvtoc), and how to repair or replace a bad disk.

Disk-Naming Conventions

The SunOS 5.x disk-naming conventions are different from the SunOS 4.x disk-naming conventions. This section describes the new disk-naming conventions; these are based on logical (not physical) device names. SunOS 5.x disks have both block and raw (character) device files. The device name is the same, regardless of whether the command requires the block or raw device file.

Instead of using an r to the beginning of the disk device name (the naming convention in the SunOS 4.x system software), each type of device file has its own subdirectory in /dev: /dev/dsk (the block interface) or /dev/rdsk (the raw interface).

Some commands, such as mount, use the block interface device name from the /dev/dsk directory to specify the disk device. Other commands, such as newfs, require the raw interface device name from the /dev/rdsk directory to specify the disk device.

The device name you use to identify a specific disk with either type of interface depends on the controller type: bus-oriented (SCSI or IPI) or direct.

Using Disks with Bus Controllers

Figure 3-9 shows the device-naming convention for disks with bus controllers.


Figure 3-9  Naming convention for disks with bus controllers.

Each file system on a disk is assigned to a slice&#; a group of cylinders set aside for use by that file system. To specify a slice ( partition) on a disk with a bus controller (either SCSI or IPI ), use a device name with these conventions: /dev/dsk/cWtXdYsZ (the block interface) or /dev/rdsk/cWtXdYsZ (the raw interface).


NOTE:  SunOS 5.x disk device names use the term slice (and the letter s in the device name) to refer to the slice number. Slice is simply another name for a disk partition.

Here are some guidelines for determining the values for the device file name:

  If you have only one controller on your system, W is always 0.
  For SCSI controllers, X is the target address set by the switch on the back of the unit.
  Y is the number of the drive attached to the target. If the disk has an embedded controller, Y is always 0.
  Z is the slice (partition) number, with a value ranging from 0 to 7. To specify the entire disk, use slice 2. Table 3-8 shows conventional assignments of slice (partition) numbers for the disk on which root is found.
Table 3-8 Customary Assignments of Slices for Disk with Root

Slice File System Use
0 root Operating system
1 swap Virtual memory space
2 - Entire disk
3-5 Available for use according to your administrative policy
6 /usr Executable programs, program libraries, and documentation

Table 3-9 shows some examples of raw device names for disks with bus-oriented controllers.

Table 3-9 Examples of Device Names for Disks with Bus-Oriented Controllers

Device Name Description
/dev/rdsk/c0t0d0s0 Raw interface to the first slice (root) on the first disk at the first SCSI target address on the first controller.
/dev/rdsk/c0t0d0s2 Raw interface to the third slice (which represents the whole disk) on the first disk at the first SCSI target address on the first controller.
/dev/rdsk/c0t1d0s6 Raw interface to seventh (/usr) slice on the first disk at the second SCSI target address on the first controller.


Previous Table of Contents Next