autogeneration of .system fails for fstab

Kernels & Hardware, configuring network, installing services

autogeneration of .system fails for fstab

Postby DoubleHP » 2017-03-26 22:22

Hello. A few issues about .system files generated by fstab at boot.

I have a mount point that fails at boot; so, I had to use my cam to get a message; message told me to type systemctl for details.

1: how do I keep boot logs on screen, and not removed on prompt ?

2: how do I know the real error message behind this ? Here, I see mount failed; I do not see the real mount error message:
Code: Select all
# systemctl status mnt-Leon_Host_Big2.mount
â mnt-Leon_Host_Big2.mount - /mnt/Leon_Host_Big2
   Loaded: loaded (/etc/fstab; generated; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2017-03-26 23:25:23 CEST; 1min 16s ago
    Where: /mnt/Leon_Host_Big2
     What: sshfs#user@server:/mnt/Leon_Host_Big2
     Docs: man:fstab(5)

Mar 26 23:25:23 leon-03 systemd[1]: Mounting /mnt/Leon_Host_Big2...
Mar 26 23:25:23 leon-03 systemd[1]: mnt-Leon_Host_Big2.mount: Mount process exited, code=exited status=1
Mar 26 23:25:23 leon-03 systemd[1]: Failed to mount /mnt/Leon_Host_Big2.
Mar 26 23:25:23 leon-03 systemd[1]: mnt-Leon_Host_Big2.mount: Unit entered failed state.

When I run mount manually after boot, it goes fine.

An other mount point depends on this one; say, it's
/mnt/Leon_Host_Big2/subdir/foo /home/foo none defaults,bind 0 0
The issue is that when building the dep tree, systemctl will find the source folder does not exists; so, it will create it: /mnt/Leon_Host_Big2/subdir even when I remove this folder from /mnt/Leon_Host_Big2 it's re-created after reboot. I think this is the reason why mounting /mnt/Leon_Host_Big2 fails, probably because target is not empty, because subdir was created by some stupid script. If I comment the fstab line about foo, then, Big2 is mounted correctly. And once Big2 failed, foo is detected to depend on Big2, and also fails. So, it's clever enough to detec the dependency between the two mount points ( see ... mount.html ) but, a bit too clever, and thinks it can create missing folders at the time of parsing fstab, without letting Big2 bring the right folders in.

3: how do I disable that stupid boot process to create subdir ?

It's now 3 days my server is down because of this; i was asked to change stuff and use this bind thing, and now I am stuck with this bug.

4: can I add options in fstab, for the intention of the generator ? Big2 is a network volume; in case the issue is a short timeout, and not non empty dir, I would like to increase timeout ( x-systemd.mount-timeout= is in the doc, but I don't know how to add it on the fstab line)

5: is -3- a bug I should report ?

6: I find the thinginteresting to have virtual .system files generated by a daemon, for various reasons. Where can I read about the API, if I want to write a script that will generate some as well ? My use case: I have a lot of virtualbox guests; I would like two things:
- stop writing manually a .system file for each guest (copy paste the previous one, and fix a few details)
- have a global .system file that would start-stop all guests in one shot (instead of doing it individually). Some virtualbox-guests-all.system that would depend on all guests (and would fail if any guest failed). ... s-together is not enough; he is writing a static list of PartOf; I want that list to be dynamicaly generated at runtime (a for loop, or some file*.service ... if accepted)
Posts: 25
Joined: 2016-10-09 08:55

Return to System configuration

Who is online

Users browsing this forum: No registered users and 4 guests