mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-11-24 08:46:54 +08:00
few words about integration with systemd
@@ -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.
|
||||
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.
|
||||
Reference in New Issue
Block a user