Page 1 of 1

"no pools available to import" Error

PostPosted: Sun Mar 12, 2017 3:11 am
by monroo
Hi to all,

I had an sparseimage file, which contains a single zfs dataset, left over from an old setup. I believe it was created with version 1.2.7.

Recently I've tried to mount it with v1.6.1 on an El Capitan virtual machine and failed constantly. As far I can find with couple of google searches, I have tried the following:


When I try to "sudo zpool import -a(f)", I get "no pools available to import"

"sudo zpool import -d /dev" returns:
Code: Select all
   pool: WDLib
     id: 3885408309782464960
  state: ONLINE
 status: Some supported features are not enabled on the pool.
 action: The pool can be imported using its name or numeric identifier, though
   some features will not be available without an explicit 'zpool upgrade'.
 config:

   WDLib       ONLINE
     disk1     ONLINE

and

"zdb -l /dev/disk1" returns:
Code: Select all
--------------------------------------------
LABEL 0
--------------------------------------------
    version: 5000
    name: 'WDLib'
    state: 1
    txg: 1426
    pool_guid: 3885408309782464960
    errata: 0
    hostid: 119136281
    hostname: 'localhost'
    top_guid: 17314005071947435701
    guid: 17314005071947435701
    vdev_children: 1
    vdev_tree:
        type: 'disk'
        id: 0
        guid: 17314005071947435701
        path: '/dev/disk4'
        whole_disk: 0
        metaslab_array: 33
        metaslab_shift: 27
        ashift: 9
        asize: 20476067840
        is_log: 0
        create_txg: 4
    features_for_read:
--------------------------------------------
LABEL 1
--------------------------------------------
    version: 5000
    name: 'WDLib'
    state: 1
    txg: 1426
    pool_guid: 3885408309782464960
    errata: 0
    hostid: 119136281
    hostname: 'localhost'
    top_guid: 17314005071947435701
    guid: 17314005071947435701
    vdev_children: 1
    vdev_tree:
        type: 'disk'
        id: 0
        guid: 17314005071947435701
        path: '/dev/disk4'
        whole_disk: 0
        metaslab_array: 33
        metaslab_shift: 27
        ashift: 9
        asize: 20476067840
        is_log: 0
        create_txg: 4
    features_for_read:
--------------------------------------------
LABEL 2
--------------------------------------------
    version: 5000
    name: 'WDLib'
    state: 1
    txg: 1426
    pool_guid: 3885408309782464960
    errata: 0
    hostid: 119136281
    hostname: 'localhost'
    top_guid: 17314005071947435701
    guid: 17314005071947435701
    vdev_children: 1
    vdev_tree:
        type: 'disk'
        id: 0
        guid: 17314005071947435701
        path: '/dev/disk4'
        whole_disk: 0
        metaslab_array: 33
        metaslab_shift: 27
        ashift: 9
        asize: 20476067840
        is_log: 0
        create_txg: 4
    features_for_read:
--------------------------------------------
LABEL 3
--------------------------------------------
    version: 5000
    name: 'WDLib'
    state: 1
    txg: 1426
    pool_guid: 3885408309782464960
    errata: 0
    hostid: 119136281
    hostname: 'localhost'
    top_guid: 17314005071947435701
    guid: 17314005071947435701
    vdev_children: 1
    vdev_tree:
        type: 'disk'
        id: 0
        guid: 17314005071947435701
        path: '/dev/disk4'
        whole_disk: 0
        metaslab_array: 33
        metaslab_shift: 27
        ashift: 9
        asize: 20476067840
        is_log: 0
        create_txg: 4
    features_for_read:



"sudo zpool import WDLib" returns:
Code: Select all
cannot import 'WDLib': no such pool available


"sudo zpool import 3885408309782464960" returns:
Code: Select all
cannot import '3885408309782464960': no such pool available


also output from "diskutil list" command is:
Code: Select all
/dev/disk0 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *42.9 GB    disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            42.1 GB    disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk1 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                            WDLib                  +20.5 GB    disk1


I believe the dataset and the pool still exist, since "-d /dev" returns "WDLib ONLINE" but I couldn't find a way to mount it.

Any help would be much appreciated.

Re: "no pools available to import" Error

PostPosted: Sun Mar 12, 2017 4:59 pm
by lundman
To list pools in a specific directory;
Code: Select all
zpool import -d /dev

To import pools from that directory;

Code: Select all
zpool import -d /dev WDLib

Re: "no pools available to import" Error

PostPosted: Mon Mar 13, 2017 2:03 am
by monroo
Thank you very much.

It still doesn't mount with "import -a" though, but "export -a" works. Is it normal behavior?

Re: "no pools available to import" Error

PostPosted: Mon Mar 13, 2017 9:39 pm
by lundman
import -d /dev -a

should work?

Basically, in normal ZFS "/dev/" is in the big list of places we look for HDDs. But we had to remove "/dev" in OSX version due to drive re-numbering, and strongly suggest people use /var/run/disk paths instead. So if you are wanting it to look in /dev after all, the "import" command will always need "-d /dev"