The document shows commands used to extend an LVM volume group and logical volume on a Linux system. It starts by creating a physical volume on /dev/sda3, extends the existing volume group centos to include it, and then extends the logical volume centos/root into the new space. It resizes the filesystem on centos/root to use the entire extended logical volume size.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
109 views
Resize Disk Linux
The document shows commands used to extend an LVM volume group and logical volume on a Linux system. It starts by creating a physical volume on /dev/sda3, extends the existing volume group centos to include it, and then extends the logical volume centos/root into the new space. It resizes the filesystem on centos/root to use the entire extended logical volume size.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2
[root@localhost ~]# pvcreate /dev/sda3
Physical volume "/dev/sda3" successfully created.
[root@localhost ~]# vgdisplay --- Volume group --- VG Name centos System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 3 VG Access read/write VG Status resizable MAX LV 0 Cur LV 2 Open LV 2 Max PV 0 Cur PV 1 Act PV 1 VG Size <15.51 GiB PE Size 4.00 MiB Total PE 3970 Alloc PE / Size 3970 / <15.51 GiB Free PE / Size 0 / 0 VG UUID i334Gl-5cET-mc05-keyv-ydKo-0xeg-eZJCaU
[root@localhost ~]# vgextend centos /dev/sda3
Volume group "centos" successfully extended [root@localhost ~]# pvscan PV /dev/sda2 VG centos lvm2 [<15.51 GiB / 0 free] PV /dev/sda3 VG centos lvm2 [<44.00 GiB / <44.00 GiB free] Total: 2 [59.50 GiB] / in use: 2 [59.50 GiB] / in no VG: 0 [0 ] [root@localhost ~]# lvdisplay --- Logical volume --- LV Path /dev/centos/swap LV Name swap VG Name centos LV UUID Y9GeJo-p7dp-k3z5-12UP-8F6c-i34W-zFJX9C LV Write Access read/write LV Creation host, time localhost, 2020-11-18 16:45:05 +0700 LV Status available # open 2 LV Size <3.91 GiB Current LE 1000 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 8192 Block device 253:1
--- Logical volume ---
LV Path /dev/centos/root LV Name root VG Name centos LV UUID sJrdq8-uGfL-OsD0-9nFb-irx0-APLT-k2SBUB LV Write Access read/write LV Creation host, time localhost, 2020-11-18 16:45:06 +0700 LV Status available # open 1 LV Size 11.60 GiB Current LE 2970 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 8192 Block device 253:0