Hi just came over from the reddit
I’m trying to find a quick way to get a list of the physical devices in a zpool for use in a script. Is there a way to do this without resorting to grep/awk/sed of zpool status
?
So, instead of this
[root@archlinux ~]# zpool status
pool: rootfs
state: ONLINE
config:
NAME STATE READ WRITE CKSUM
rootfs ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ata-QEMU_HARDDISK_QM00001 ONLINE 0 0 0
ata-QEMU_HARDDISK_QM00002 ONLINE 0 0 0
errors: No known data errors
[root@archlinux ~]#
I’d have this
$ some-zpool-command
ata-QEMU_HARDDISK_QM00001
ata-QEMU_HARDDISK_QM00002
It’d return all disks for a given pool or all disks for all pools.
Does that exist at all?