How do you extend a logical volume and its filesystem online?
IntermediateConceptStorage & Memory
Answer
sudo pvcreate /dev/sdd && sudo vgextend vgdata /dev/sdd # if VG needs space
sudo lvextend -r -L +50G /dev/vgdata/lvapp # -r resizes the FS too
# or manually:
sudo xfs_growfs /data # XFS takes the mount point
sudo resize2fs /dev/vgdata/lvapp # ext4 takes the device
Both XFS and ext4 grow online with no unmount.
More on Storage & Memory
How do you list disks, partitions and filesystems?IntermediateMBR vs GPT partition tables?IntermediateWalk through adding a new disk and mounting it permanently.IntermediateExplain the six fields of an /etc/fstab line.IntermediateWhy use UUIDs and `nofail` in fstab?IntermediateWhat does a bad fstab entry do, and how do you recover?Advanced