-
Notifications
You must be signed in to change notification settings - Fork 521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Goofys Experiences SystemD Ordering Cycle issues during dismounting at OS Poweroff #651
Comments
I've done more testing. There appears to be something happening when Systemd attaches the mount. The mount options are correctly parsed by systemd before a mount is mounted, and after it is dismounted. The mount options appear to change while the mount is attached though. Disabling default dependencies in systemd fixed this issue (see below). Steps to reproduce:
The options change can be prevented by manually creating a systemd unit mount file that includes the DefaultDependencies=no flag. Please note then you must add in your own dependencies such as network-online.target.
This otherwise fixed my ordering issue. Edit: I just realized I forgot to actually add "DefaultDependencies=no" into the unit file example. Fixed |
Hello,
Correct me if I am posting this in the wrong place, as I'm unsure exactly which piece of software could be causing this. I have an EC2 instance with EFS/NFS mounts, and S3 mounts using Goofys.
During shutdowns of the OS (Debian 10, in AWS), we experience issues with the server gracefully shutting down. Visible in the syslog, these are the first problem I see
(All .mount files here that are referenced are Goofys mounts)
After research and investigation, I found that Goofys mounts appear to order strangely compared to other network mounts(AWS EFS).
A Goofys requests to be attached prior to both "local-fs.target" as well as "remote-fs.target" is reached. There is also an "after" requirement for "local-fs-pre.target" and "remote-fs-pre.target". If I understand correctly, these two occur at different parts of the boot cycle and might conflict. (Correct me if I am wrong).
From this stackoverflow page, it appears that removing the local-fs related entries should fix it, although I have not figured out how to do that through fstab:
https://unix.stackexchange.com/questions/519221/how-can-i-solve-this-ordering-cycle-in-a-mount-unit
Here is my mount statement:
goofys#redactedBucket /mnt/BucketName fuse allow_other,--uid=0,--gid=1017,--file-mode=0660,--dir-mode=0770,_netdev 0 0
I've removed the _netdev statement and observed that the local-fs related targets remain, while remote targets are removed. It appears that the presence of _netdev does not remove local-fs, but it only adds remote-fs targets.
Here is what an EFS mount looks like:
I've attempted to add "x-systemd.*" flags as listed here, but setting x-systemd.defaultdependencies=no had no affect, and setting dependencies such as x-systemd.after=remote-fs.target did not have an effect on the entry.
Setting x-systemd.after=basic.target removed all local-fs targets and retained remote-fs targets, although I don't know what will break if that is set. Removing the basic.target statement also did not re-add local-fs targets until the next reboot.
All assistance or workarounds are appreciated. My next workaround is creating .mount files rather than using fstab, although it would be nice to avoid that.
The text was updated successfully, but these errors were encountered: