Lines Matching refs:fs
44 local fs="$1"
50 echo "Key prompt for $fs."
51 if zfs load-key -L "$kl" "$fs" < /dev/tty > /dev/tty 2>/dev/tty ; then
52 echo "Key loaded for $fs."
54 echo "Key failed to load for $fs."
57 if [ "$(zfs get -Ho value keystatus "$fs")" = 'available' ]; then
58 echo "Key already loaded for $fs."
59 elif keytest=$(zfs load-key -n -L "$kl" "$fs" 2>&1); then
60 echo "Loading key for $fs from $kl.."
61 if ! keyload=$(timeout $zfskeys_timeout zfs load-key -L "$kl" "$fs" 2>&1) ; then
63 echo "Timed out loading key from $kl for $fs"
65 echo "Failed to load key from $kl for $fs:"
70 echo "Could not verify key from $kl for $fs:"
74 echo "Key file $k not found, empty or unreadable. Skipping $fs.."
80 local fs=$1
82 if [ "$(zfs get -Ho value mounted "$fs")" = 'yes' ]; then
84 zfs unmount -f "$fs" && echo "Forcibly unmounted $fs."
86 zfs unmount "$fs" && echo "Unmounted $fs."
90 echo "Unmount failed for $fs"
91 elif [ "$(zfs get -Ho value keystatus "$fs")" = 'available' ]; then
92 zfs unload-key "$fs" && echo "Unloaded key for $fs."
94 echo "No key loaded for $fs."
102 list_datasets | while read kl fs ; do
103 echo "$fs: $(zfs get -Ho value keystatus "$fs")"
111 list_datasets | while read kl fs ; do
112 unlock_fs "$fs" "$kl"
120 list_datasets | while read kl fs ; do
121 lock_fs "$fs"