LVM Extend Logical Volume and Filesystem
Jump to navigation
Jump to search
Linux
Extend a Logical Volume and Filesystem
- Gather Filesystem information for the mount path
- # df -h <mount_path>
- Gather logical volume "LV", volume group "VG" information, and physical volume "Device" information
- # lvs <filesystem_path> -o +devices,stripes
- Expand underlying disk
- Follow vendors procedure to expand underlying disk
- List SCSI device sizes, determine if added space was added to the device
- # lsscsi -s
- If space was not automatically added, rescan the SCSI Bus
- # echo '- - - -' > /sys/class/scsi_host/host#/scan
- Note: host# is from the first number in lsscsi -s [2:0:0:0], this would be host2
- Resize the expanded physical volume
- # pvresize <device>
- Expand the logical volume and file system
- Using all available space
- # lvextend -l +100%FREE -r <logical_volume_path>
- Not using all available space
- # lvextend -L +<size>[M|G|T] -r <logical_volume_path>
- Using all available space
AIX
Extend a Logical Volume and Filesystem
- Gather logical volume information for the mount path
- # df -g <mount_path>
- Gather volume group "VOLUME GROUP" information from the logical volume group
- # lslv <logical_volume>
- Gather physical volume information
- # lsvg -p <volume_group>
- Expand underlying disk
- Follow vendors procedure to expand underlying disk
- Examine all the disks in the volume group to see if they have grown in size
- # chvg -g <volume_group>
- Get the maximum logical partitions "TOTAL PPs" from the volume group
- # lsvg <volume_group>
- Set the maximum number of logical partitions that can be allocated to the logical volume
- # chlv -x <maximum> <logical_volume>
- Expand the file system
- # chfs -a size=+<size>[M|G|T] <file_system>