How to Reduce Logical Volume in Linux LVM
In this tutorial we learn how to reduce LV Size in linux.
Let’s take an example we have a
LVM filesystem ‘ /dev/testvg/testlv’ with 5GB size which is mounted on /testlvm and we want to
reduce this size to 3GB.
For this activity we need to unmount the filesystem using the below command.
# umount /testlvm
Now we need to check the filesystem for filesystem health using the below command.
#e2fsck –f /dev/testvg/testlv
After checking the filesystem successfully we need to resize the filesystem using the below command.
# resize2fs /dev/testvg/testlv 3G
After executing the above command we execute the below command to reduce the filesystem.
That’s it,after executing the above command our LV Size is reduced and then we need to remount filesystem and check the LV Size using the below commands.
# mount /testlvm
# df –h /testlvm
If this article is helpful please share and subscribe it.
0 comments:
Post a Comment