User Tools

Site Tools


lvm_reduce_volume_size

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
lvm_reduce_volume_size [2020/04/29 22:27]
xavier created
lvm_reduce_volume_size [2020/04/29 22:30] (current)
xavier
Line 16: Line 16:
 Before working through the resizing process it’s important you first understand some basic concepts around physical volumes, volume groups, logical volumes, and the file system. Before working through the resizing process it’s important you first understand some basic concepts around physical volumes, volume groups, logical volumes, and the file system.
  
-    ​Physical Volume (PV): This can be created on a whole physical disk (think /dev/sda) or a Linux partition. +  * Physical Volume (PV): This can be created on a whole physical disk (think /dev/sda) or a Linux partition. 
-    Volume Group (VG): This is made up of at least one or more physical volumes. +  ​* ​Volume Group (VG): This is made up of at least one or more physical volumes. 
-    Logical Volume (LV): This is sometimes referred to as the partition, it sits within a volume group and has a file system written to it. +  ​* ​Logical Volume (LV): This is sometimes referred to as the partition, it sits within a volume group and has a file system written to it. 
-    File System: A file system such as ext4 will be on the logical volume.+  ​* ​File System: A file system such as ext4 will be on the logical volume.
  
 ===== LVM Resize – How to decrease or shrink the logical volume ===== ===== LVM Resize – How to decrease or shrink the logical volume =====
Line 75: Line 75:
 After you’ve either booted back to primary operating system or completed the mount, check the space shown with the ‘df’ command to confirm it has been decreased as expected. After you’ve either booted back to primary operating system or completed the mount, check the space shown with the ‘df’ command to confirm it has been decreased as expected.
  
-''​[root@CentOS7 /]# df -h +''​[root@CentOS7 /]# df -h\\ 
-Filesystem ​              ​Size ​ Used Avail Use% Mounted on +Filesystem ​              ​Size ​ Used Avail Use% Mounted on\\ 
-/​dev/​mapper/​centos-root ​ 9.8G  1.4G  8.5G  14% / +/​dev/​mapper/​centos-root ​ 9.8G  1.4G  8.5G  14% /\\ 
-devtmpfs ​                ​908M ​    ​0 ​ 908M   0% /dev +devtmpfs ​                ​908M ​    ​0 ​ 908M   0% /dev\\ 
-tmpfs                    914M     ​0 ​ 914M   0% /dev/shm +tmpfs                    914M     ​0 ​ 914M   0% /dev/shm\\ 
-tmpfs                    914M  8.6M  905M   1% /run +tmpfs                    914M  8.6M  905M   1% /run\\ 
-tmpfs                    914M     ​0 ​ 914M   0% /​sys/​fs/​cgroup +tmpfs                    914M     ​0 ​ 914M   0% /​sys/​fs/​cgroup\\ 
-/​dev/​sda1 ​               497M   ​96M ​ 402M  20% /boot +/​dev/​sda1 ​               497M   ​96M ​ 402M  20% /boot\\ 
-/​dev/​mapper/​centos-var ​ 4.8G   ​20M ​ 4.6G   1% /​mnt''​+/​dev/​mapper/​centos-var ​ 4.8G   ​20M ​ 4.6G   1% /​mnt''​\\
  
 In this example /​dev/​centos/​var is correctly showing as shrunk down from the original 10G. In this example /​dev/​centos/​var is correctly showing as shrunk down from the original 10G.
lvm_reduce_volume_size.1588199238.txt.gz · Last modified: 2020/04/29 22:27 by xavier