mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-18 02:20:59 +03:00
6a41310c70
07a3312f17
, which introduced this in
October of 2014, didn't have zpool export -a available; we do
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13093
23 lines
384 B
Bash
Executable File
23 lines
384 B
Bash
Executable File
#!/bin/sh
|
|
|
|
_do_zpool_export() {
|
|
info "ZFS: Exporting ZFS storage pools..."
|
|
errs=$(zpool export -aF 2>&1)
|
|
ret=$?
|
|
echo "${errs}" | vwarn
|
|
if [ "${ret}" -ne 0 ]; then
|
|
info "ZFS: There was a problem exporting pools."
|
|
fi
|
|
|
|
if [ -n "$1" ]; then
|
|
info "ZFS: pool list"
|
|
zpool list 2>&1 | vinfo
|
|
fi
|
|
|
|
return "$ret"
|
|
}
|
|
|
|
if command -v zpool >/dev/null; then
|
|
_do_zpool_export "${1}"
|
|
fi
|