Extending a logical volume on linux

see man lvm, man lvextend, man resize2fs, and man ext2online

The following steps describe the procedure for extending a logical volume on linux.

  1. Most of our disk servers use LVM to partition data disks. To extend a filesystem on top of a logical volume, you must first extend the logical volume of that filesystem. For example, the following command would extend the /dev/vg1/test1 logical volume by 50GB . Note that this may be done while the logical volume is active and mounted, and there must be 50G free in the /dev/vg1 volume group.
    • lvextend -L +50G /dev/vg1/test1

The following steps describe the procedure for extending an XFS filesystem on linux. Note that the filesystem must be mounted during the operation.

see man xfs_growfs

  1. Most of our disk servers use LVM to partition data disks. To extend an XFS filesystem on top of a logical volume, you must first extend the logical volume of that filesystem. For example, the following command would extend the /dev/vg1/test1 logical volume by 50GB . Note that this may be done while the logical volume is active and mounted, and there must be 50G free in the /dev/vg1 volume group.
    • lvextend -L +50G /dev/vg1/test1
  2. After extending the underlying physical device (the logical volume) you then extend the XFS filesystem. The following command will extend the filesystem mounted at /mnt/test1 to the size of its underlying physical volume. For example, after extending /dev/vg1/test1 by 50G, the following command will extend the filesystem on /dev/vg1/test1 (which is mounted at /mnt/test1) by 50G.
    • xfs_growfs /mnt/test1

-- DevinBougie - 14 Dec 2005

This topic: Computing > WebHome > LinuxLaptop > LnxExtendLVM
Topic revision: 06 Feb 2006, DevinBougie
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding CLASSE Wiki? Send feedback