3

I have a pool that cannot be imported even though it is detected and is online.

$ zpool import -d /dev/disk/by-id
  pool: threetb
    id: 10173957064206389394
 state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:

    threetb                                       ONLINE
      raidz1-0                                    ONLINE
        ata-WDC_WD30EFRX-68AX9N0_WD-WMC1T3208338  ONLINE
        ata-WDC_WD30EFRX-68AX9N0_WD-WMC1T3208543  ONLINE
        ata-WDC_WD30EFRX-68AX9N0_WD-WMC1T3218685  ONLINE
        ata-WDC_WD30EFRX-68AX9N0_WD-WMC1T3295168  ONLINE

But when I try to import it, it cannot be found:

$ zpool import -f threetb
cannot import 'threetb': no such pool available

This happened after a reboot. Other pools import fine.

Any ideas what's going on here?

Jan Bernhardt
  • 51
  • 1
  • 4
  • 1
    Did you try `zpool import -d /dev/disk/by-id threetb`? – Thomas Sep 09 '18 at 09:48
  • Thank you Thomas! That was fast and did the trick. But why? – Jan Bernhardt Sep 09 '18 at 09:50
  • 1
    Normally `zpool import` searches `/dev/dsk` for import candiates and should pick up the right `/dev/sd*` devices for the pool. Then with `zpool list -v` also the `/dev/sd*` names are shown. Not sure why this did not work. – Thomas Sep 09 '18 at 09:57

1 Answers1

2

Thanks to Thomas blazingly fast answer I was able to import the pool by combining the device scanning with the import:

$ zpool import -d /dev/disk/by-id threetb
Jan Bernhardt
  • 51
  • 1
  • 4