The following procedure works for both root and data LVM volumes. It uses the Online Resize method, so the data remains available at all times.
If you want to expand a Linux root or data partition that is not managed by LVM, see Expanding a Root Partition and Expanding a Linux Data Partition.
Extend the underlying volume using your Linux management tools.
For example, if the disk is an LVM volume called myvg-myvol
, you would use:
# lvextend -L<new size> /dev/myvg/myvol
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
Expand the filesystem using the resize2fs clear_path
command, where clear_path
is the clear text path to the disk. For a data partition, the default path is /dev/mapper/clear_diskname
. For a root partition, the clear text path is /dev/mapper/clear_htroot
.
Tip: | The clear text path is shown in the hcl status command. |
# resize2fs /dev/mapper/clear_myvg-myvol # resize2fs /dev/mapper/clear_htroot