-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modify the recent zfs-volumes.target to Requires= zfs-volume@.service units that are dynamically generated for each zvol by the existing systemd-generator infrastructure at boot time. This is an alternative to the zfs-volume-wait.service. Each unit polls once per second, exiting if it detects the zvol link, succeeding unconditionally after a 30 second timeout. Signed-off-by: Antonio Russo <antonio.e.russo@gmail.com>
- Loading branch information
Showing
6 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[Unit] | ||
Description=ZFS zvol %I ready | ||
Before=zfs-volumes.target | ||
DefaultDependencies=no | ||
|
||
[Service] | ||
ExecStart=/bin/sh -c 'timeout=30 ; while [ $timeout -gt 0 ] ; do [ -e "/dev/zvol/$0" ] && exit 0 ; sleep 1 ; timeout=$((timeout-1)); done ; echo "zvol $0 unavailable"' %I | ||
Type=oneshot | ||
RemainAfterExit=yes |