summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorPavel Zakharov <[email protected]>2019-11-06 13:51:19 -0500
committerBrian Behlendorf <[email protected]>2019-11-06 10:51:19 -0800
commit1c47c2c42cdc809ce998d7a5b7b0df145201ad89 (patch)
tree5039a8621625a86fe520144aacc91be2ea7db2cf /cmd
parentae38e00968a1920eb3c1051df888b24301e2f82b (diff)
zvol_wait should ignore redacted zvols
zvol_wait waits for zvol links to be created under /dev/zvol for each zvol. Links are not created for redacted zvols so we should ignore those. Reviewed-by: Paul Dagnelie <[email protected]> Reviewed-by: Matt Ahrens <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Pavel Zakharov <[email protected]> Closes #9545
Diffstat (limited to 'cmd')
-rwxr-xr-xcmd/zvol_wait/zvol_wait8
1 files changed, 6 insertions, 2 deletions
diff --git a/cmd/zvol_wait/zvol_wait b/cmd/zvol_wait/zvol_wait
index e5df82dd3..9a3948da5 100755
--- a/cmd/zvol_wait/zvol_wait
+++ b/cmd/zvol_wait/zvol_wait
@@ -25,15 +25,19 @@ filter_out_deleted_zvols() {
}
list_zvols() {
- zfs list -t volume -H -o name,volmode,receive_resume_token |
+ zfs list -t volume -H -o \
+ name,volmode,receive_resume_token,redact_snaps |
while read -r zvol_line; do
name=$(echo "$zvol_line" | awk '{print $1}')
volmode=$(echo "$zvol_line" | awk '{print $2}')
token=$(echo "$zvol_line" | awk '{print $3}')
+ redacted=$(echo "$zvol_line" | awk '{print $4}')
#
- # /dev links are not created for zvols with volmode = "none".
+ # /dev links are not created for zvols with volmode = "none"
+ # or for redacted zvols.
#
[ "$volmode" = "none" ] && continue
+ [ "$redacted" = "-" ] || continue
#
# We also also ignore partially received zvols if it is
# not an incremental receive, as those won't even have a block