Next | Prev | Up | Top | Contents | Index

Growing an XFS Filesystem Onto Another Disk

When growing an XFS filesystem onto another disk, there are two possibilities:

If the XFS filesystem is on an XLV logical volume, the additional disk can be added to the logical volume as an additional volume element. Instructions for doing this are in the section "Adding a Volume Element to a Plex (Growing a Logical Volume)" in Chapter 7.

The following steps show how to grow a fictional /disk2 XFS filesystem onto an XLV logical volume created out of the /disk2 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 additional disk are destroyed by this procedure.

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

  2. Unmount the /disk2 filesystem:

    # umount /disk2

  3. Use xlv_make to create an XLV logical volume out of the /disk2 partition and the new disk. The /disk2 partition must be the first volume element in the data subvolume. For example:

    # xlv_make

    xlv_make> vol xlv0

    xlv0

    xlv_make> data

    xlv0.data

    xlv_make> plex

    xlv0.data.0

    xlv_make> ve dks0d2s7

    xlv0.data.0.0

    xlv_make> ve dks0d3s7

    xlv0.data.0.1

    xlv_make> end

    Object specification completed

    xlv_make> exit

    Newly created objects will be written to disk.

    Is this what you want?(yes) yes

    Invoking xlv_assemble

  4. Mount the /disk2 filesystem:

    # mount /dev/dsk/xlv/xlv0 /disk2

  5. Grow the filesystem into the logical volume with the xfs_growfs command:

    # xfs_growfs /disk2

  6. Change the entry for /disk2 in the file /etc/fstab to mount the logical volume rather than the disk partition:

    /dev/dsk/xlv/xlv0 /disk2 xfs rw,raw=/dev/rdsk/xlv/xlv0 0 0



Next | Prev | Up | Top | Contents | Index