TL;DR: Can’t mount a bcachefs
pool with systemd
, guess I’ll just use /etc/fstab
.
(Also maybe we need a bcachefs
tag?)
Hey there.
Here’s what I have put in inside /etc/systemd/system/mash.mount
:
[Unit]
Description=BCacheFS pool made up of unwanted drives
[Mount]
What='/dev/sdc:/dev/sdd:/dev/sde:/dev/sdf'
Where=mash.mount
Type=bcachefs
Options=defaults
[Install]
WantedBy=multi-user.target
(I haven’t put an owner, not sure where to do it, likely in the Options
section?)
I have checked the paths to the devices with lsblk
and ls -la /dev/disk/by-id
and systemd-mount --list --full
; I am 100% sure they are correct.
So let’s enable the unit and check its status: and then
, which gives me:
❯ sudo systemctl enable mash.mount
❯ sudo systemctl status mash.mount
○ mash.mount - BCacheFS pool made up of unwanted drives
Loaded: loaded (/etc/systemd/system/mash.mount; enabled; preset: disabled)
Active: inactive (dead)
Where: /mash
What: '/dev/sdc:/dev/sdd:/dev/sde:/dev/sdf'
Feb 01 21:02:59 s1 systemd[1]: /etc/systemd/system/mash.mount:10: Where= path is not absolute, ignoring: mash.mount
Tried without the single quotes in the What
parameter, same thing. So OK, I have no idea how to fix that because bcachefs docs say that this is the “what” part of mounting it. Next thing I tried:
❯ sudo systemd-mount --type bcachefs --owner dimi '/dev/sdc:/dev/sdd:/dev/sde:/dev/sdf' /mash
Failed to make path /dev/sdc:/dev/sdd:/dev/sde:/dev/sdf absolute: No such file or directory
Puzzling, because looking at the docs, I am putting the “what to mount” first, with single quotes, to make sure it’s a singular argument for zsh, and only then I am putting the desired mount point. Desperate, I tried putting --discover
in there as well, but no change.
Finally, just doing this manually:
sudo mount -v -t bcachefs -o uid=dimi,forceuid,gid=wheel,forcegid,rw '/dev/sdc':'/dev/sdd':'/dev/sde':'/dev/sdf' /mash
…works just fine. So if I (we?) can’t make this work I’ll be using good old /etc/fstab
.
Any thoughts?