Decreasing the Size of an LVM Volume

You can reduce the size if an LVM data partition only. You cannot reduce the size of a root volume.

  1. Unmount the disk and reduce the filesystem using your hypervisor tools. For example:

    # umount /dev/mapper/clear_myvg-myvol
    # e2fsck -f /dev/mapper/clear_myvg-myvol
    # resize2fs /dev/mapper/clear_myvg-myvol <newsize>
  2. Shrink the underlying volume. For example:

    # lvreduce -L<new size> /dev/myvg/myvol
  3. Resize the crypto mapping so that it matches the volume size using the command hcl resize [-y] diskname, where:

    diskname is the short form of the disk name, as shown in the hcl status command. For example, myvg-myvol.

    -y makes the command non-interactive.

    # hcl resize myvg-myvol

  4. Remount the filesystem.

    # mount /dev/mapper/clear_myvg-myvol