LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 01-03-2013, 11:00 PM   #1
fireshooter
LQ Newbie
 
Registered: Jan 2013
Posts: 3

Rep: Reputation: Disabled
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
 
Old 01-04-2013, 05:13 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
why would "nagios" use that space?? I don't understand. That's nothing at all to do with Nagios, that's just the messenger.

Note that "/" is NOT the "boot" partition. That's "/boot", hence the name

as for temp files, find them and delete them with rm. Not sure what you're after here tbh.

If it's a case of finding files which you're unaware of... here's how *I* often tack dwon random disk usage:

run "du -hx --max-depth=1 /"

read the output, look for big files / directories listed, and pick one to explore further:

run "du -hx --max-depth=1 /<somewhereelse>"

and just keep going deeper until you find a location using more space than you think it should, and manage those files in that location.
 
Old 01-04-2013, 05:20 AM   #3
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello and welcome to LinuxQuestions,

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.

Kind regards,

Eric
 
Old 01-04-2013, 05:44 AM   #4
fireshooter
LQ Newbie
 
Registered: Jan 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
Hello Eric,
thanks for the reply.

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?

Completely right,
Best regards, Kai
 
Old 01-04-2013, 05:49 AM   #5
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi Kai,

No problem. If you still have that problem, could you post the output of the following command to let us know how the file systems are set up:
Code:
df -h
Kind regards,

Eric
 
Old 01-04-2013, 06:09 AM   #6
Prehistorik
Member
 
Registered: Oct 2006
Location: St. Petersburg, Russia
Distribution: Ubuntu
Posts: 31

Rep: Reputation: 1
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.

You don't have to be root to do this.

3) Boot your VM from this live CD: http://gparted.sourceforge.net/livecd.php
4) Start GParted from the live CD graphical shell and

(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
 
Old 01-04-2013, 06:24 AM   #7
fireshooter
LQ Newbie
 
Registered: Jan 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
Hi Eric,
here ist the result:

Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00 16G 14G 1.7G 89% /
/dev/sdal 99M 18M 77M 19% /boot
tmpfs 1014M 0 1014M 0% /dev/shm

Hi Chris,
thank for your reply, but I am afraid your suggestion is already exceeding my linux skills

Hi Prehistorik,
thank you for your answer, too.
I'll keep that as an option, as I have only remote access from home this week

Best regards to all,
Kai
 
Old 01-04-2013, 06:44 AM   #8
Prehistorik
Member
 
Registered: Oct 2006
Location: St. Petersburg, Russia
Distribution: Ubuntu
Posts: 31

Rep: Reputation: 1
Fireshooter,

Your system uses LVM, so instructions from my post may not work in your case (sorry )
 
Old 01-04-2013, 06:47 AM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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".
 
Old 01-04-2013, 06:52 AM   #10
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

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.

Kind regards,

Eric
 
Old 01-04-2013, 07:01 AM   #11
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
ahh couldn't remember if the pv needing expanding too, or if it was automatic.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to extend root partition in linux jsaravana87 Linux - Server 2 05-18-2012 04:31 PM
How to extend root partition on SuSE enterprise Server 11.1 PSP Linux - Enterprise 3 04-18-2012 10:43 AM
[SOLVED] Root partition warning Shahnawaz Uqaili Linux - Newbie 17 06-06-2011 07:41 AM
How to extend root partition? pinga123 Linux - Newbie 1 06-01-2011 12:08 AM
Extend an partition Jordan Miguel Linux - General 9 04-27-2011 07:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration