📕 Node [[expanding volumes on centos]]
- [[CentOS]] [[LVM]]
-
Summary:
-
df -h
-
find the volume that needs expanding
- /dev/mapper/Volume00-mailman_lv
- 94GÂ 89GÂ 564M 100% /mailman
-
lvdisplay
-
find the real name
- —- Logical volume
- PV Name       /dev/sdc1
- VG Name       Volume00
- PV Size       30.00 GB / not usable 1.97 MB
- Allocatable     yes
- PE Size (KByte)Â Â Â 4096
- Total PEÂ Â Â Â Â Â Â 7679
- Free PEÂ Â Â Â Â Â Â 242
- Allocated PEÂ Â Â Â Â 7437
- PV UUIDÂ Â Â Â Â Â Â 7Hxg1t-954M-8Zvi-Hq2T-Y3qB-AQ7N-yBDZcr
-
fdisk /dev/sdb
-
p (print partition table)
- Disk /dev/sdb: 164.1 GB, 164120100864 bytes
- 255 heads, 14 sectors/track, 89789 cylinders
- Units = cylinders of 3570 * 512 = 1827840 bytes
- Device Boot   Start    End   Blocks Id System
- /dev/sdb1       1   89789 160272384 8e Linux LVM
-
n (create new partition)
- p (primary)
- Partition number (1-4)
- First cylinder (1+previous partition’d end cylinder)
- Last cylinder (can specify size (+20G) or # of cylinders (+))
-
t (set partition type)
- Select partition number
- Hex code (8e for Linux LVM)
- w (write)
- Reboot
- pvcreate /dev/sda3 (The partition # you just created)
- vgextend Volume00 /dev/sda3
- lvextend -L+2G /dev/Volume00/LogVol06
- resize2fs /dev/Volume00/LogVol06
Rendering context...