NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Multiple instances of the same mount point in fstab not possible? (want to layer multiple filesystems into one namespace via union mount option)



Hi Michael,

On 24.09.22 10:42, Michael van Elst wrote:
mp%petermann-it.de@localhost (Matthias Petermann) writes:

NAME=data1             /export   ffs     rw,log,union          0 0
NAME=data2             /export   ffs     rw,log,union          0 0
NAME=data3             /export   ffs     rw,log,union          0 0

Here, only the first file system is mounted, the other two are ignored.
I suspect that multiple occurrences of the same mount point are not
supported in fstab.

It's a feature. mount -a skips filesystems that are already mounted,
so you don't get failures from the attempt to mount a filesystem twice.
(mount -A forces all mounts).

But your example has another issue, there is no information about the
order of mounts, so you may end with filesystems stacked incompletely
or even the wrong order.

The easiest is probably to declare the filesystem 'noauto' and add
a custom rc script that creates and removes your stacked filesystems.


Thanks - I didn't know the difference between mount -a and mount -A... I have skimmed the man page several times but this detail had slipped my mind.

With the order of the mounts I assumed that the fstab is processed from top to bottom - but that is certainly not quite safe to assume. I was afraid that I would have to write my own rc.d script - but the advantage would be that I could at least influence that the mounts have to be ready before Samba and the NFS server are started.

Many greetings
Matthias


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature



Home | Main Index | Thread Index | Old Index