Extend Partition and Linux LVM on a virtual Server
Dear All,
I installed CentOS 5.7 from scratch on a virtual server with Disk Space ~ 20 GB. It looked like:: # fdisk -l /dev/sda Disk /dev/sda: ~ 20 GB, 255 heads, 63 sectors/track, 3263 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 268 2048287+ 82 Linux swap / Solaris /dev/sda3 269 2610 18812115 8e Linux LVM and # df Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/VolGroup00-LogVol00 18219452 2112220 15166792 13% / /dev/sda1 101086 12960 82907 14% /boot tmpfs 9239900 0 9239900 0% /dev/shm Now the Disk (Space) was extended to ~ 26GB. I created now a new partition with the fdisk command (fdisk /dev/sda) and now it looks like: # fdisk -l /dev/sda Disk /dev/sda: 26.8 GB, 26843545600 bytes 255 heads, 63 sectors/track, 3263 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 268 2048287+ 82 Linux swap / Solaris /dev/sda3 269 2610 18812115 8e Linux LVM /dev/sda4 2611 3263 5245222+ 5 Extended /dev/sda5 2611 3263 5245191 83 Linux My first question - /dev/sda4 and /dev/sda5 is more or less the same !!?? What I want to do now: Increase /dev/sda3 (from 269 to 3263 resp. from 20 GB to 26 GB), which probably means to delete /dev/sda4 and /dev/sda5 (??). Additionally/afterwards I want to increase the Logival Volume. I would appreciate if somebody can tell me how to do it - as I'm not so familiar with this stuff please give the neccessary commands (as much detailed as possible). I've tried a a pvresize and lvextend (""pvresize -v /dev/sda3"" and ""lvextend -l 574 /dev/mapper/VolGroup00-LogVol00""), but this was probably bullshit. Thanks Stefan Not sure if you need the following information: # pvdisplay /dev/sda3 /dev/hdc: open failed: No medium found --- Physical volume --- PV Name /dev/sda3 VG Name VolGroup00 PV Size 17.94 GB / not usable 3.21 MB Allocatable yes (but full) PE Size (KByte) 32768 Total PE 574 Free PE 0 Allocated PE 574 PV UUID vMZrO2-kCRT-nTjU-Gzgn-WI3m-qZON-VohByg # vgdisplay -v Finding all volume groups /dev/hdc: open failed: No medium found Finding volume group "VolGroup00" --- Volume group --- VG Name VolGroup00 System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 4 VG Access read/write VG Status resizable MAX LV 0 Cur LV 1 Open LV 1 Max PV 0 Cur PV 1 Act PV 1 VG Size 17.94 GB PE Size 32.00 MB Total PE 574 Alloc PE / Size 574 / 17.94 GB Free PE / Size 0 / 0 VG UUID dGXirw-lvMH-Py00-PqcR-4oUt-13Fo-SA9QbS --- Logical volume --- LV Name /dev/VolGroup00/LogVol00 VG Name VolGroup00 LV UUID o1Bgui-kLxB-dyHK-ecH2-v1Ss-QVCc-bduCPR LV Write Access read/write LV Status available # open 1 LV Size 17.94 GB Current LE 574 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:0 --- Physical volumes --- PV Name /dev/sda3 PV UUID vMZrO2-kCRT-nTjU-Gzgn-WI3m-qZON-VohByg PV Status allocatable Total PE / Free PE 574 / 0 # lvdisplay /dev/mapper/VolGroup00-LogVol00 /dev/hdc: open failed: No medium found --- Logical volume --- LV Name /dev/VolGroup00/LogVol00 VG Name VolGroup00 LV UUID o1Bgui-kLxB-dyHK-ecH2-v1Ss-QVCc-bduCPR LV Write Access read/write LV Status available # open 1 LV Size 17.94 GB Current LE 574 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:0 |
Please do not post questions more than once. See reply in your other thread.
|
All times are GMT -5. The time now is 05:56 AM. |