Nagios Root partition warning - How do I extend partition?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Nagios Root partition warning - How do I extend partition?
Hi there,
I have a Nagios system running as a VM which repeatedly warns me:
Nagios Monitoring Message
Service PROBLEM nagios.domain.local Root Partition is WARNING (179)
Output: DISK WARNING - free space: / 1920 MB (12% inode=96%): http://192.168.150.17/ | Acknowledge this problem
So I edited the VM settings and extended the available hdd size.
So far, so good.
My question is now: HOW DO I TELL NAGIOS TO USE THAT AVAILABLE HDD RESSOURCE?
I was looking for some control panel to find something like a disk manager or partition manager, but I wasn't succesful :-(
But I have totally no linux skills, I am a complete Windows admin and my Linux specialist is on vacation.
Cam someone please help me and explain in simple steps how to resize the boot partition?
Thanks in advance.
Kai
################## EDIT AFTER CHECKING AGAIN ############################
As I see in the Monitor my linux admin had same problem before and acknowledged with "temp files"
So my first thought may be wrong.
I have no access to temp files in the gui.
Who can help: How to use linux command line to delete temp files for dummies
I am seeing this:
[groundwork@NAGIOS ~]$
Last edited by fireshooter; 01-03-2013 at 11:35 PM.
Reason: new info
If I understand correctly you have a virtual machine (which platform? VMWare, VirtualBox, ...) which is running Nagios (groundwork in your case) (which OS, RedHat, Debian, Ubuntu, ...), and you're running out of space on your root (/) partition. According to your post you've added disk space to the virtual disk and it has not been detected by the operating system, hence the error does not go away. Am I correct so far? Would you mind providing the answers to my questions in () please and then we can take it from there. Looking forward to your participation in the forums.
If I understand correctly you have a virtual machine (VMware) which is running Nagios (groundwork in your case) (CentOS), and you're running out of space on your root (/) (yes) partition. According to your post you've added disk space to the virtual disk (yes) and it has not been detected by the operating system, hence the error does not go away. (yes) Am I correct so far?
You have to extend the root partition inside your guest OS too. It can be done in various ways. For example:
1) Make a back-up copy of your VM hard drive (the one with .vmdk extension)
2) Determine the number of the root partition: boot the guest and type in a command:
Code:
mount | grep 'on / type'
You'll get an output like the following:
Code:
/dev/sda2 on / type ext4 (rw,relatime,seclabel,data=ordered)
The first field (/dev/sda2 in this example) will be your root partition, and /dev/sda (without a number) will be your boot hard disk.
(a) make sure /dev/sda is selected in the top right drop-down list
(b) move all partitions after the root one to the end of the disk
(c) resize the root partition
(d) click Apply (the green checkmark toolbar button)
5) Eject the live CD ISO from the VM and reboot it
Linux skills? There are no Linux skills there, nothing more than you're probably used to in DOS.
So to add extra space, you do need to do something similar to what Prehistorik said. you actually need to do 3 things...
1) Extend the partition containing the LVM data (using a tool like gparted, parted, fdisk)
2) Extend the LVM volume to fill the extra space in the partition (using lvresize)
3) Extend the filesystem inside the LVM volume to make the space actually available (using resize2fs)
Home remote access? This is a VM right? You don't need local access to a VM, just access to the hypervisor, which it pseudo-local from teh VM perspective, adding in ISO files as cd drives etc.
One further thing to clarify is your partition table, as things like swap aren't "mounted" so aren't in teh df output. so run "fdisk -l /dev/sda".
The logical (and correct) order would be to first extend the partition, using a tool like gparted, fdisk, parted, ... as indicated already. Next you'll need to resize the LVM physical volume with pvresize which will make the space added available in the volume group. Only after that can you extend the LVM volume with lvextend / lvresize and resize finally the filesystem created on it with resize2fs.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.