Por enquanto, eu montei um pequeno script, zfs-online-disks.sh
, que remove os discos on-line de zpool status
:
#!/bin/bash
# Return a list of online disks for a storage pool
ONLINE=$(zpool status $1 | grep -Po "\S*(?=\s*ONLINE)")
while read -r line; do
if ! [ -b "/dev/disk/by-id/$line" ]; then
continue
fi
echo $line
done <<< "$ONLINE"