Page 1 of 1

Duplicate pools with the same name - one corrupted

PostPosted: Mon Dec 09, 2019 11:40 pm
by lewiz
So I'm running into an issue where I have two tank pools that appear to be on the same set of disks:

Code: Select all
~ % sudo zpool import -d /dev
   pool: tank
     id: 3946806610328453572
  state: ONLINE
 action: The pool can be imported using its name or numeric identifier.

   tank        ONLINE
     raidz1-0  ONLINE
       disk0   ONLINE
       disk2   ONLINE
       disk1   ONLINE

   pool: tank
     id: 6315842140481183706
  state: FAULTED
 status: One or more devices are missing from the system.
 action: The pool cannot be imported. Attach the missing
   devices and try again.

   tank                                                                                   FAULTED  corrupted data
     raidz1-0                                                                             DEGRADED
       disk2                                                                              ONLINE
       PCI0@0-PEG2@1,2-UPSB@0-DSB1@1-UPS0@0-pci-bridge@2-pci1b21,625@0-PRT0@0-PMP@0-@0:0  UNAVAIL  cannot open
       disk0                                                                              ONLINE

I'm able to import 3946806610328453572 just fine and it works, but I'd like to remove the FAULTED pool. I'm wary of doing this though as it appears to be using the same set of disks(?).

Is there any obvious way to resolve this?

Update: on 19B88

Re: Duplicate pools with the same name - one corrupted

PostPosted: Tue Dec 10, 2019 4:48 pm
by lundman
Hmm so it must be picking up a disklabel for the old name somewhere. I don't think it uses /etc/zfs/zpool.cache that way, but you can certainly try to delete that file. It is more likely it reads a label of a device somewhere (the zfs labels are stored at the start, and very end of devices - so can sometimes still exist even if they are used by other things, hfs etc).