How do you reduce or shrink the size of an LVM partition?
Table of Contents
How do you reduce or shrink the size of an LVM partition?
How to reduce LVM partition size in RHEL and CentOS
- Step:1 Umount the file system.
- Step:2 check the file system for Errors using e2fsck command.
- Step:3 Reduce or Shrink the size of /home to desire size.
- Step:4 Now reduce the size using lvreduce command.
Can you shrink LVM?
Once the file system has been reduced, we can shrink the size of the logical volume with the lvreduce command. Reduce this to the size that you want the volume to be, as specified by the -L flag. Instead if you want to reduce by a specified size, simply put a – in front of the size.
How do I resize a LVM disk?
Extend LVM manually
- Extend the physical drive partition: sudo fdisk /dev/vda – Enter the fdisk tool to modify /dev/vda.
- Modify (extend) the LVM: Tell LVM the physical partition size has changed: sudo pvresize /dev/vda1.
- Resize the file system: sudo resize2fs /dev/COMPbase-vg/root.
How do I shrink the root partition in LVM?
5 easy steps to resize root LVM partition in RHEL/CentOS 7/8…
- Lab Environment.
- Step 1: Backup your data (Optional but recommended)
- Step 2: Boot into rescue mode.
- Step 3: Activate Logical Volume.
- Step 4: Perform File system Check.
- Step 5: Resize root LVM partition.
- Verify the new size of root partition.
How do I reduce root partition in Linux?
This is the order that you will likely want to follow:
- Backup all your data.
- Boot into live environment and start GParted.
- Shrink the root partition to whatever size.
- Expand the home partition to fill in the space.
- Apply changes.
- Reboot.
How do I reduce root partition?
Making Changes to Installation Partitions
- Backup all your data.
- Boot into live environment and start GParted.
- Shrink the root partition to whatever size.
- Expand the home partition to fill in the space.
- Apply changes.
- Reboot.