Next | Prev | Up | Top | Contents | Index

Growing an EFS Filesystem Onto Another Disk

The following steps show how to grow a fictional /work EFS filesystem onto an lv logical volume created out of the /work disk partition and a new disk. The procedure assumes that the new disk is installed on the system and partitioned.

Caution: All files on the new disk are destroyed by this procedure.

  1. Make a backup of the filesystem you are going to extend.

  2. Place an entry in the file /etc/lvtab for the logical volume. The entry should look something like this:

    lv0:Project Volume:devs=/dev/dsk/dks0d2s7,/dev/dsk/dks0d3s7

    An /etc/lvtab entry is made up of several colon-separated fields. In the above example:

    lv0

    The device name of the logical volume. It must be lv followed by a single digit.

    Project Volume

    The volume label. This field is optional, but may be useful for commands to verify the volume associated with the device.

    devs=/dev/dsk/dks0d2s7,/dev/dsk/dks0d3s7


    The disk partitions that make up the logical volume. The first partition must be the existing partition.

    This example shows a logical volume composed of two disk partitions, but it could be made up of several partitions. The only limit is the maximum size of a filesystem, 8 GB. For more information on /etc/lvtab entries, see the section "Creating Entries in the /etc/lvtab File" in Chapter 8. When using a logical volume to extend an existing filesystem, the logical volume cannot be striped.

  3. Change the entry for /work in the file /etc/fstab to read:

    /dev/dsk/lv0 /work efs rw,raw=/dev/rdsk/lv0 0 0

  4. Unmount the /work filesystem:

    # umount /work

  5. Run the mklv command with the device name of the logical volume as an argument to create the logical volume:

    # mklv -f lv0

  6. Run lvck to check the new logical volume:

    # lvck /dev/rdsk/lv0

  7. Grow the filesystem into the logical volume with the growfs command:

    # growfs /dev/rdsk/lv0

  8. Run fsck on the expanded filesystem:

    # fsck /dev/rdsk/lv0

  9. Mount the logical volume:

    # mount /work

You can repeat this expansion process indefinitely. You can always add a new disk, add its name to the lvtab entry, and then rerun mklv and growfs to further expand the filesystem.



Next | Prev | Up | Top | Contents | Index