[Unit] Description=Clawstor read-only FUSE mount (blobs / snapshots / tags) Documentation=https://git.redclaw.dev/clawverse/clawstor After=clawstor-cluster.service network-online.target Wants=clawstor-cluster.service [Service] Type=simple # systemd expands %h (home) at parse time so the ExecStart binary # path resolves to an absolute path — env-var expansion in the # executable position is NOT supported (results in status=203). # Retarget via `systemctl --user edit clawstor-fuse.service`. # Create the mount point if missing (idempotent). ExecStartPre=/bin/mkdir -p %h/clawstor-mount # Best-effort pre-unmount in case a prior instance left a stale # mount (e.g. daemon SIGKILL). Leading `-` = ignore failure. ExecStartPre=-/usr/bin/fusermount3 -u -z %h/clawstor-mount ExecStart=%h/clawstor-deploy/claw-fuse --data-dir %h/clawstor-deploy/data --mount %h/clawstor-mount # The FUSE binary blocks until unmounted. On systemd stop we # unmount explicitly rather than relying on the binary's SIGTERM # handler. ExecStop=/usr/bin/fusermount3 -u %h/clawstor-mount Restart=on-failure RestartSec=5 [Install] WantedBy=default.target