You are here: Foswiki>AGLT2 Web>LVMResize (23 May 2017, BobBall)Edit Attach

Resizing LVM Partitions

Some CERN systems were built with little space in /, with the bulk of the space in /home. However, this means HTCondor, that wants at least 10GB free in the partition where /tmp lives, often cannot run a job. The following procedure takes space out of /home, and puts it into /.

Caveats

  • HTCondor was stopped
  • The /home partition was umounted for those operations (see cookbook below)

Cookbook

  • Do the /home volume size reduction
    • umount /home
    • e2fsck -fy /dev/mapper/vg_pcatum15-lv_home
    • # Size was 405GB, make it 205GB
    • resize2fs /dev/mapper/vg_pcatum15-lv_home 205G
    • # Now reduce the logical volume by the 200GB
    • lvreduce -L -200G /dev/mapper/vg_pcatum15-lv_home
    • # Match everything up for remount consistency
    • resize2fs /dev/mapper/vg_pcatum15-lv_home
    • mount -av

  • Now, let's work on the root volume
    • lvdisplay /dev/mapper/vg_pcatum15-lv_root
    • # Grow it by the 200G we just saved
    • lvextend -L +200G /dev/mapper/vg_pcatum15-lv_root
    • # Make sure that 'df' can see this. This is the slowest step
    • resize2fs /dev/mapper/vg_pcatum15-lv_root

References

-- BobBall - 23 May 2017
Topic revision: r1 - 23 May 2017, BobBall
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 Foswiki? Send feedback