<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace">Documenting for posterity, and in case anyone else runs into the same problem:</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">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.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">(Hint: it was the root partition.)</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">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.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">Luckily, this was a Linux system, and I was able to get access to those files using a rebind mount:</div><div class="gmail_default" style="font-family:monospace,monospace">- mkdir /tmp/xyz"<br></div><div class="gmail_default" style="font-family:monospace,monospace">- "mount -o rebind /dev/mapper/root_lv /tmp/xyz"</div><div class="gmail_default" style="font-family:monospace,monospace">- "cd /tmp/xyz/mnt/xyz"</div><div class="gmail_default" style="font-family:monospace,monospace">- "du -sh *"</div><div class="gmail_default" style="font-family:monospace,monospace">...yup, there's 87GB of files that I *don't* see under /mnt/xyz.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">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!</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">
<table>
<tbody>
<tr>
<td width="141px"><img src="http://avant.ca/av/wp-content/uploads/avant_2014_email-e1391110991529.jpg" alt="Avant logo" width="141px" height="45px"></td>
<td style="font-family:helvetica;font-size:11pt"><b>Adam Thompson</b><br>
Senior Systems Administrator<br>
<b><span style="color:#bed730">voice:</span></b> 204.789.9596 x24 | <b><span style="color:#00abbc">email:</span></b> <a href="mailto:athompson@avant.ca" target="_blank">athompson@avant.ca</a> | <b><span style="color:#b41e8e">web:</span></b> <a href="http://avant.ca/" target="_blank">avant.ca</a>
</td>
</tr>
</tbody>
</table>
</div></div></div></div></div>
</div>