This exact situation has happened to me due to the following scenario:
I rsync parts of my system nightly onto an external esata drive mounted in the file system. If something hiccups and the drive gets unmounted, the backup is done onto the root file system at the mount point, and then when the drive gets remounted the files on the root system are hidden in just the way just as you described you described. The script now looks at what is mounted on the file system before rsync runs.
It's obvious once you see it (just like mathematics).
Cheers, Michael
On 15-12-23 12:00 PM, roundtable-request@muug.mb.ca wrote:
Send Roundtable mailing list submissions to roundtable@muug.mb.ca
To subscribe or unsubscribe via the World Wide Web, visit http://www.muug.mb.ca/mailman/listinfo/roundtable or, via email, send a message with subject or body 'help' to roundtable-request@muug.mb.ca
You can reach the person managing the list at roundtable-owner@muug.mb.ca
When replying, please edit your Subject line so it is more specific than "Re: Contents of Roundtable digest..."
Today's Topics:
1. "Missing" disk space (Adam Thompson)
Message: 1 Date: Tue, 22 Dec 2015 12:02:05 -0600 From: Adam Thompson athompson@avant.ca To: roundtable@muug.mb.ca Subject: [RndTbl] "Missing" disk space Message-ID: CAFGv8b9jCKjwVhRjJLWm7cSWz9GoxQ5ZYO+AE_gCRsU0rhP8Vg@mail.gmail.com Content-Type: text/plain; charset="utf-8"
Documenting for posterity, and in case anyone else runs into the same problem:
I ran into a situation today where df(1) showed me a filesystem that was getting pretty full (109GB used out of 146GB), but when I used du(1) to find the space hogs, it was only able to locate <30GB of data on the partition.
(Hint: it was the root partition.)
The culprit turned out to be 87GB of files "hidden" underneath mountpoints. If you create /mnt/xyz, copy files into /mnt/xyz/*, then mount another filesystem (local or remote) at /mnt/xyz, the original files are still there, still taking up disk space, but unavailable.
Luckily, this was a Linux system, and I was able to get access to those files using a rebind mount:
- mkdir /tmp/xyz"
- "mount -o rebind /dev/mapper/root_lv /tmp/xyz"
- "cd /tmp/xyz/mnt/xyz"
- "du -sh *"
...yup, there's 87GB of files that I *don't* see under /mnt/xyz.
It's pretty obvious that the files were intended to live on a remote fileshare, but got copied in at a point in time when the remote filesystem wasn't mounted. Now I'm mv(1)'ing 87GB of data back across to a Windows server across a CIFS mount... time to go for lunch, I guess!
[image: Avant logo] *Adam Thompson* Senior Systems Administrator *voice:* 204.789.9596 x24 | *email:* athompson@avant.ca | *web:* avant.ca