2 Devices mounted on one directory openSUSE 11.1 x64


I have 3 disks in my PC which are partioned equally as I use them for Raid 1.
The first partion on every disk is a simple ext2 partion for booting. No Raid there. So I mount them as /boot and /boot2 and /boot3. So I can backup my /boot to the other boot directories. That worked for some month and this morning I just want to look if all directories have enough free space left. So I did a df -h and got this:

Dateisystem          GröÃe Benut  Verf Ben% Eingehängt auf
                      6,0G  301M  5,4G   6% /
udev                  1,5G  292K  1,5G   1% /dev
/dev/sdb1             122M   29M   87M  25% /boot
/dev/sdc1              38M   21M   16M  59% /boot2
/dev/sda1             122M   29M   87M  25% /boot

As you can see /dev/sda1 and /dev/sdb1 are both mounted on /boot

Here is what mount says:

/dev/sdb1 on /boot type ext2 (ro,acl,user_xattr)
/dev/sdc1 on /boot2 type ext2 (ro,acl,user_xattr)
/dev/sda1 on /boot type ext2 (ro,acl,user_xattr)

This is no Problem for me as I could just remount it correctly, but I would like to know if this problem is known. I did not change anything by now and this PC is a server which is running 24/7, so I can deliver more debugging Information if someone is interested.

And the /etc/fstab please ?

It’s not illegal and the system doesn’t prevent it but it probably doesn’t anything useful for you. The most recent mount on the directory will hide the contents of the previous mount. No idea how you reached that situation. A typo perhaps?

Here the fstab:

/dev/sda2            swap                 swap       defaults              0 0
/dev/sdb2            swap                 swap       defaults              0 0
/dev/system/root     /                    ext3       acl,user_xattr        1 1
/dev/sda1            /boot                ext2       ro,acl,user_xattr     1 2
/dev/sdc1            /boot2               ext2       ro,acl,user_xattr     1 2
/dev/system/home     /home                ext3       acl,user_xattr        1 2
/dev/system/tmp      /tmp                 ext3       acl,user_xattr        1 2
/dev/system/usr      /usr                 ext3       acl,user_xattr        1 2
/dev/system/var      /var                 ext3       acl,user_xattr        1 2
/dev/system/backup   /backup              ext3       acl,user_xattr        1 2
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0

I’m not sure if I mounted /boot again after booting, but I thought that mounting 2 devices on one dir is not possible as it is somewhat undefined and problematic.

Mounting multiple devices on one dir is possible. Even the same device on the same dir twice.

I think you made a typo somewhere and mounted /dev/sdb1 on /boot as well. Your fstab says only /dev/sda1 should be.

Not at all. All Unix/Linux filesystems (with the exception of the first one, the / filesystem) mount on some point, which is a directory in another filesystem. If there was something underneath, too bad, it gets hidden. The only difference here is that the mount point is the top directory of the underlying filesystem. But does it harm anything, in the sense that it has unclear semantics, becomes unstable, or causes cycles in the graph? No. So it is allowed and no special case treatment is required.

OK, from the system point of view it’s clear, but from the users point of view it’s a bit strange.

Thank you very much for your answers.

Well users are already very good at confusing themselves in any event, so the system should have as few special case rules as possible. :stuck_out_tongue:

Also, another point here is that something is mounted on top of /boot
So, certain important stuff is already hidden there :wink:

personally, I’d recommend adjusting your fstab to go by disk ID.


if you ls -l the /dev you’ll see that it’s sym linked to the disk&partition. However, sym links change on occasion.