mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-09-15 13:50:11 +03:00
Add templated zfs-mount@.service
Runs `zfs mount -R <dataset>` at boot, after `zfs mount -a`. Intended to replace `mountpoint=legacy` in certain mount setups. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Meriel Luna Mittelbach <lunarlambda@gmail.com> Closes #17483
This commit is contained in:
parent
c3d74a0d6f
commit
bce049389d
@ -8,6 +8,7 @@ lib/systemd/system/zfs-import-scan.service
|
|||||||
lib/systemd/system/zfs-import.target
|
lib/systemd/system/zfs-import.target
|
||||||
lib/systemd/system/zfs-load-key.service
|
lib/systemd/system/zfs-load-key.service
|
||||||
lib/systemd/system/zfs-mount.service
|
lib/systemd/system/zfs-mount.service
|
||||||
|
lib/systemd/system/zfs-mount@.service
|
||||||
lib/systemd/system/zfs-scrub-monthly@.timer
|
lib/systemd/system/zfs-scrub-monthly@.timer
|
||||||
lib/systemd/system/zfs-scrub-weekly@.timer
|
lib/systemd/system/zfs-scrub-weekly@.timer
|
||||||
lib/systemd/system/zfs-scrub@.service
|
lib/systemd/system/zfs-scrub@.service
|
||||||
|
@ -56,6 +56,7 @@ systemdunit_DATA = \
|
|||||||
%D%/systemd/system/zfs-import-scan.service \
|
%D%/systemd/system/zfs-import-scan.service \
|
||||||
%D%/systemd/system/zfs-import.target \
|
%D%/systemd/system/zfs-import.target \
|
||||||
%D%/systemd/system/zfs-mount.service \
|
%D%/systemd/system/zfs-mount.service \
|
||||||
|
%D%/systemd/system/zfs-mount@.service \
|
||||||
%D%/systemd/system/zfs-scrub-monthly@.timer \
|
%D%/systemd/system/zfs-scrub-monthly@.timer \
|
||||||
%D%/systemd/system/zfs-scrub-weekly@.timer \
|
%D%/systemd/system/zfs-scrub-weekly@.timer \
|
||||||
%D%/systemd/system/zfs-scrub@.service \
|
%D%/systemd/system/zfs-scrub@.service \
|
||||||
|
26
etc/systemd/system/zfs-mount@.service.in
Normal file
26
etc/systemd/system/zfs-mount@.service.in
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Mount ZFS filesystem %I
|
||||||
|
Documentation=man:zfs(8)
|
||||||
|
DefaultDependencies=no
|
||||||
|
After=systemd-udev-settle.service
|
||||||
|
After=zfs-import.target
|
||||||
|
After=zfs-mount.service
|
||||||
|
After=systemd-remount-fs.service
|
||||||
|
Before=local-fs.target
|
||||||
|
ConditionPathIsDirectory=/sys/module/zfs
|
||||||
|
|
||||||
|
# This merely tells the service manager
|
||||||
|
# that unmounting everything undoes the
|
||||||
|
# effect of this service. No extra logic
|
||||||
|
# is ran as a result of these settings.
|
||||||
|
Conflicts=umount.target
|
||||||
|
Before=umount.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
EnvironmentFile=-@initconfdir@/zfs
|
||||||
|
ExecStart=@sbindir@/zfs mount -R %I
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=zfs.target
|
@ -388,7 +388,7 @@ support for unlocking datasets on user login.
|
|||||||
|
|
||||||
%if 0%{?_systemd}
|
%if 0%{?_systemd}
|
||||||
%define systemd --enable-systemd --with-systemdunitdir=%{_unitdir} --with-systemdpresetdir=%{_presetdir} --with-systemdmodulesloaddir=%{_modulesloaddir} --with-systemdgeneratordir=%{_systemdgeneratordir} --disable-sysvinit
|
%define systemd --enable-systemd --with-systemdunitdir=%{_unitdir} --with-systemdpresetdir=%{_presetdir} --with-systemdmodulesloaddir=%{_modulesloaddir} --with-systemdgeneratordir=%{_systemdgeneratordir} --disable-sysvinit
|
||||||
%define systemd_svcs zfs-import-cache.service zfs-import-scan.service zfs-mount.service zfs-share.service zfs-zed.service zfs.target zfs-import.target zfs-volume-wait.service zfs-volumes.target
|
%define systemd_svcs zfs-import-cache.service zfs-import-scan.service zfs-mount.service zfs-mount@.service zfs-share.service zfs-zed.service zfs.target zfs-import.target zfs-volume-wait.service zfs-volumes.target
|
||||||
%else
|
%else
|
||||||
%define systemd --enable-sysvinit --disable-systemd
|
%define systemd --enable-sysvinit --disable-systemd
|
||||||
%endif
|
%endif
|
||||||
|
Loading…
Reference in New Issue
Block a user