I was trying to mount /dev/sdi on /mnt/mail2 and by mistake I pressed enter too early and mounted on /mnt/mail, that was already mounted with /dev/sdd.

# mount -o noatime /dev/sdi /mnt/mail

To my surprise, doing df, showed both partitions mounted.

# df -h
Filesystem            Size  Used Avail Use% Mounted on
...
/dev/sdd              163G  280M  154G   1% /mnt/mail
/dev/sdi              163G  280M  154G   1% /mnt/mail

With umount it removed first /dev/sdi and the second time /dev/sdd.

One thing to notice is that the space shown by df is actually the one of the new sdi disk, while when mounting sdd alone df says:

/dev/sdd              148G  148G     0 100% /mnt/mail

Any reason for this strange behaviour? Could it trash my data in case I didn't notice at once and did some write?

link|improve this question

70% accept rate
feedback

1 Answer

up vote 3 down vote accepted

No. The new mount completely obscures the old mount, hiding it and all its data completely. The df behavior I cannot explain; the VFS is probably just giving up too soon, and you should consider logging a bug.

link|improve this answer
interesting thank you. any reason to allow this? I was expecting it would get refused. – stivlo Oct 2 '11 at 7:28
There's no specific reason to *dis*allow it, as other than df and a bit of user confusion it doesn't cause any real issues. – Ignacio Vazquez-Abrams Oct 2 '11 at 7:30
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.