Reduce size of LVM partition in RHEL and CentOS

Опубликовано: 29 Сентябрь 2024
на канале: Satish Tiwary
562
1

Learn how to Reduce size of LVM partition in RHEL and CentOS.
We used to reduce lvm size using lvreduce command.In this tutorial you will learn to reduce lvm sixe using lvreduce linux command line tool.
Reduce size of ext3/ext4 LVM partition in RHEL and CentOS
First we create lvm and mount it.
you can see my lvm file system size is 2G
Now if you want to reduce it's size first you have to unmount it.

Then you have to check for fule system errors using e2fsck command.
lets have a look!

Now its time to shrink the file system
I am going to shrink file system to 1G from 2G.
lets see how i will do.

Now reduce the size of lvm file system using lvreduce command.

Now check for file system error again.
Note its optional but its better to do for safer side.


now all done!
just mount your file system again and check whether your lvm get reduced to 1G from 2GB or not.

now you can see lvm file system size reduce to 1G now.
hence we have reduced lvm file system.