ZFS: Help importing a zpool after Ubuntu upgrade from 13.04 to 13.10, device IDs have changed

Manolo

I have updated Ubuntu from version 13.04 to version 13.10, only to discover that the SATA disks IDs have changed, and my ZFS pool now fails.

On new Ubuntu 13.10 the disk IDs are now ata-* instead of scsi-SATA_*.

This is the pool status after the update:

  pool: nestpool
 state: UNAVAIL
status: One or more devices could not be used because the label is missing 
    or invalid.  There are insufficient replicas for the pool to continue
    functioning.
action: Destroy and re-create the pool from
    a backup source.
   see: http://zfsonlinux.org/msg/ZFS-8000-5E
  scan: none requested
config:

    NAME                                                STATE     READ WRITE CKSUM
    nestpool                                            UNAVAIL      0     0     0  insufficient replicas
      raidz2-0                                          UNAVAIL      0     0     0  insufficient replicas
        scsi-SATA_WDC_WD4000F9YZ-_WD-WCC1F0046946       UNAVAIL      0     0     0
        scsi-SATA_WDC_WD4000F9YZ-_WD-WCC4A0026423       UNAVAIL      0     0     0
        scsi-SATA_WDC_WD4000F9YZ-_WD-WMC1F0011145       UNAVAIL      0     0     0
        scsi-SATA_WDC_WD4000F9YZ-_WD-WMC1F0049294       UNAVAIL      0     0     0
        scsi-SATA_WDC_WD4000F9YZ-_WD-WMC1F0051143       UNAVAIL      0     0     0
        scsi-SATA_WDC_WD4000F9YZ-_WD-WMC1F0051756       UNAVAIL      0     0     0
        scsi-SATA_WDC_WD4000F9YZ-_WD-WMC1F0056625       UNAVAIL      0     0     0
        scsi-SATA_WDC_WD4000F9YZ-_WD-WMC1F0200560       UNAVAIL      0     0     0
    logs
      mirror-1                                          UNAVAIL      0     0     0  insufficient replicas
        scsi-SATA_Samsung_SSD_840S1ATNEAD707062H-part2  UNAVAIL      0     0     0
        scsi-SATA_Samsung_SSD_840S1ATNEAD707066K-part3  UNAVAIL      0     0     0

After a very long research on the Internet I started following procedure:

First exported the pool using: zpool export nestpool

Then tried to import back the pool using: zpool import -m -f -d /dev/disk/by-id nestpool

(I have also tried with and without all combinations of -m, -f and -d, as well as usind the ID instead of the zpool name)

But the import fails with the message: cannot import 'nestpool': one or more devices is currently unavailable

This is the current output of zpool import

   pool: nestpool
     id: 3947768928242827823
  state: DEGRADED
 status: One or more devices contains corrupted data.
 action: The pool can be imported despite missing or damaged devices.  The
    fault tolerance of the pool may be compromised if imported.
   see: http://zfsonlinux.org/msg/ZFS-8000-4J
 config:

    nestpool                                                DEGRADED
      raidz2-0                                              ONLINE
        ata-WDC_WD4000F9YZ-09N20L0_WD-WCC1F0046946          ONLINE
        ata-WDC_WD4000F9YZ-09N20L0_WD-WCC4A0026423          ONLINE
        ata-WDC_WD4000F9YZ-09N20L0_WD-WMC1F0011145          ONLINE
        ata-WDC_WD4000F9YZ-09N20L0_WD-WMC1F0049294          ONLINE
        ata-WDC_WD4000F9YZ-09N20L0_WD-WMC1F0051143          ONLINE
        ata-WDC_WD4000F9YZ-09N20L0_WD-WMC1F0051756          ONLINE
        ata-WDC_WD4000F9YZ-09N20L0_WD-WMC1F0056625          ONLINE
        ata-WDC_WD4000F9YZ-09N20L0_WD-WMC1F0200560          ONLINE
    cache
      ata-Samsung_SSD_840_PRO_Series_S1ATNEAD707062H-part1
    logs
      mirror-1                                              UNAVAIL  insufficient replicas
        ata-Samsung_SSD_840_PRO_Series_S1ATNEAD707062H      UNAVAIL  corrupted data
        ata-Samsung_SSD_840_PRO_Series_S1ATNEAD707066K      UNAVAIL

Log partitions were not correctly identified, they should be ata-Samsung_SSD_840_PRO_Series_S1ATNEAD707062H-part2 and ata-Samsung_SSD_840_PRO_Series_S1ATNEAD707066K-part3. And the argument -m during import is not helping.

I cannot find a way to tell zpool import to use a different path/id for the log devices. Any help and idea for fixing this problem will be much appreciated. What else can I do to recover this pool?

(Here is the current output of gdisk -l for all disks: http://pastebin.com/bBec21WN)

Manolo

As everything was still intact and the only problem that prevented importing the pool was the wrong recognition of the partitions used for the log devices, the solution is to create temporary symbolic links under /dev/disk/by-id for the missing partitions.

In my case like this:

ln -sf ../../sda2 ata-Samsung_SSD_840_PRO_Series_S1ATNEAD707062H
ln -sf ../../sdb3 ata-Samsung_SSD_840_PRO_Series_S1ATNEAD707066K

After that, in my case zpool import changed the old wrong IDs to new ones that are present now under Ubuntu 13.10 (each disk and partition has 2 IDs now), and I had to create symbolic links for these as well, like this:

ln -sf ../../sda2 wwn-0x50025385503e8531
ln -sf ../../sdb3 wwn-0x50025385503e8535

After that zpool import automagically started to recognise the correct partitions.

For importing I ran the command:

zpool import -f nestpool

And the pool was imported. DO NOT FORGET to fix the temporary links! Also after a server restart the links will be recreated and fixed.

In my case zpool did recognise the correct partitions during import and no further action was necessary. Otherwise it is necessary to remove the ZIL devices and re-add them back, before anything else!

Do not forget to run scrub and all should be back in place.

A lesson learned for the future is that ZFS recognises the partition if it is the first partition on disk, this is for example the case when using full disks for ZFS. So try to use full disks or when possible only first partition on disks.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

ZFS: Help importing a zpool after Ubuntu upgrade from 13.04 to 13.10, device IDs have changed

From Dev

Why do I get these .vimrc errors in Ubuntu 14 after upgrade from Ubuntu 13?

From Dev

How to upgrade alsamixer in ubuntu 13

From Dev

How to upgrade alsamixer in ubuntu 13

From Dev

Unable to do su or sudo after upgrade from 13 to 14

From Dev

After upgrade ubuntu 18.04 changed from GUI to Terminal

From Dev

After upgrade ubuntu 18.04 changed from GUI to Terminal

From Dev

My Prolific Technology, Inc. PL2303 Serial Port adapter doesn't work in either ubuntu 13:10 or 14:04

From Dev

FreeBSD ZFS: missing top-level device in zpool

From Dev

My ZFS dataset is gone after system upgrade/reboot (ubuntu)

From Dev

Ubuntu 20.04 with root on ZFS errors after 'apt dist-upgrade'

From Dev

Device not managed after upgrade to ubuntu 16

From Dev

zpool missing after kernel upgrade attempt

From Dev

After upgrade for Android Studio 2.1.1 Error:(30, 13)

From Dev

After upgrade for Android Studio 2.1.1 Error:(30, 13)

From Dev

Terminal application erased from Ubuntu 13

From Dev

upgrade from 12.10 to 13.x - says "no new release found"

From Dev

How to upgrade from Ipython Notebook .12 to .13 (Linux)?

From Dev

HP Mini upgrade from 12.04 to 13.?? failed

From Dev

How does one exclude a zpool from zfs-auto-snapshot

From Dev

How to format current datetime in this format "2020-04-10T13:58:59.000+0000" in TypeScipt

From Dev

Dell XPS 13 9360 Dualboot Windows 10 and Ubuntu 16.04

From Dev

Dell XPS 13 9360 Dualboot Windows 10 and Ubuntu 16.04

From Dev

Trash icon and files have disappeared from the desktop after upgrade to Ubuntu 19.04

From Dev

No Boot Device Found on partitioned laptop after Windows 10 upgrade

From Dev

How to update Dell repositories after upgrading XPS 13 to Ubuntu 18.04

From Dev

Dell xps 13 ubuntu 20 touchpad not moving after login

From Dev

Ubuntu 20.04 Dell xps 13 touchpad not working after login

From Dev

Sum of integers, not counting 13 and the number after 13

Related Related

  1. 1

    ZFS: Help importing a zpool after Ubuntu upgrade from 13.04 to 13.10, device IDs have changed

  2. 2

    Why do I get these .vimrc errors in Ubuntu 14 after upgrade from Ubuntu 13?

  3. 3

    How to upgrade alsamixer in ubuntu 13

  4. 4

    How to upgrade alsamixer in ubuntu 13

  5. 5

    Unable to do su or sudo after upgrade from 13 to 14

  6. 6

    After upgrade ubuntu 18.04 changed from GUI to Terminal

  7. 7

    After upgrade ubuntu 18.04 changed from GUI to Terminal

  8. 8

    My Prolific Technology, Inc. PL2303 Serial Port adapter doesn't work in either ubuntu 13:10 or 14:04

  9. 9

    FreeBSD ZFS: missing top-level device in zpool

  10. 10

    My ZFS dataset is gone after system upgrade/reboot (ubuntu)

  11. 11

    Ubuntu 20.04 with root on ZFS errors after 'apt dist-upgrade'

  12. 12

    Device not managed after upgrade to ubuntu 16

  13. 13

    zpool missing after kernel upgrade attempt

  14. 14

    After upgrade for Android Studio 2.1.1 Error:(30, 13)

  15. 15

    After upgrade for Android Studio 2.1.1 Error:(30, 13)

  16. 16

    Terminal application erased from Ubuntu 13

  17. 17

    upgrade from 12.10 to 13.x - says "no new release found"

  18. 18

    How to upgrade from Ipython Notebook .12 to .13 (Linux)?

  19. 19

    HP Mini upgrade from 12.04 to 13.?? failed

  20. 20

    How does one exclude a zpool from zfs-auto-snapshot

  21. 21

    How to format current datetime in this format "2020-04-10T13:58:59.000+0000" in TypeScipt

  22. 22

    Dell XPS 13 9360 Dualboot Windows 10 and Ubuntu 16.04

  23. 23

    Dell XPS 13 9360 Dualboot Windows 10 and Ubuntu 16.04

  24. 24

    Trash icon and files have disappeared from the desktop after upgrade to Ubuntu 19.04

  25. 25

    No Boot Device Found on partitioned laptop after Windows 10 upgrade

  26. 26

    How to update Dell repositories after upgrading XPS 13 to Ubuntu 18.04

  27. 27

    Dell xps 13 ubuntu 20 touchpad not moving after login

  28. 28

    Ubuntu 20.04 Dell xps 13 touchpad not working after login

  29. 29

    Sum of integers, not counting 13 and the number after 13

HotTag

Archive