Resizing VM disk

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
tgfde
Posts: 233
Joined: Thu May 12, 2011 7:55 am

Resizing VM disk

Post 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.
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Resizing VM disk

Post 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.
Nicholas Scott
Former Nagios employee
tgfde
Posts: 233
Joined: Thu May 12, 2011 7:55 am

Re: Resizing VM disk

Post 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.
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Resizing VM disk

Post by agriffin »

Try running 'vgscan' and then 'pvresize /dev/sda2' again.
tgfde
Posts: 233
Joined: Thu May 12, 2011 7:55 am

Re: Resizing VM disk

Post 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.
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Resizing VM disk

Post by agriffin »

Can you post the partition table? Run the following command to print it to a console:

Code: Select all

fdisk -l /dev/sda
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Resizing VM disk

Post 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?
tgfde
Posts: 233
Joined: Thu May 12, 2011 7:55 am

Re: Resizing VM disk

Post 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
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Resizing VM disk

Post by agriffin »

Try resizing the partition again, it doesn't seem to be big enough.
tgfde
Posts: 233
Joined: Thu May 12, 2011 7:55 am

Re: Resizing VM disk

Post 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.
Locked