Two devices mounted on the same mountpoint?

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?


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.