mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 01:51:00 +03:00
Verify zfs module loaded before starting services
This is a minor change to the systemd service templates that verifies the zfs kernel module is loaded by the kernel prior to attempting to import any zpool. Reviewed-by: Richard Laager <rlaager@wiktel.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Jonathon Fernyhough <jonathon.fernyhough@york.ac.uk> Closes #10627
This commit is contained in:
parent
27d96d2254
commit
ae12b02308
@ -13,6 +13,7 @@ ConditionPathExists=@sysconfdir@/zfs/zpool.cache
|
|||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
|
ExecCondition=/usr/bin/grep -q "^zfs " /proc/modules
|
||||||
ExecStart=@sbindir@/zpool import -c @sysconfdir@/zfs/zpool.cache -aN
|
ExecStart=@sbindir@/zpool import -c @sysconfdir@/zfs/zpool.cache -aN
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
@ -12,6 +12,7 @@ ConditionPathExists=!@sysconfdir@/zfs/zpool.cache
|
|||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
|
ExecCondition=/usr/bin/grep -q "^zfs " /proc/modules
|
||||||
ExecStart=@sbindir@/zpool import -aN -o cachefile=none
|
ExecStart=@sbindir@/zpool import -aN -o cachefile=none
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
@ -11,6 +11,7 @@ Before=systemd-random-seed.service
|
|||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
|
ExecCondition=/usr/bin/grep -q "^zfs " /proc/modules
|
||||||
ExecStart=@sbindir@/zfs mount -a
|
ExecStart=@sbindir@/zfs mount -a
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
Loading…
Reference in New Issue
Block a user