Page 1 of 2
Resizing VM disk
Posted: Tue Aug 02, 2011 4:50 pm
by tgfde
Resized the Virtual Disk and the partition with no problem and rebooted after the partition resized. However, when I execute the following step "Resizing the Physical Volume" with the following command:
pvresize /dev/sda2
I get the following result:
/dev/hdc: open filed: No medium found
Physical voulme "/dev/sda2" changed
1 physical volume(s)s resized / 0 physical volume(s) not resized
Thanks.
Re: Resizing VM disk
Posted: Tue Aug 02, 2011 5:05 pm
by nscott
Did the resize work? I looks like it was trying to resize hdc, but didn't work because it wasn't there, but did successfully change one disk.
Re: Resizing VM disk
Posted: Wed Aug 03, 2011 8:52 am
by tgfde
No, it di not.
# pvdisplay /dev/sda2
/dev/hdc: open failed: No medium found
--- Physical volume ---
PV Name /dev/sda2
VG Name VolGroup00
PV Size 7.90 GB / not usable 23.22 MB
Allocatable yes (but full)
PE Size (KByte) 32768
Total PE 252
Free PE 0
Allocated PE 252
Thanks.
Re: Resizing VM disk
Posted: Wed Aug 03, 2011 9:20 am
by agriffin
Try running 'vgscan' and then 'pvresize /dev/sda2' again.
Re: Resizing VM disk
Posted: Wed Aug 03, 2011 9:41 am
by tgfde
Ran both commands and received the following:
Physical volume "/dev/sda2" changed
1 physical volume(s) resized / 0 physical volume(s) not resized
However, when I did a 'pvdisplay /dev/sda2' after receiving the output above, the result is the same as the previous.
pvdisplay /dev/sda2
--- Physical volume ---
PV Name /dev/sda2
VG Name VolGroup00
PV Size 7.90 GB / not usable 23.22 MB
Allocatable yes (but full)
PE Size (KByte) 32768
Total PE 252
Free PE 0
Allocated PE 252
Then I tried resizing the logical volume with 'lvresize /dev/mapper/VolGroup00-LogVol00 /dev/sda2' and got the following result:
# lvresize /dev/mapper/VolGroup00-LogVol00 /dev/sda2
No free extents on physical volume "/dev/sda2"
No specified PVs have space available
Thanks.
Re: Resizing VM disk
Posted: Wed Aug 03, 2011 9:54 am
by agriffin
Can you post the partition table? Run the following command to print it to a console:
Re: Resizing VM disk
Posted: Wed Aug 03, 2011 10:26 am
by agriffin
Sorry, I accidentally messed with your previous post and lost the text. But it looked like you did not resize the partition correctly, could you try performing that step again?
Re: Resizing VM disk
Posted: Wed Aug 03, 2011 1:08 pm
by tgfde
Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 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 1044 8281507+ 8e Linux LVM
Re: Resizing VM disk
Posted: Wed Aug 03, 2011 3:03 pm
by agriffin
Try resizing the partition again, it doesn't seem to be big enough.
Re: Resizing VM disk
Posted: Wed Aug 03, 2011 3:54 pm
by tgfde
Are you referring to the size below not being big enough?
Disk /dev/sda: 32.2 GB, 32212254720 bytes
If so, I don't think that's the problem because our current instance of Nagios has the same partition shown below:
Production
Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 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 3916 31350847+ 8e Linux LVM
One difference I saw between the two is underlined below:
Current Instance - /dev/sda2 14 3916 31350847+ 8e Linux LVM
New Instance - /dev/sda2 14 1044 8281507+ 8e Linux LVM
Thanks.