Am Mon, Oct 23, 2023 at 05:40:54PM +0200 schrieb hw: > On Mon, 2023-10-23 at 16:53 +0200, Christoph Brinkhaus wrote: > > Am Mon, Oct 23, 2023 at 04:17:11PM +0200 schrieb hw: > > > Hi, > > > > > > I have an entry in the fstab to mount an NFS share via IPv6. For > > > unknown reasons, the entry is being ignored on boot, so after booting, > > > I have to log in as root and do a 'mount -a' which mounts the share > > > without problems. > > > > > > The entry in the fstab looks like this: > > > > > > > > > [fd53::11]:/srv/example /home/example/foo nfs > > > _netdev 0 0 > > > > > > > > > I have another case in which machines need to be connected to a > > > particular VLAN to mount home directories. In case they are not > > > connected to that VLAN, I don't want the boot process to proceed at > > > all because the home directories won't be available. > > > > You might need the "late" option of mount. Its purpose is to mount when > > prerequisites as the network are available already. > > There doesn't seem to a 'late' option in the man pages. Having > '_netdev' is supposed to make sure that the network is up before > mounting ...
Ups, that has been in my mind. It exists in FreeBSD but not in Debian. > > I found this, though: > https://unix.stackexchange.com/questions/349264/fstab-mount-wait-for-network > > I'll try that, plus 'defaults'. > > > > So how do I force it that the entries in fstab are not being silently > > > ignored? I want these shares either mounted, like through like 3 > > > retries, or booting to stop when they can't be mounted. > > > > > I have never tried to implement things as 3x retries or so. > > Well, the retries are not so relevant; I'd expect that to happen > anyway. But how can I stop the booting when a mount fails? > > Alternatively, how can I prevent booting or have the machine becoming > inaccessible when it's not connected to a particular VLAN? Like the > users can't log in and instead get a message that the computer is > incorrectly connected ... > You could start a crontab job to check the status some time after boot or create a systemd unit after almost everything has been finished. Kind regards, Christoph
signature.asc
Description: PGP signature