systemd mounts
Hi there,
A few weeks ago I came here with a problem that not all file systems being mounted at boot time (https://www.linuxquestions.org/quest...ot-4175677301/) Turns out the probable cause, as suggested by @The Squash and @syg00 was the order the system mounts file systems and the fs that I wanted to mount depends on other fs to be mounted first (/home). This cause an erratic behavior. Sometimes it get mounted other times it don't, depending on which get mounted first. So, to fix that I moved my mounts from /etc/fstab to a unit file to get mounted by systemd. Code:
UUID=3d62e0b9-5a9c-43b2-954f-0a50077cbb25 / btrfs defaults 0 0 Code:
[Unit] I have no indication of failure, other than that strange pattern Mounted/Umounting/mount: succeeded/Umount at end of status and, of course, reported by "journalctl -b -u home-miguel-Documents.mount"... Code:
systemctl status home-miguel-Documents.mount The current mount targets in my system (openSuSE tumbleweed) are: (this one: Documents in status active is because I issued the start command in a console. Before it was inactive, like the others) Code:
systemctl list-units --type=mount --all Why I can not get theses extra filesystems get mounted at boot time 100% of time ? I appreciate any comments, cheeers, |
Why not put the mount commands in your bashrc file ( or whatever startup files u are using ) so that the disks are mounted as soon as you login
|
Quote:
Note: None of my btrfs subvolumes use that "@" notation in /etc/fstab. Your's all do. I'm wondering if that's an important difference. I'm not suggesting you change that; just noting that it's different. (I've yet to find anything in the manpages that discusses its significance; only a couple of web pages that claim it's "part of the mount point name" without actually explaining how or why.) Cheers... |
Quote:
I do not want a workaround, I want to understand why the things are not working as it was supposed to work, and them, fix it. |
Quote:
post edit: and about the '@' that is from the installer. I left to the installer create the default disk setup; Looks like is some SuSE convention, and as far I could understand it is just a ordinary character, with no special meaning to btrf, but it was created 'as it' by the tumbleweed installer. |
There are "Before" and "After" unit directives, that may work:
https://fedoramagazine.org/systemd-u...ies-and-order/ Full disclosure, I never tried this to mount filesystems - only to start service which was on different FS. |
Hi
Systemd will mount with forking - kind of like "mount -a -F" vs. "mount -a". But you can set up dependencies in fstab - adding x-systemd.requires-mounts-for= for each mount point that depends on another mount point. Here is some info: https://www.golinuxcloud.com/mount-f...order-systemd/ |
Quote:
The system using btrfs is simpler but looks a lot like what you have. The major difference I see is your subvolume naming: Code:
# Quote:
|
Quote:
|
Traditionally fstab mounts are done in sequence, top-down.
If systemd doesn't do that then there is a compatibility bug in systemd. |
All my testing indicates systemd handles the ordering just fine. I was mis-attributed above - my feeling as expressed in the referenced thread is that it's a mechanical issue with the spinning disk
|
^ you mean one would need to add a delay to give the mounted disk time to actually become accessible?
|
Indeed as per the other thread, and also by @Guttorm above.
|
Quote:
|
Quote:
About your specific comment, I think that it was the case, than I will not have the problem, because the fast home fs will be mounted first and the slow disk is mounted after a while, after the home is already ready to receive the sub-mounts, isn't ? PS: Do you have hierarchical mounts, like me ? /home on a disk and /home/your-user/whatever in another disk ? |
All times are GMT -5. The time now is 11:41 AM. |