在 Solaris 11 上导入已导出的池失败

在 Solaris 11 上导入已导出的池失败

无法导入已导出的池。

根据以下信息,我是否能够以某种方式导入池?或者,是否有办法从驱动器本身检索数据?

两个磁盘均无损坏。

Solaris 11.3

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

# zpool import
no pools available to import

我尝试了各种标志:-a,,-d... -f,但仍然无法导入池。

如果我运行# zdb -l /dev/dsk/c2d1它输出...

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
------------------------------------------    

附加信息

# 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

另外,可能会有用,请注意我已经从 media_pool 物理断开了第二个镜像驱动器的连接。(导入对 Live CD 或原始安装上的两个驱动器都不起作用)。

# 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 是 solaris 所在的地方。

NAME   SIZE  ALLOC  FREE  CAP  DEDUP  HEALTH  ALTROOT
rpool  928G  28.3G  900G   3%  1.00x  ONLINE  -

答案1

以下答案是一种解决方法。正确答案应该解决为什么zpool import尽管 zbd 拾取了 LABEL 0,但无法正确“读取”它,却无法正确导入池。


一切还没有丢失。取出一个镜像驱动器并将其粘贴到另一台机器上,从 Solaris 11.3 LiveCD(或至少具有类似 zfs 版本的操作系统版本)启动。

zpool import media_pool在另一个盒子上成功了。现在导出它。
zpool export media_pool

在原始机器上清除 /etc/zfs/zpool.cache。关机。移除第二个镜像驱动器。插入原始镜像驱动器(从上一步导出到不同机器上的驱动器)。重启机器并导入池。

相关内容