How to extend and reduce the size for the LVM

To extend and reduce the size for the LVM is very critical part and it can cause the file system corruption issue therefore while running the following commands make sure that you have selected the correct LVM mapper.

To decrease the LVM size run the following command as a root user.

[root@linux ~]# lvreduce -L1G /dev/testLVM/undertestLVM1

In above example we have decreased the LVM by 1G

To increase the LVM size run the following command as a root user.

[root@linux ~]# lvextend -L1.5G /dev/testLVM/undertestLVM1

In above example we have increased the LVM size by 1.5G

Now check the size of LVM

lvdisplay /dev/testLVM/undertestLVM1
Note : DO NOT TOUCH DECREASE MAIN LVM MAPPER ELSE SERVER FILE SYSTEM WILL CRASH.

About Anant 386 Articles
Senior technical writer