From b4ebaf09fec05843517d4da07d0e58bc0d7cf211 Mon Sep 17 00:00:00 2001 From: name_snrl <72071763+name-snrl@users.noreply.github.com> Date: Thu, 20 Mar 2025 15:37:44 +0900 Subject: [PATCH] few words about integration with systemd --- fstab.md => fstab-(poor-systemd-support).md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) rename fstab.md => fstab-(poor-systemd-support).md (58%) diff --git a/fstab.md b/fstab-(poor-systemd-support).md similarity index 58% rename from fstab.md rename to fstab-(poor-systemd-support).md index 9e42e5b..c00c360 100644 --- a/fstab.md +++ b/fstab-(poor-systemd-support).md @@ -3,6 +3,7 @@ To mount SeaweedFS using `/etc/fstab` (such as on boot): * Follow the directions in https://github.com/seaweedfs/seaweedfs/wiki/FUSE-Mount for setting up a SeaweedFS mount subtype for FUSE (hint: `cp weed /sbin/weed`) * Install SeaweedFS as usual, making sure any specific settings (such as `security.toml`) are in the correct location to be read * Add the fstab entry as described below +* But make sure that `systemd-fstab-generator(8)` is not used on your system If you have a single filer server, this is the syntax you will use: @@ -12,4 +13,18 @@ If you have multiple filer servers, this is the syntax you will use: `fuse /path/to/mountpoint fuse.weed filer='192.168.0.1:8888,192.168.0.2:8888',filer.path=/,defaults,_netdev 0 0` -Place the appropriate line into `/etc/fstab` and attempt to mount your filesystem. If you encounter any issues, run `weed mount` directly in verbose/debug mode to diagnose the issue, and switch back to fstab-style mounting once you have resolved the issues. \ No newline at end of file +Place the appropriate line into `/etc/fstab` and attempt to mount your filesystem. If you encounter any issues, run `weed mount` directly in verbose/debug mode to diagnose the issue, and switch back to fstab-style mounting once you have resolved the issues. + +## Systemd + +* No matter what systemd options (`nofail`, `x-systemd.device-timeout`, `x-systemd.mount-timeout`, etc.) you add to /etc/fstab, you won’t be able to make `systemd.mount(5)` handle the mount properly. You will always get an error when starting mount unit, even though the filesystem ends up being mounted. +* `x-systemd.automount` doesn’t work at all. +* The `_netdev` results in errors like: + + ```log + kernel: fuse: Unknown parameter '_netdev' + ``` + + p.s. Not sure if it’s related. (systemd 255.6) + +In general, if your system is deeply integrated with systemd, it is better to create `systemd.service(5)` to mount. \ No newline at end of file