functions: add zfs_release_duplicate_holds
This commit is contained in:
parent
fd7c6f0ace
commit
25b3fa0b7f
1 changed files with 8 additions and 0 deletions
8
scripts/zfs_release_duplicate_holds.sh
Normal file
8
scripts/zfs_release_duplicate_holds.sh
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
for i in $(zfs get -Ht snapshot userrefs | grep -v $'\t'0 | cut -d $'\t' -f 1 | cut -f1 -d @ | uniq -d) ; do
|
||||||
|
for j in $(zfs list -H -t snapshot "$i" | awk '{ print $1 }') ; do
|
||||||
|
for k in $(zfs holds -H "$j") ; do
|
||||||
|
echo sudo zfs release syncoid_pbs "$k" | grep "@"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
done
|
Loading…
Reference in a new issue