Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import failure, weird unavail issue #3107

Closed
nevion opened this issue Feb 14, 2015 · 16 comments
Closed

import failure, weird unavail issue #3107

nevion opened this issue Feb 14, 2015 · 16 comments
Milestone

Comments

@nevion
Copy link

nevion commented Feb 14, 2015

So I use mpt2sas for my 2 disk arrays. Since kernel 3.16 or so, there has been some change that causes the drives to export differently under /dev/disk/by-id as such:
ata-TOSHIBA_DT01ACA300_Z2T3B8LAS-part1 -> scsi-SATA_TOSHIBA_DT01ACA3_Z2T3B8LAS-part1

Apparently the way to fix device name based issue this is to fake the death of the drives (one at a time) and replace it with another... like it's self. I've done this for a number of disks and didn't really encounter an issue until today. Keep in mind I only was trying to replace the last drive of each raidz group. Somehow this has resulted in UNAVAIL OFFLINE and now UNAVAIL corrupted data. The machine has ECC ram and I've not noted anything else out of the ordinary.

The procedure I've been using is to start from a clean boot - auto import of the raid fails because the ata devices do not exist under /dev/disk/by-id. I then create the symlinks to them based on what zfs status reports for the vdev and what matches the serial numbers and starts with scsi-sata under /dev/disk/by-id.except for the ones which I will be replacing. I then zfs replace the devices in question - usually I'm greeted with a error saying that drive is still part of the group even though it is marked unavail. So to get around that I run zfs export, then zfs labelclear vdev and import the pool again. After that was done today however somehow device 5 (10976772185152087831 and 14507462425068499796) both started reporting unavail and after a couple of reboots it said corrupted data and somehow spread to device 6 in both pools. I'll also point out somehow the vdev paths it is using change on import (when it is having trouble importing devices) to numbers (like above) and scsi- - It has done this (erroneous?) path change all throughout this process of device replacing.

zpool import -d /dev/disk/by-id/
   pool: storage
     id: 18405946887743981906
  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:

        storage                                               DEGRADED
          raidz2-0                                            ONLINE
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T3B8LAS              ONLINE
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T44J4AS-part1        ONLINE
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T4615AS-part1        ONLINE                                                                                  
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T4D24AS-part1        ONLINE                                                                                  
            10976772185152087831                              UNAVAIL  corrupted data                                                                 
            14419488228501462420                              UNAVAIL  corrupted data                                                                 
            13636846573961515177                              UNAVAIL  corrupted data                                                                 
          raidz2-1                                            DEGRADED                                                                                
            scsi-SATA_Hitachi_HDS72303_MS79215X09KLNA-part1   ONLINE
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T25ZYAS-part1        ONLINE
            scsi-SATA_WDC_WD30EFRX-68A_WD-WCC1T0781750-part1  ONLINE
            14507462425068499796                              UNAVAIL  corrupted data
            scsi-35000c5003cd6fffd                            UNAVAIL  corrupted data
            scsi-350014ee2b3051234                            UNAVAIL  corrupted data
            14052951480466135352                              UNAVAIL
 zdb -e -p /dev/disk/by-id/ storage

Configuration for import:
        vdev_children: 2
        version: 5000
        pool_guid: 18405946887743981906
        name: 'storage'
        state: 0
        vdev_tree:
            type: 'root'
            id: 0
            guid: 18405946887743981906
            children[0]:
                type: 'raidz'
                id: 0
                guid: 98709332956160999
                nparity: 2
                metaslab_array: 30
                metaslab_shift: 37
                ashift: 12
                asize: 21004107120640
                is_log: 0
                create_txg: 4
                children[0]:
                    type: 'disk'
                    id: 0
                    guid: 6339672892164796
                    whole_disk: 1
                    DTL: 34
                    create_txg: 4
                    path: '/dev/disk/by-id/scsi-SATA_TOSHIBA_DT01ACA3_Z2T3B8LAS-part1'
                children[1]:
                    type: 'disk'
                    id: 1
                    guid: 14549786761647193227
                    whole_disk: 0
                    DTL: 4269
                    create_txg: 4
                    path: '/dev/disk/by-id/scsi-SATA_TOSHIBA_DT01ACA3_Z2T44J4AS-part1'
                children[2]:
                    type: 'disk'
                    id: 2
                    guid: 7272105023046033440
                    whole_disk: 0
                    DTL: 8195
                    create_txg: 4
                    path: '/dev/disk/by-id/scsi-SATA_TOSHIBA_DT01ACA3_Z2T4615AS-part1'
                children[3]:
                    type: 'disk'
                    id: 3
                    guid: 12001441393190676952
                    whole_disk: 0
                    DTL: 8201
                    create_txg: 4
                    path: '/dev/disk/by-id/scsi-SATA_TOSHIBA_DT01ACA3_Z2T4D24AS-part1'
                children[4]:
                    type: 'disk'
                    id: 4
                    guid: 10976772185152087831
                    phys_path: '/dev/gpt/TOSH_Z2T5P7MAS'
                    whole_disk: 1
                    not_present: 1
                    DTL: 73
                    create_txg: 4
                    path: '/dev/disk/by-id/scsi-35000039ff4c2959c'
                children[5]:
                    type: 'disk'
                    id: 5
                    guid: 14419488228501462420
                    phys_path: '/dev/gpt/TOSH_Z2T5W48AS'
                    whole_disk: 1
                    not_present: 1
                    DTL: 70
                    create_txg: 4
                    path: '/dev/disk/by-id/scsi-0ATA_TOSHIBA_DT01ACA3_Z2T5W48AS'
                children[6]:
                    type: 'disk'
                    id: 6
                    guid: 13636846573961515177
                    path: '/dev/disk/by-id/scsi-35000039ff4c2aff9'
                    phys_path: '/dev/gpt/TOSH_Z2T5X8AAS'
                    whole_disk: 1
                    not_present: 1
                    DTL: 61
                    create_txg: 4
            children[1]:
                type: 'raidz'
                id: 1
                guid: 10985882145574087229
                nparity: 2
                metaslab_array: 24
                metaslab_shift: 37
                ashift: 12
                asize: 21004107120640
                is_log: 0
                create_txg: 30560
                children[0]:
                    type: 'disk'
                    id: 0
                    guid: 6945219493890887179
                    whole_disk: 0
                    DTL: 4271
                    create_txg: 30560
                    path: '/dev/disk/by-id/scsi-SATA_Hitachi_HDS72303_MS79215X09KLNA-part1'
                children[1]:
                    type: 'disk'
                    id: 1
                    guid: 17780031005578215372
                    whole_disk: 0
                    DTL: 8200
                    create_txg: 30560
                    path: '/dev/disk/by-id/scsi-SATA_TOSHIBA_DT01ACA3_Z2T25ZYAS-part1'
                children[2]:
                    type: 'disk'
                    id: 2
                    guid: 2797484648281213392
                    whole_disk: 0
                    DTL: 8203
                    create_txg: 30560
                    path: '/dev/disk/by-id/scsi-SATA_WDC_WD30EFRX-68A_WD-WCC1T0781750-part1'
                children[3]:
                    type: 'disk'
                    id: 3
                    guid: 14507462425068499796
                    whole_disk: 0
                    not_present: 1
                    DTL: 92
                    create_txg: 30560
                    path: '/dev/disk/by-id/scsi-35000cca37ec4bd40'
                children[4]:
                    type: 'disk'
                    id: 4
                    guid: 10916108032243682504
                    whole_disk: 0
                    DTL: 91
                    create_txg: 30560
                    path: '/dev/disk/by-id/scsi-35000c5003cd6fffd'
                children[5]:
                    type: 'disk'
                    id: 5
                    guid: 8076027686180084832
                    whole_disk: 0
                    DTL: 90
                    create_txg: 30560
                    path: '/dev/disk/by-id/scsi-350014ee2b3051234'
                children[6]:
                    type: 'disk'
                    id: 6
                    guid: 14052951480466135352
                    path: '/dev/disk/by-id/scsi-350014ee2b4b6726d'
                    whole_disk: 0
                    not_present: 1
                    DTL: 86
                    create_txg: 30560
zdb: can't open 'storage': No such device or addres

I'm completely baffled at this result. As I poked around and rebooted I've noticed the paths keep changing. All the devices exist though though - I can cat/dd from them just fine.

Versions: zfs-0.6.3_git.1423692317.e02b533 , kernel 3.16.7 on OpenSUSE 13.2.

Where do I go from here?

@nevion
Copy link
Author

nevion commented Feb 17, 2015

Bueller?

Not sure if this is the case but based on my readings of similar things on the issue tracker, this isn't just a "help me!" - I'd really like to know what's going on here and I think I have some legitimate bugs... so it's ultimately a combo posting:

  1. why can't the pool see the devices that are present - there is no diagnostic info available that I can find for this. This to me is a bug and its obviously a good thing to inquire into since it's currently a blocker for my storage from coming up. This may not be immediately obvious from the zpool status but a few devices started reporting unvail offline despite the paths they're looking for existing and working fine.
  2. why unavailable and "corruption" has spread to multiple devices - assuming 1 is fixed I currently will have not lost data as far as I can tell but then I don't know what caused this spread. The hardware is good to my knowledge and poking. Obviously corruption is scary and I don't really get why it would be present.
  3. why is it so dang hard to deal with that device path name change.

All throughout this endeavor I've dmesg'd regularly - there has been no hardware messages past boot and nothing erroneous..

@nevion
Copy link
Author

nevion commented Feb 18, 2015

Small updates:

I've been cruising the ML and issue trackers and have spotted some similiar things but really nothing figuring out what causes these problems - they're just worked around (while being a little more managable), given up on, or replacing the device / rebooting seems to work.

Since then I've installed debug builds from git sources and here's some output of
zpool import -f -F -n -d /dev/disk/by-id/ storage

[ 1202.072559] SPL: using hostid 0x00000000
[ 1202.943615] WARNING: can't open objset for storage/backup
[ 1203.590879] WARNING: can't open objset for storage/backup
[ 1204.167315] WARNING: can't open objset for storage/backup
[ 1204.795534] WARNING: can't open objset for storage/backup

and here's another listing of
zdb -e -p /dev/disk/by-id/ storage
Pay attention to the last 2 lines. And what is up with all the not presents! I did remove the last device in the 2nd raidz group prior to all the listings of zfs status corruption.

zdb -e -p /dev/disk/by-id/ storage

Configuration for import:
        vdev_children: 2
        version: 5000
        pool_guid: 18405946887743981906
        name: 'storage'
        state: 0
        vdev_tree:
            type: 'root'
            id: 0
            guid: 18405946887743981906
            children[0]:
                type: 'raidz'
                id: 0
                guid: 98709332956160999
                nparity: 2
                metaslab_array: 30
                metaslab_shift: 37
                ashift: 12
                asize: 21004107120640
                is_log: 0
                create_txg: 4
                children[0]:
                    type: 'disk'
                    id: 0
                    guid: 6339672892164796
                    whole_disk: 1
                    DTL: 34
                    create_txg: 4
                    path: '/dev/disk/by-id/scsi-SATA_TOSHIBA_DT01ACA3_Z2T3B8LAS-part1'
                children[1]:
                    type: 'disk'
                    id: 1
                    guid: 14549786761647193227
                    whole_disk: 0
                    DTL: 4269
                    create_txg: 4
                    path: '/dev/disk/by-id/scsi-SATA_TOSHIBA_DT01ACA3_Z2T44J4AS-part1'
                children[2]:
                    type: 'disk'
                    id: 2
                    guid: 7272105023046033440
                    whole_disk: 0
                    DTL: 8195
                    create_txg: 4
                    path: '/dev/disk/by-id/scsi-SATA_TOSHIBA_DT01ACA3_Z2T4615AS-part1'
                children[3]:
                    type: 'disk'
                    id: 3
                    guid: 12001441393190676952
                    whole_disk: 0
                    DTL: 8201
                    create_txg: 4
                    path: '/dev/disk/by-id/scsi-SATA_TOSHIBA_DT01ACA3_Z2T4D24AS-part1'
                children[4]:
                    type: 'disk'
                    id: 4
                    guid: 10976772185152087831
                    phys_path: '/dev/gpt/TOSH_Z2T5P7MAS'
                    whole_disk: 1
                    not_present: 1
                    DTL: 73
                    create_txg: 4
                    path: '/dev/disk/by-id/scsi-35000039ff4c2959c'
                children[5]:
                    type: 'disk'
                    id: 5
                    guid: 14419488228501462420
                    phys_path: '/dev/gpt/TOSH_Z2T5W48AS'
                    whole_disk: 1
                    not_present: 1
                    DTL: 70
                    create_txg: 4
                    path: '/dev/disk/by-id/scsi-0ATA_TOSHIBA_DT01ACA3_Z2T5W48AS'
                children[6]:
                    type: 'disk'
                    id: 6
                    guid: 13636846573961515177
                    path: '/dev/disk/by-id/scsi-35000039ff4c2aff9'
                    phys_path: '/dev/gpt/TOSH_Z2T5X8AAS'
                    whole_disk: 1
                    not_present: 1
                    DTL: 61
                    create_txg: 4
            children[1]:
                type: 'raidz'
                id: 1
                guid: 10985882145574087229
                nparity: 2
                metaslab_array: 24
                metaslab_shift: 37
                ashift: 12
                asize: 21004107120640
                is_log: 0
                create_txg: 30560
                children[0]:
                    type: 'disk'
                    id: 0
                    guid: 6945219493890887179
                    whole_disk: 0
                    DTL: 4271
                    create_txg: 30560
                    path: '/dev/disk/by-id/scsi-SATA_Hitachi_HDS72303_MS79215X09KLNA-part1'
                children[1]:
                    type: 'disk'
                    id: 1
                    guid: 17780031005578215372
                    whole_disk: 0
                    DTL: 8200
                    create_txg: 30560
                    path: '/dev/disk/by-id/scsi-SATA_TOSHIBA_DT01ACA3_Z2T25ZYAS-part1'
                children[2]:
                    type: 'disk'
                    id: 2
                    guid: 2797484648281213392
                    whole_disk: 0
                    DTL: 8203
                    create_txg: 30560
                    path: '/dev/disk/by-id/scsi-SATA_WDC_WD30EFRX-68A_WD-WCC1T0781750-part1'
                children[3]:
                    type: 'disk'
                    id: 3
                    guid: 14507462425068499796
                    whole_disk: 0
                    not_present: 1
                    DTL: 92
                    create_txg: 30560
                    path: '/dev/disk/by-id/scsi-35000cca37ec4bd40'
                children[4]:
                    type: 'disk'
                    id: 4
                    guid: 10916108032243682504
                    whole_disk: 0
                    DTL: 91
                    create_txg: 30560
                    path: '/dev/disk/by-id/scsi-35000c5003cd6fffd'
                children[5]:
                    type: 'disk'
                    id: 5
                    guid: 8076027686180084832
                    whole_disk: 0
                    DTL: 90
                    create_txg: 30560
                    path: '/dev/disk/by-id/scsi-350014ee2b3051234'
                children[6]:
                    type: 'disk'
                    id: 6
                    guid: 14052951480466135352
                    path: '/dev/disk/by-id/scsi-350014ee2b4b6726d'
                    whole_disk: 0
                    not_present: 1
                    DTL: 86
                    create_txg: 30560
WARNING: can't open objset for storage/backup
zdb: can't open 'storage': No such device or address

If I should move this to the ML I'd be more than happy to but the lack of response here is striking me as ignoring... does any dev care to chime in yet?

@setharnold
Copy link

zpool import -d /dev/disks/by-id/ poolname would have been the far easier solution to the original problem. Fixing the new problem is beyond me, though...

@nevion
Copy link
Author

nevion commented Feb 21, 2015

@setharnold Yes, I tried that numerous times before this got all crazy - back when I first found the dev paths changing on upgrade to 3.16. I exported the pool and imported it again with that command It didn't work at the time - only symlinking would allow the drives be found. Eventually I started replacing the drives one at a time which as I said wasn't too problematic till this instance.

I suspected this might be related to why it isn't/wastn't before "corruption" picking up the devices that were available. Is there any debugging this mechanism that is probing for the drives available to see why it fails?

@dasjoe
Copy link
Contributor

dasjoe commented Mar 2, 2015

I suspect this stems from using an older FreeBSD which did not create partitions, @ryao explained how he helped fix a related issue in #3024. That issue is not too similar to this one, though.

Are there partitions on the devices marked UNAVAIL? If so, it could help to rm the raw device link but keep the partition links in /dev/disk/by-id/ before running zpool import -d /dev/disk/by-id/, like:
rm /dev/disk/by-id/scsi-350014ee2b4b6726d.

@nevion
Copy link
Author

nevion commented Mar 3, 2015

@dasjoe - yes, I started with Freebsd but the machine had to do more than be a nas so I moved it over to ZoL once it was looking usable. It was only the first vdev group that I created with zfs. I tried to keep everything looking the same with gdisk/cgdisk as I added in pool 2 a year+ ago. @ryao 's fix seems to be something worth trying as I've replaced these disks and pool 1 had some experimental setups on it before it went stable - I've always used the same poolname for them since there was just one instance at a time.

I tried rming the raw device and there was a small change, the last drive of raidz2-0 isn't marked corrupted, just unavail now:

   pool: storage
     id: 18405946887743981906
  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:

        storage                                               DEGRADED
          raidz2-0                                            DEGRADED
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T3B8LAS              ONLINE
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T44J4AS-part1        ONLINE
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T4615AS-part1        ONLINE
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T4D24AS-part1        ONLINE
            10976772185152087831                              UNAVAIL  corrupted data
            14419488228501462420                              UNAVAIL  corrupted data
            13636846573961515177                              UNAVAIL
          raidz2-1                                            DEGRADED
            scsi-SATA_Hitachi_HDS72303_MS79215X09KLNA-part1   ONLINE
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T25ZYAS-part1        ONLINE
            scsi-SATA_WDC_WD30EFRX-68A_WD-WCC1T0781750-part1  ONLINE
            14507462425068499796                              UNAVAIL  corrupted data
            scsi-SATA_ST3000DM001-9YN1_W1F1AVV6               UNAVAIL  corrupted data
            scsi-SATA_WDC_WD30EFRX-68A_WD-WCC1T0804382        UNAVAIL  corrupted data
            14052951480466135352                              UNAVAIL

I also added a gist for parted print all: https://gist.github.com/nevion/179eade4f8b42773126f

@ryao - do you think I should try your approach in #3024 to deal with those corrupted data vdevs?

@ryao
Copy link
Contributor

ryao commented Mar 3, 2015

@nevion My apologies for the delayed response, but most of us are very busy at the moment. Doing the procedure from #3024 would make things worse if it is not the right thing to do, but it is worth a try with some precautions. In specific, you should make images of the disks that are unavailable. In this situation, just the GPT partition tables need to be imaged, so the first 10MB of the front and last 10MB of the back should be more than sufficient. It is also possible to backup the GPT partition tables with sgdisk, which is far more surgical than using dd.

That said, I would be happy to help you in IRC between 5pm to 9pm EST. If this pool belongs to a business, I would like to be paid for my effort (I charge $2000 per attempt) while if it is your own or belongs to a non-profit organization, I do not charge.

@nevion
Copy link
Author

nevion commented Mar 4, 2015

@ryao left some messages to you on irc

so far I've taken one drive from the pool, backed up the gpt header w/ sgdisk and dumped the list again with zdb -l
I updated the gist with the steps I've taken: https://gist.github.com/nevion/179eade4f8b42773126f and a zdb -l of a healthy drive from that same raidz group.

it looks to me it is seeing the old freebsd vdev... a mix of it rather, I forgot linux does not have /dev/gpt and I noticed them in the zdb list

@nevion
Copy link
Author

nevion commented Mar 9, 2015

I've added some additional gist files:

This shows zdb -lu for each partition currently plugged into the pool:
https://gist.github.com/nevion/e3a81206a8bc40f47e60

This breaks down devices into controller and status to determine hardware correlations (I did not spot any)
https://gist.github.com/nevion/706c79a429fe1b252d9b

@ryao astutely observed the txg's of some devices are higher than in others. He suspected my HBA's of having a write cache. I confirmed with jasonwc on irc that with the LSI 2008 IT firmwares, these cards don't do write-caching - so that theory is out. By the way, the cards are running IT firmware version PH14 and the card models are Supermicro AOC-USAS2-L8i.

So far, @ryao has thought that one thing worth a shot would be rewinding to the transaction present to all drives (rewinding the drives into the past). We've not yet done that and are making sure it's the best strategy.

@behlendorf behlendorf added this to the 0.6.4 milestone Mar 25, 2015
@nevion
Copy link
Author

nevion commented Mar 25, 2015

@behlendorf

I updated to git HEAD to snag this patch. zpool import still get's confused with the wwn / scsi-3xxx entries for my harddrives. As such I move them somewhere else while testing importing.

I'm still getting one drive missing which might have been labelcleared, the other I have disconnected and will reconnect momentarily.

pool import -d /dev/disk/by-id/
   pool: storage
     id: 18405946887743981906
  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:

        storage                                               DEGRADED
          raidz2-0                                            ONLINE
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T3B8LAS              ONLINE
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T44J4AS-part1        ONLINE
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T4615AS-part1        ONLINE
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T4D24AS-part1        ONLINE
            10976772185152087831                              UNAVAIL  corrupted data
            14419488228501462420                              UNAVAIL  corrupted data
            scsi-35000039ff4c2aff9                            ONLINE
          raidz2-1                                            DEGRADED
            scsi-SATA_Hitachi_HDS72303_MS79215X09KLNA-part1   ONLINE
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T25ZYAS-part1        ONLINE
            scsi-SATA_WDC_WD30EFRX-68A_WD-WCC1T0781750-part1  ONLINE
            scsi-35000cca37ec4bd40-part1                      ONLINE
            scsi-35000c5003cd6fffd-part1                      ONLINE
            scsi-350014ee2b3051234-part1                      ONLINE
            14052951480466135352                              UNAVAIL
cd /dev/disk/by-id/
mkdir wwn; mv wwn-* wwn/
mkdir scsi; mv scsi-35* scsi/

and doing zpool import -d /dev/disk/by-id/ again:

   pool: storage
     id: 18405946887743981906
  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:

        storage                                               DEGRADED
          raidz2-0                                            ONLINE
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T3B8LAS              ONLINE
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T44J4AS-part1        ONLINE
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T4615AS-part1        ONLINE
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T4D24AS-part1        ONLINE
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T5P7MAS              ONLINE
            14419488228501462420                              UNAVAIL  corrupted data
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T5X8AAS              ONLINE
          raidz2-1                                            DEGRADED
            scsi-SATA_Hitachi_HDS72303_MS79215X09KLNA-part1   ONLINE
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T25ZYAS-part1        ONLINE
            scsi-SATA_WDC_WD30EFRX-68A_WD-WCC1T0781750-part1  ONLINE
            scsi-SATA_Hitachi_HDS72303_MS79215X0AE63A-part1   ONLINE
            scsi-SATA_ST3000DM001-9YN1_W1F1AVV6-part1         ONLINE
            scsi-SATA_WDC_WD30EFRX-68A_WD-WCC1T0804382-part1  ONLINE
            14052951480466135352                              UNAVAIL

I'm about to go resolve the bottom missing drive which also might have been label cleared. As is the drives here all show online - should I try importing them whether or not that missing drive gets detected?

@behlendorf I also want to be cautious because while debugging with @ryao - several of my drives, according to zdb -lu, have different txg ids, greater than a few hundred. I attribute this to zfs starting a resilvering - I recall it saying it didn't have enough drives at the time to import but it was resilvering (automatically) anyway.

@nevion
Copy link
Author

nevion commented Mar 25, 2015

small update, plugged in last drive of pool and we currently are here:

globalhawk:/ # zpool import -d /dev/disk/by-id/
   pool: storage
     id: 18405946887743981906
  state: ONLINE
 status: One or more devices contains corrupted data.
 action: The pool can be imported using its name or numeric identifier.
   see: http://zfsonlinux.org/msg/ZFS-8000-4J
 config:

        storage                                               ONLINE
          raidz2-0                                            ONLINE
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T3B8LAS              ONLINE
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T44J4AS-part1        ONLINE
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T4615AS-part1        ONLINE
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T4D24AS-part1        ONLINE
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T5P7MAS              ONLINE
            14419488228501462420                              UNAVAIL  corrupted data
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T5X8AAS              ONLINE
          raidz2-1                                            ONLINE
            scsi-SATA_Hitachi_HDS72303_MS79215X09KLNA-part1   ONLINE
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T25ZYAS-part1        ONLINE
            scsi-SATA_WDC_WD30EFRX-68A_WD-WCC1T0781750-part1  ONLINE
            scsi-SATA_Hitachi_HDS72303_MS79215X0AE63A-part1   ONLINE
            scsi-SATA_ST3000DM001-9YN1_W1F1AVV6-part1         ONLINE
            scsi-SATA_WDC_WD30EFRX-68A_WD-WCC1T0804382-part1  ONLINE
            scsi-SATA_WDC_WD30EFRX-68E_WD-WCC4N0963811-part1  ONLINE

@dasjoe
Copy link
Contributor

dasjoe commented Mar 25, 2015

@nevion that's looking good so far. The corrupted data disk is the
labelcleared one?
After carry through with the import, then doing a clean export, ZFS should
no longer try to import using wwn-* or scsi-35* names.

Regards,
Hajo Möller

@nevion
Copy link
Author

nevion commented Mar 25, 2015

@dasjoe It's this drive: https://gist.github.com/nevion/e3a81206a8bc40f47e60#file-scsi-sata_wdc_wd30efrx-68a_wd-wcc1t0804382-part1

Actually I don't know why I forgot this but here is a zfs history before the pool started getting bogged down with "corruption": https://gist.githubusercontent.com/nevion/0bcb7010e52184b07576/raw/zfshist.txt

I'm not sure I ever succeeded in labelclearing although I typed commands to do it - I always got errors about the drive being active in the pool, event though it was marked as offline in status. I tricked it into that by not creating the old symlinks the zfs cache file prior to 3.16 was expecting for those drives I wanted to clear and replace.

You can see the updates in the uber block for the drive and the log superseding it if I read it right.

Still waiting on expert opinion to tell me if I should go ahead and attempt import or collect diagnostics etc. The data on the drives matters.

@nevion
Copy link
Author

nevion commented Mar 31, 2015

OK well I've imported it successfully.

It's resilvering as expected.

So far I've gotten the following status and error list (note the metadata 0xb6 error):

zpool status -v
  pool: storage
 state: ONLINE
status: One or more devices is currently being resilvered.  The pool will
        continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
  scan: resilver in progress since Tue Mar 31 14:56:42 2015
    321G scanned out of 33.4T at 2.01G/s, 4h41m to go
    102M resilvered, 0.94% done
config:

        NAME                                                  STATE     READ WRITE CKSUM
        storage                                               ONLINE       0     0     0
          raidz2-0                                            ONLINE       0     0     0
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T3B8LAS              ONLINE       0     0     0
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T44J4AS-part1        ONLINE       0     0     0
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T4615AS-part1        ONLINE       0     0     0
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T4D24AS-part1        ONLINE       0     0     0
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T5P7MAS              ONLINE       0     0     0  (resilvering)
            14419488228501462420                              UNAVAIL      0     0     0  was /dev/disk/by-id/scsi-0ATA_TOSHIBA_DT01ACA3_Z2T5W48AS
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T5X8AAS              ONLINE       0     0     0  (resilvering)
          raidz2-1                                            ONLINE       0     0     0
            scsi-SATA_Hitachi_HDS72303_MS79215X09KLNA-part1   ONLINE       0     0     0
            scsi-SATA_TOSHIBA_DT01ACA3_Z2T25ZYAS-part1        ONLINE       0     0     0
            scsi-SATA_WDC_WD30EFRX-68A_WD-WCC1T0781750-part1  ONLINE       0     0     0
            scsi-SATA_Hitachi_HDS72303_MS79215X0AE63A-part1   ONLINE       0     0     4  (resilvering)
            scsi-SATA_ST3000DM001-9YN1_W1F1AVV6-part1         ONLINE       0     0     0
            scsi-SATA_WDC_WD30EFRX-68A_WD-WCC1T0804382-part1  ONLINE       0     0     0
            scsi-SATA_WDC_WD30EFRX-68E_WD-WCC4N0963811-part1  ONLINE       0     0     1  (resilvering)

errors: Permanent errors have been detected in the following files:

        <metadata>:<0xb6>

@nevion
Copy link
Author

nevion commented Apr 4, 2015

The resilver completed without further incidence. I then replaced the "corrupted" vdev with the same disk and that completed without issue and then I scrubbed the pool. So it's a full recovery.

DeHackEd pushed a commit to DeHackEd/zfs that referenced this issue Apr 4, 2015
When using 'zpool import' to scan for available pools prefer vdev names
which reference vdevs with more valid labels.  There should be two labels
at the start of the device and two labels at the end of the device.  If
labels are missing then the device has been damaged or is in some other
way incomplete.  Preferring names with fully intact labels helps weed out
bad paths and improves the likelihood of being able to import the pool.

This behavior only applies when scanning /dev/ for valid pools.  If a
cache file exists the pools described by the cache file will be used.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chris Dunlap <cdunlap@llnl.gov>
Closes openzfs#3145
Closes openzfs#2844
Closes openzfs#3107
DeHackEd pushed a commit to DeHackEd/zfs that referenced this issue Apr 5, 2015
When using 'zpool import' to scan for available pools prefer vdev names
which reference vdevs with more valid labels.  There should be two labels
at the start of the device and two labels at the end of the device.  If
labels are missing then the device has been damaged or is in some other
way incomplete.  Preferring names with fully intact labels helps weed out
bad paths and improves the likelihood of being able to import the pool.

This behavior only applies when scanning /dev/ for valid pools.  If a
cache file exists the pools described by the cache file will be used.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chris Dunlap <cdunlap@llnl.gov>
Closes openzfs#3145
Closes openzfs#2844
Closes openzfs#3107
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@behlendorf @dasjoe @ryao @nevion @setharnold and others