looking at the files hidden under a filesystem mount…

I ran into a server that showed 83% used on the / filesystem.



du -ak | sort -nr | more

showed no files or folders using the space.

The server had a back history of a missing mount, which had caused the filesystem to fill up to 100%. I suspected that the now-mounted filesystem was hiding folders and files under the mount point, that had not been deleted. How to look at these files, and better yet delete them if they existed? This is on Ubuntu Server 12.04.

mkdir /tmp/rootfilesys
mount --bind / /tmp/rootfilesys

cd /tmp/rootfilesys
du -ak | sort -nr | more

and the command showed a tree of files and folders under a directory that should only have been a mount point.

I deleted the directories under my mount point using

rm -rf /tmp/rootfilesys/mountpoint/

and this worked, the filesystem space was recovered without affecting the mounted filesystem at all…

Instant Nagios Starter (book)

Screen Shot 2013-07-17 at 2.12.54 PM

Six weeks or so ago I was struggling to discover the documentation to set up nagios on (drumroll) a Mac Mini. Yes, Mac OS X 10.8.1. I found a write up… And it didn’t quite work. Another write up covered the missing details of the first write up. Eventually I got it up and running […]

Continue reading...

wget and then clean up links in php website


I am helping a friend set up a wordpress website. She found a website that she like the structure and look of. I wanted to capture the site including links and each individual page as a reference for what she likes and how to build the site for her. I won’t copy it, but I […]

Continue reading...

vi(m) tricks


I had copied a section of text from a pdf. When I pasted it into an email I got: insurance against loss or damage by fire, including an extended coverage endorsement, for all buildings and personal property which comprise the Property. Owner agrees to maintain property liability insurance in full force and effect during the […]

Continue reading...

updating iLO, HP’s Integrated Lights Out Connection

iLo Web Interface

I was handed an HP server to rebuild. The server had rebooted for no logged reason. Two other servers bought at the same time and built with the same OS and firmware had also experienced this spontaneous reboot. These had been rebuilt and the rebuild at updated firmware and updated Ubuntu version had resolved the […]

Continue reading...

monitor mongodb from nagios

I was asked to find a way to alert if the PRIMARY server in our mongodb replicaset changed… I found check_mongodb.py from the mongodb documentation and google search. Grab the check_mongodb.py file from https://github.com/mzupan/nagios-plugin-mongodb. Also here are the install instructions and the nagios configurations. I installed the check_mongodb.py file and tried it: ./check_mongodb.py No module […]

Continue reading...

finding mongodb primary server

I found a monitor for when the PRIMARY of a mongodb replica set changes – but how to determine which server actually is primary? Well, this can be done on the command line… root@server:/opt/mongodb/bin# ./mongo –eval “printjson(rs.status())” MongoDB shell version: 2.0.4 connecting to: { “set” : “px_mongo”, “date” : ISODate(“2013-04-01T21:13:56Z”), “myState” : 2, […]

Continue reading...

Two Instances of Dropbox on OSX


  I have a joint dropbox I share with my wife, and a personal dropbox account for professional docs. These articles, followed, allowed running two separate, easily identifiable instances of Dropbox on a MAC. Article from LifeHacker The Terran I used the preferences to set one icon as black and white, leaving the second colored […]

Continue reading...

faillog and PAM…


I just spent a couple of hours discovering faillog integration into PAM… The original ticket was to reset a user password from the ubuntu root recovery session at the console. The ticket was old-ish. The server involved was DR (Disaster Recovery). No disaster, no urgency, therefore not a priority immediately. Once the password was reset, […]

Continue reading...

networking in command line, Ubuntu 12.04 server

I created a virtual machine in vSphere to become a syslog server. I got the virtual machine created, the Ubuntu 12.04 Server iso attached and the OS installed. The next step was to created a network interface, attach it to the virtual switch and get networking (route, dns) to come up and function… I tested […]

Continue reading...