3

Unable to import an exported pool.

Based on the info below, am I able to somehow import the pool? Or, is there a way to retrieve the data from the drive itself?

There is no corruption on either disks.

Solaris 11.3

# zpool upgrade -v
This system is currently running ZFS pool version 37.

# zpool import
no pools available to import

I've tried the various flags: -a, -d, -f... but still cannot import the pool.

If I run # zdb -l /dev/dsk/c2d1 it outputs...

failed to read label 0
failed to read label 1
failed to read label 2
failed to read label 3  
------------------------------------------
LABEL 0
------------------------------------------
timestamp: 1473551773 date = Sat Sep 10 19:56:13 EDT 2016
version: 37
name: 'media_pool'
state: 1
txg: 2897535
pool_guid: 5338829418358414155
hostid: 4878442
hostname: 'solaris'
top_guid: 9706852805983701681
guid: 18084312246070035927
vdev_children: 1
vdev_tree:
    type: 'mirror'
    id: 0
    guid: 9706852805983701681
    metaslab_array: 27
    metaslab_shift: 33
    ashift: 9
    asize: 1494648619008
    is_log: 0
    create_txg: 4
    children[0]:
        type: 'disk'
        id: 0
        guid: 18084312246070035927
        path: '/dev/dsk/c2d1s0'
        devid: 'id1,cmdk@AWDC_WD1502FAEX-007BA0=_____WD-xxxxxxxxxxxx/a'
        phys_path: '/pci@0,0/pci-ide@1f,2/ide@0/cmdk@1,0:a'
        whole_disk: 1
        DTL: 101
        create_txg: 4
    children[1]:
        type: 'disk'
        id: 1
        guid: 14097338398603359817
        path: '/dev/dsk/c5d0s0'
        devid: 'id1,cmdk@AWDC_WD1502FAEX-007BA0=_____WD-xxxxxxxxxxxx/a'
        phys_path: '/pci@0,0/pci-ide@1f,5/ide@1/cmdk@0,0:a'
        whole_disk: 1
        DTL: 100
        create_txg: 4
------------------------------------------
LABEL 1 - CONFIG MATCHES LABEL 0
------------------------------------------
------------------------------------------
LABEL 2 - CONFIG MATCHES LABEL 0
------------------------------------------
------------------------------------------
LABEL 3 - CONFIG MATCHES LABEL 0
------------------------------------------    

additional information

# ls -l /dev/dsk/c2d1*  
52 Mar  7  2016 /dev/dsk/c2d1 -> ../../devices/pci@0,0/pci-ide@1f,2/ide@0/cmdk@1,0:wd
51 Mar  7  2016 /dev/dsk/c2d1p0 -> ../../devices/pci@0,0/pci-ide@1f,2/ide@0/cmdk@1,0:q
51 Mar  7  2016 /dev/dsk/c2d1p1 -> ../../devices/pci@0,0/pci-ide@1f,2/ide@0/cmdk@1,0:r
51 Mar  7  2016 /dev/dsk/c2d1p2 -> ../../devices/pci@0,0/pci-ide@1f,2/ide@0/cmdk@1,0:s
51 Mar  7  2016 /dev/dsk/c2d1p3 -> ../../devices/pci@0,0/pci-ide@1f,2/ide@0/cmdk@1,0:t
51 Mar  7  2016 /dev/dsk/c2d1p4 -> ../../devices/pci@0,0/pci-ide@1f,2/ide@0/cmdk@1,0:u
51 Mar  7  2016 /dev/dsk/c2d1s0 -> ../../devices/pci@0,0/pci-ide@1f,2/ide@0/cmdk@1,0:a
51 Mar  7  2016 /dev/dsk/c2d1s1 -> ../../devices/pci@0,0/pci-ide@1f,2/ide@0/cmdk@1,0:b
51 Mar  7  2016 /dev/dsk/c2d1s10 -> ../../devices/pci@0,0/pci-ide@1f,2/ide@0/cmdk@1,0:k
51 Mar  7  2016 /dev/dsk/c2d1s11 -> ../../devices/pci@0,0/pci-ide@1f,2/ide@0/cmdk@1,0:l
51 Mar  7  2016 /dev/dsk/c2d1s12 -> ../../devices/pci@0,0/pci-ide@1f,2/ide@0/cmdk@1,0:m
51 Mar  7  2016 /dev/dsk/c2d1s13 -> ../../devices/pci@0,0/pci-ide@1f,2/ide@0/cmdk@1,0:n
51 Mar  7  2016 /dev/dsk/c2d1s14 -> ../../devices/pci@0,0/pci-ide@1f,2/ide@0/cmdk@1,0:o
51 Mar  7  2016 /dev/dsk/c2d1s15 -> ../../devices/pci@0,0/pci-ide@1f,2/ide@0/cmdk@1,0:p
51 Mar  7  2016 /dev/dsk/c2d1s2 -> ../../devices/pci@0,0/pci-ide@1f,2/ide@0/cmdk@1,0:c
51 Mar  7  2016 /dev/dsk/c2d1s3 -> ../../devices/pci@0,0/pci-ide@1f,2/ide@0/cmdk@1,0:d
51 Mar  7  2016 /dev/dsk/c2d1s4 -> ../../devices/pci@0,0/pci-ide@1f,2/ide@0/cmdk@1,0:e
51 Mar  7  2016 /dev/dsk/c2d1s5 -> ../../devices/pci@0,0/pci-ide@1f,2/ide@0/cmdk@1,0:f
51 Mar  7  2016 /dev/dsk/c2d1s6 -> ../../devices/pci@0,0/pci-ide@1f,2/ide@0/cmdk@1,0:g
51 Mar  7  2016 /dev/dsk/c2d1s8 -> ../../devices/pci@0,0/pci-ide@1f,2/ide@0/cmdk@1,0:i
51 Mar  7  2016 /dev/dsk/c2d1s9 -> ../../devices/pci@0,0/pci-ide@1f,2/ide@0/cmdk@1,0:j

also, might be useful, please note I've physically disconnected the 2nd mirror drive from media_pool. (importing didn't work with both drives on a Live CD or the original install).

# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
       0. c2d1 <WDC WD15-  WD-xxxxxxxxxxx-0001-1.36TB>
          /pci@0,0/pci-ide@1f,2/ide@0/cmdk@1,0
       1. c3d0 <WDC WD10-  WD-xxxxxxxxxxx-0001-931.51GB>
          /pci@0,0/pci-ide@1f,2/ide@1/cmdk@0,0
       2. c3d1 <WDC WD10-  WD-xxxxxxxxxxx-0001-931.51GB>
          /pci@0,0/pci-ide@1f,2/ide@1/cmdk@1,0

rpool is where solaris resides.

NAME   SIZE  ALLOC  FREE  CAP  DEDUP  HEALTH  ALTROOT
rpool  928G  28.3G  900G   3%  1.00x  ONLINE  -
mfridman
  • 41
  • 3
  • Just in case: is the pool imported already? Anyway, please show the output of `ls -l /dev/dsk/c2d1*` – Tom Shaw Sep 11 '16 at 10:21
  • @TomShaw No, when I try to `zpool import` it outputs `no pools available to import`. I have a feeling it's something to do with the disk labels... – mfridman Sep 11 '16 at 13:47

1 Answers1

1

The answer below is a workaround. The correct answer should address why zpool import isn't correctly importing the pool despite zbd picking up LABEL 0 but not 'reading' it correctly.


All was not lost. Take one of the mirrored drives and stick it on another machine, boot from a Solaris 11.3 LiveCD (or at least a version of the OS that's got a similar zfs version).

zpool import media_pool was successful on a different box. Now export it.
zpool export media_pool

On the original machine clear the /etc/zfs/zpool.cache. Poweroff. Remove the second mirrored drive. Insert original mirrored drive (the one exported from the step above on a different box). Reboot the machine and import the pool.

mfridman
  • 41
  • 3
  • That's a weird one! You said a Live CD on the same machine didn't work. Different Live CD? – Tom Shaw Sep 11 '16 at 23:29
  • @TomShaw it was the same bootable USB (aka Live CD) but ran it on a different box. You are correct in the sense that a Live CD should have worked on the original box if there was only that one drive. The only delta here was the box, the physical USB and hdd was same. – mfridman Sep 11 '16 at 23:40
  • Maybe a zpool import bug which is worked around with a different device path. If it happens again it would be interesting to see if moving the disk around in the same machine helps. – Tom Shaw Sep 12 '16 at 00:39