Next | Prev | Up | Top | Contents | Index

Making an EFS Filesystem

The procedure in this section explains how to make a filesystem on a disk partition or on a logical volume and mount it. (See From or Chapter 8, "Creating and Administering lv Logical Volumes," for information on creating logical volumes.) This procedure assumes that the disk or logical volume is empty. If it contains valuable data, the data must be backed up because it is destroyed during this procedure.

Tip: You can make an EFS filesystem on a disk partition using the Disk Manager in the System Toolchest. For information, see the section "Formatting, Verifying, and Remaking Filesystems on a Fixed Disk" in Chapter 6 of the Personal System Administration Guide.

Caution: When you create a filesystem, all files already on the disk partition or logical volume are destroyed.

  1. Identify the device name of the partition or logical volume where you plan to create the filesystem. This is the value of partition in the examples below. For example, if you plan to use partition 7 (the entire disk) of a SCSI option disk on controller 0 and drive address 2, partition is /dev/dsk/dks0d2s7. For more information on determining partition, see Table 1-4, the section "Introduction to Logical Volumes" in Chapter 6, and the dks(7M) reference page.

  2. If the disk partition is already mounted, unmount it:

    # umount partition

    Any data that is on the disk partition is destroyed (to convert the data rather than destroy it, use the procedure in the section "Converting a Filesystem on an Option Disk From EFS to XFS" in this chapter instead).

  3. Create a new filesystem with the mkfs command, for example,

    # mkfs -t efs /dev/rdsk/dks0d2s7

    The argument to mkfs is the block or character device for the disk partition or logical volume. You can use either the block device or the character device.

    In the above example, mkfs uses default values for the filesystem parameters. If you want to use parameters other than the default, you can specify these on the mkfs command line. See the mkfs_efs(1M) reference page for information about using command line parameters and proto files.

  4. To use the filesystem, you must mount it. For example,

    # mkdir /rsrch

    # mount /dev/dsk/dks0d2s7 /rsrch

    For more information about mounting filesystems, see the section "Manually Mounting Filesystems" in Chapter 5.

  5. To configure the system so that this filesystem is automatically mounted when the system is booted up, add an entry in the file /etc/fstab for the new filesystem. For example,

    /dev/dsk/dks0d2s7 /rsrch efs rw,raw=/dev/rdsk/dks0d2s7 0 0

    For more information about automatically mounting filesystems, see the section "Mounting Filesystems Automatically With the /etc/fstab File" in Chapter 5.



Next | Prev | Up | Top | Contents | Index