Very, very, VERY weird event

Rashkae ubuntu at tigershaunt.com
Sat Sep 27 14:03:27 UTC 2014


On 14-09-26 10:54 PM, Karl Auer wrote:
> Here's a good one.
>
> I logged into my home server to start a backup. Ran "mount" to see if
> the backup disk had mounted itself. It had - but two other USB HDDs
> normally mounted on boot were apparently not mounted! Argh! Home
> directories and a bunch of other stuff are on those drives, so this was
> a big problem.
>
> Note: The "mount" command showed no drives mounted except the internal
> HDD.
>
> I thought "darn, things will have been written to the mount points on
> the internal HDD", and sure enough, lots of files were visible under the
> mount points. So to see what sort of job I had ahead of me, I ran "du
> -s" on one of the mount points - and it said there were 57GB of data
> under it.
>
> Note: The internal HDD has one partition, of 10GB. "df -k" reported only
> 3GB used.
>
> I placed a new file in the mount point directory, and rebooted. The
> external HDDs mounted as normal - and the new file was visible on the
> mounted drive! Everything seems back to normal as far as I can tell.
>
> So it looks to me as if the drives were mounted all along, but the
> "mount" utility was not reporting them.
>
> Google is not much help because all the terms are so common (mount, USB
> etc).
>
> Is this something anyone else has seen? Are there any reliable ways to
> see what's mounted apart from the "mount" command? I stupidly didn't
> check /proc/mounts...
>
> Regards, K.
>   

I found this paragraph in the mount man page:

When the proc filesystem is mounted (say at /proc), the files
/etc/mtab and /proc/mounts have very similar contents. The for‐
mer has somewhat more information, such as the mount options
used, but is not necessarily up-to-date (cf. the -n option
below). It is possible to replace /etc/mtab by a symbolic link
to /proc/mounts, and especially when you have very large numbers
of mounts things will be much faster with that symlink, but some
information is lost that way, and in particular using the "user"
option will fail.


If I understand the information correctly, the mtab file is not assured 
to be correct, and if you need a more 'canonical' listing of current 
mount points, /proc/mtab is what you need to check.

However, I think the question of *why* your mtab wasn't up to date 
remains. The only reason I can think of is that for some reason, your 
root filesystem was read only at the time the usb discs were mounted.







More information about the ubuntu-users mailing list