2

So, I've come across a lone disk with a ZFS partition on it. Clearly this is out of place.

How can I pull some metadata off it (like the GUID or what zpool it belongs to), so I can figure out where this thing belongs.

Google give me tons of information on how to get stats on devices that are part of an imported pool, and how to identify which disk in a tray is the bad one, but I'm coming up dry on this.

nrb
  • 33
  • 4

1 Answers1

3

zpool import will dump information about the pool to which the disk belong.

Use zpool import -a to import all pools found.

For destroyed pools, try zpool import -D

shodanshok
  • 47,711
  • 7
  • 111
  • 180
  • It just says 'no pools available to import', so I'll take that to mean that it's had its metadata destroyed. I find it a bit odd that there is no dedicated command for this (like LVM's pvdisplay). – nrb Dec 04 '19 at 01:30
  • You can see metadata even of destroyed pool. See the updated answer. – shodanshok Dec 04 '19 at 06:54
  • 1
    Still nothing, but I was able to find the information out directly by using hexedit. The beginning of the partition is pretty easy to read. – nrb Dec 04 '19 at 09:07