This is topic that I tend to revisit forget… revisit…. forget…loop.
This is getting printed before we do another log google loop.
Taken from my LVM management notes. I had first used this when I imaged an 80GB drive to a 120GB drive and wanted to make use of the 40GB of free space.
1. fdisk /dev/sda then press p Code:
Disk /dev/sda: 40.0 GB, 40020664320 bytes 255 heads, 63 sectors/track, 4865 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 83 Linux /dev/sda2 14 1188 9438187+ 8e Linux LVM 2. Press d then 2 to remove the partition Code:
Disk /dev/sda: 40.0 GB, 40020664320 bytes 255 heads, 63 sectors/track, 4865 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 83 Linux /dev/sda2 14 4865 38973690 8e Linux LVM 6. Finally press w write table to disk and exit and reboot Code:
--- Volume group --- VG Name SystemVG System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 7 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 37.17 GB PE Size 4.00 MB Total PE 9515 Alloc PE / Size 2176 / 8.50 GB Free PE / Size 7339 / 28.67 GB VG UUID Bl4LEQ-R70i-3Qse-9z1p-BRcK-ibd7-2aelYx 11. Use lvdisplay to display current logical volumes Code:
--- Logical volume --- LV Name /dev/SystemVG/RootLV VG Name SystemVG LV UUID dxB6Fs-6sQr-AaLg-1zQ6-Q1f9-AN6V-cbSovF LV Write Access read/write LV Status available # open 1 LV Size 8.00 GB Current LE 2048 Segments 1 Allocation inherit Read ahead sectors 0 Block device 253:0 --- Logical volume --- LV Name /dev/SystemVG/SwapLV VG Name SystemVG LV UUID vSRWGx-zy8N-FrXK-3HP5-7pwW-F6SQ-IRJNeA LV Write Access read/write LV Status available # open 2 LV Size 512.00 MB Current LE 128 Segments 1 Allocation inherit Read ahead sectors 0 Block device 253:1 12. lvextend -l +7339 /dev/SystemVG/RootLV (you can use the following to reduce again lvreduce -l -7339 /dev/SystemVG/RootLV) Code:
--- Logical volume --- LV Name /dev/SystemVG/RootLV VG Name SystemVG LV UUID dxB6Fs-6sQr-AaLg-1zQ6-Q1f9-AN6V-cbSovF LV Write Access read/write LV Status available # open 1 LV Size 36.67 GB Current LE 9387 Segments 2 Allocation inherit Read ahead sectors 0 Block device 253:0 14. ext2online /dev/SystemVG/RootLV while the filesystem is mounted or to be safe use resize2fs /dev/SystemVG/RootLV while the filesystem is unmounted. Note: resize2fs may require running e2fsck -f /dev/SystemVG/RootLV first. |
|