LVM

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

LVM

Post by Fred Kroeger »

Is there a reason why the NLS VM isn't built with LVM disks ?
I wanted to reduce the root disk down from the default 100Gb to 50GB and mount /usr/local/logserver on a separate disk.
I've been bitten too many times where the apps have filled the root disk.
But not having LVM makes it *really* hard.

Any ideas on how I can do this ?

Regards... Fred
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: LVM

Post by jolson »

Any ideas on how I can do this ?
The first step is decreasing the size of your physical true root partition. After we have this part handled, adding another disk should be trivial.

Steps shrink your root partition.
0. Backup any data you'd like to save.

1. Boot into a live CD environment. I recommend using a CentOS 6 CD and choosing the 'rescue a system' option.

2. Be sure to use the 'skip' option so that the root filesystem isn't mounted.

3. Resize the root filesystem.

Code: Select all

resize2fs -p /dev/sda1 50G
Gparted could also be used as the live boot medium: http://gparted.org/

After the root partition has been resized appropriately, let me know and we'll get your new partition added and mounted. Thanks!
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: LVM

Post by Fred Kroeger »

Thanks for that. What I really wanted to know was if there is a reason why LVM isn't used for the default NLS VM. It is used for the NagiosXI VM.

BTW - I successfully reduced the root disk to 50GB used gparted and moved /usr/local/nagios/logserver to a LVM partition I created on the second half of the disk.
Now , if I ever (or when) need to grow the logserver filesystem I can easily add another disk to the VG.

regards

Fred
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: LVM

Post by jolson »

Thanks for that. What I really wanted to know was if there is a reason why LVM isn't used for the default NLS VM. It is used for the NagiosXI VM.
Ultimately the build processes are different internally - XI is the only product of ours that ships with LVM support out of the gate. Of course if you stand up a server manually and run our 'fullinstall' script (from any of our products) you'll have LVM support with little hassle - as for our disk images, getting them all on LVM is something that is being worked toward - but it's going to take some time on our end.

Jesse
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: LVM

Post by Fred Kroeger »

Thanks for the update Jesse.
I can only encourage Nagios to build all their VMs in a standard & consistent manner, so no matter which Nagios product I use, they all look the same underneath.

regards... Fred
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: LVM

Post by hsmith »

I agree completely. It's been brought up to the developers, and I hope it gets done sooner than later, but right now bugfixes and feature requests take up a lot of the development time. LVM is pretty important, so you have a completely valid suggestion.
Former Nagios Employee.
me.
Locked