Page 1 of 2
VMware disk resizing
Posted: Tue May 11, 2010 4:48 pm
by tonyyarusso
We've posted a document on "Resizing the Nagios XI Virtual Machine Disk Size" in the Library, at
http://bit.ly/cUd3a2
From the description,
"Need a bigger Nagios XI VM? This guide takes you through the steps required to increase the size of your Nagios XI VMware virtual machine."
Re: VMware disk resizing
Posted: Wed May 12, 2010 8:26 am
by Box293
Tony,
I tried this tonight and I am not sure if it has completed or not. The process seemed to do nothing after the "resize2fs /dev/mapper/VolGroup00-LogVol00" command. A screenshot of all the commands I typed is as follows:
01 Before.png
02 Resizing.png
I extended the virtual disk to 30GB.
I was monitoring the VM using vCenter performance graphs, after I performed the resize2fs command there was a short spike in disk usage and then it dropped to 0. No status update on the screen. Didn't feel like anything was happening.
I could ping the Nagios XI VM however I couldn't access the web page, couldn't login via putty or via another console session (ALT + F2).
I left this for 2 hours and the VM was doing nothing. I then cold reset the VM and here is the result.
03 After.png
From what I can see it's saying the disk is now 14G in size.
What should I be doing now to ensure the disk is in correct working order and it's not corrupt?
Nagios XI still seems to be operating OK, checks are fine, performance grapsh are displaying.
Any ideas?
Re: VMware disk resizing
Posted: Wed May 12, 2010 11:11 am
by tonyyarusso
Huh. You *should* have been dropped back to a prompt after resize2fs. For some reason it looks like that never completed properly, although I have no idea why. The easiest way to check the integrity of things now is to schedule a filesystem check for the next boot:
The presence of the file /forcefsck will tell Linux to check the filesystems for errors before continuing on in the boot process. After that completes you can always try running resize2fs again and see what happens.
Re: VMware disk resizing
Posted: Thu May 13, 2010 5:36 am
by Box293
All seems OK now.
I performed the disk check as per your instructions, the server booted up OK and didn't report an issues.
I then tried the resize again and it completed rather quickly, in less than a minute.
04 Second Attempt.png
Thanks for your help.
Issue with disk space
Posted: Thu Jun 24, 2010 7:47 pm
by nets
I recently configured Nagios on a virtual machine and the used Vconverter to copy it into a new virtual machine. After copying, the max disk space I can allot that machine is 256gb, any ideas on how to take it higher?
Re: VMware disk resizing
Posted: Sun Jun 27, 2010 1:11 am
by Box293
This will have to do with the ESX Host's Datastore and the block size that was set when the Datastore was created.
The block size determines the maximum file size a virtual disk can be on that Datastore. The available block sizes are:
http://kb.vmware.com/selfservice/micros ... Id=1012683
Block Size =
Maximum File Size
1 MiB =
256 GiB
2 MiB =
512 GiB
4 MiB =
1 TiB
8 MiB =
2 TiB
To make the disk larger than 256GiB you'll need to put it on a datastore that has a blocksize of 2MiB or larger.
Re: VMware disk resizing
Posted: Mon Jun 28, 2010 9:47 am
by mmestnik
Linux Logical Volume Management uses 4M block sizes, for reference and comparison. NTFS and file systems that have many streams(LVM has one stream for each partition) use 4k blocks so allocating them in chunks of 1024(4M) blocks seams optimal as would 2048(8M)
Re: VMware disk resizing
Posted: Wed Sep 01, 2010 10:20 am
by pzygadlo
Hello,
For some reason I had to run the procedure to resize the partition twice as well before it recognized the amount of space I wanted to expand to. First is seems like it only expanded by 1.5gb instead of the 10gb I wanted it to expand by. The 1.5gb it looks like came from the /swap partition that was on there on sda2, going through the procedure deleted that swap parition. So i turned on the swap file. Anyways this bring me back to my next question, and that is, the server keeps reporting that there is no swap as follows...
***** Nagios *****
Notification Type: PROBLEM
Service: Swap Usage
Host: localhost
Address: 127.0.0.1
State: CRITICAL
Date/Time: Wed Sept 1 10:47:52 EDT 2010
Additional Info:
SWAP CRITICAL - 100% free (0 MB out of 0 MB)
In nagiosxi, the localhost swap monitoring is not turned on so this is coming from where....? ( I asume the system itself because it is only coming to the nagios box ADMIN's email), I dont see a way to get rid of this..
Help appreciated - Thanks!
Re: VMware disk resizing
Posted: Wed Sep 01, 2010 3:00 pm
by tonyyarusso
Does 'free -m' show any swap existing? After creating the swap file, are you sure you turned it on?
http://www.cyberciti.biz/faq/linux-add- ... ile-howto/ may be a useful reference. Lastly, are you *sure* there aren't any Nagios checks running for swap on localhost? How have you checked?
Re: VMware disk resizing
Posted: Wed Sep 01, 2010 11:30 pm
by pzygadlo
total used free shared buffers cached
Mem: 3042 2686 356 0 609 1380
-/+ buffers/cache: 696 2346
Swap: 1023 0 1023
localhost Current Users Yes Synced
localhost HTTP Yes Synced
localhost PING Yes Synced
localhost Root Partition Yes Synced
localhost SSH Yes Synced
localhost Total Processes Yes Synced