[Nagiosplug-devel] RFC: check_disk trying to be clever re: mountpoints

John P. Rouillard rouilj at cs.umb.edu
Thu May 18 08:43:02 CEST 2006


In message <A658D168-E1DB-4393-90CC-963DB7E52524 at altinity.com>,
Ton Voon writes:
>Wanted an opinion on check_disk. maemigh raised a tracker where  
>check_disk was unexpectedly excluding the root filesystem: http:// 
>sourceforge.net/tracker/index.php? 
>func=detail&aid=1485816&group_id=29880&atid=397597
>
>It seems to me that the problem is in the walk_name_list function,  
>where it is trying to be clever about which filesystems actually  
>needs to be checked. This is to support "check_disk -p /etc" so that  
>this returns data for /.

I claim this is wrong. I also think it worked differently in 1.4.2.  I
have it checking for a mount point /backup where our backups are done
to a disk. We have a couple of USB disks we swap around for use, so the
device name may not be constant, but the mount point is.

  check_disk /backup

returned ok even though the disk wasn't mounted. Needless to say
backups kind of died. I am almost positive that errored with
the 1.4.2 plugins because we had a couple of reboot's where the test
failed because the disk didn't mount.

>Given that check_disk is a sysadmin tool and not a user tool, I think  
>"check_disk -p /non/existent/filesystem" should only match exact  
>filesystem names. However, this may break current usage of check_disk.

I claim the breakage was in 1.4.3.

Two ways to handle it:

  1) Make the default force the directories to be mount points and
     exit critical if they aren't. Add a flag to allow the current
     behavior. (My preferred option)

  2) Make the current operation the default and add a flag that forces
     the specified directory to me a mount point and exit critical if it
     isn't.

Having been bit by this (I was going to post it once I figured out if
it really was a regression from 1.42) I would like to see it
fixed. Right now I have to use the device name and will have to change
the test when we swap disks.

				-- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.







More information about the Devel mailing list