Cannot Import a ZPOOL one disk Offline cannot be put Online

Status
Not open for further replies.

delphij

FreeNAS Core Team
Joined
Jan 10, 2012
Messages
37
Maybe I couldn't be clear enough, I ask your forgiveness, english is not my first language.

But it's not the new drive. It appears to be a new drive but it is the old one. All the disks on the system are the original ones.

I track them by serial numbers.

I have two disks with problems:

Serial: gptid (actual) guid Obs
WD-WCAWZ2048219 909c7a13-f62a-11e2-8b68-386077d5d4c9 This disk was gptid d526c082-2cd7-11e2-ac7a-386077d5d4c9, guid 9895012226997409189. Never leaved its bay until the issue appear.
6YD18NRA 62090488-915b-11e1-8fc4-386077d5d4c9 13020385326369302278 Offline - this disk was chosen for replace for a bigger one. If put alone in the system it says "online".

Edited the table formatting.


In this case, it's very likely that the data is already lost, however, there are two things you can try.

Note that please follow exactly what I have described here -- if you see errors, please reply this post and DO NOT try anything else.

The first thing that may be helpful:

Code:
zpool import -R /mnt -m -f -n -F -X RAIDZ


This will attempt to discard some transactions and roll back your pool to a previous state. If the output looks sane, you can try:

Code:
zpool import -R /mnt -m -f -F -X RAIDZ


To get your pool back.

If this won't work, please paste output from:

Code:
zdb -hh -e RAIDZ


And let's see if we can do something from there.
 

Ricardo Cardoso

Dabbler
Joined
Jul 27, 2013
Messages
21
I cant understand why there is no command to set the offline disk to online again if the pool is not online.

The results from the commands:
Code:
[root@freenas] ~# zpool import -R /mnt -m -f -n -F -X RAIDZ
[root@freenas] ~# zdb -hh -e RAIDZ
zdb: can't open 'RAIDZ': File exists
 

Ricardo Cardoso

Dabbler
Joined
Jul 27, 2013
Messages
21
Is there a way to edit line 40?

Code:
[root@freenas] ~# zdb -e RAIDZ
 
Configuration for import:
        vdev_children: 1
        version: 28
        pool_guid: 3634811780714734649
        name: 'RAIDZ'
        state: 0
        hostid: 961793063
        hostname: 'freenas.local'
        vdev_tree:
            type: 'root'
            id: 0
            guid: 3634811780714734649
            children[0]:
                type: 'raidz'
                id: 0
                guid: 10924028041746693314
                nparity: 1
                metaslab_array: 23
                metaslab_shift: 36
                ashift: 12
                asize: 7992986566656
                is_log: 0
                children[0]:
                    type: 'disk'
                    id: 0
                    guid: 14304907434654768162
                    phys_path: '/dev/gptid/618319ef-915b-11e1-8fc4-386077d5d4c9'
                    whole_disk: 0
                    DTL: 2114
                    path: '/dev/gptid/618319ef-915b-11e1-8fc4-386077d5d4c9'
                children[1]:
                    type: 'disk'
                    id: 1
                    guid: 13020385326369302278
                    phys_path: '/dev/gptid/62090488-915b-11e1-8fc4-386077d5d4c9'
                    whole_disk: 0
                    DTL: 821
                    offline: 1
                    path: '/dev/gptid/62090488-915b-11e1-8fc4-386077d5d4c9'
                children[2]:
                    type: 'disk'
                    id: 2
                    guid: 7977152662060063089
                    phys_path: '/dev/gptid/6287ea8f-915b-11e1-8fc4-386077d5d4c9'
                    whole_disk: 0
                    DTL: 668
                    path: '/dev/gptid/6287ea8f-915b-11e1-8fc4-386077d5d4c9'
                children[3]:
                    type: 'disk'
                    id: 3
                    guid: 9895012226997409189
                    path: '/dev/gptid/d526c082-2cd7-11e2-ac7a-386077d5d4c9'
                    phys_path: '/dev/gptid/d526c082-2cd7-11e2-ac7a-386077d5d4c9'
                    whole_disk: 1
                    DTL: 979
zdb: can't open 'RAIDZ': File exists
 

delphij

FreeNAS Core Team
Joined
Jan 10, 2012
Messages
37
Hi,

I cant understand why there is no command to set the offline disk to online again if the pool is not online.

The results from the commands:
Code:
[root@freenas] ~# zpool import -R /mnt -m -f -n -F -X RAIDZ
[root@freenas] ~# zdb -hh -e RAIDZ
zdb: can't open 'RAIDZ': File exists


What does 'zpool status' say right now? It looks like the pool is imported?
 

delphij

FreeNAS Core Team
Joined
Jan 10, 2012
Messages
37
Can you try:

zdb -AAA -L -t 5632597 -du RAIDZ

And see if the output is sane (have all your datasets and the timestamp give you a reasonable time point; all data created after that point would be lost)? If it's sensible, try:

zdb -AAA -L -t 5632597 -cb RAIDZ

If no errors is found, you should be able to import the pool with:

zpool import -o readonly=on -f -R /mnt -F -T 5632597 RAIDZ

If this worked, please copy your data off the pool to some other places, then try:

zpool import -f -R /mnt -F -T 5632597 RAIDZ

(You can try reducing the number 5632597 a little bit, but please start over from the first step if you do so).
Cheers,
 

Ricardo Cardoso

Dabbler
Joined
Jul 27, 2013
Messages
21
Code:
[root@freenas] ~# zdb -AAA -L -t 5632597 -du RAIDZ
zdb: can't open 'RAIDZ': No such file or directory
[root@freenas] ~# zdb -AAA -L -t 5632597 -cb RAIDZ
zdb: can't open 'RAIDZ': No such file or directory
[root@freenas] ~# zpool import -o readonly=on -f -R /mnt -F -T 5632597 RAIDZ
cannot import 'RAIDZ': no such pool or dataset
    Destroy and re-create the pool from
    a backup source.
 

Ricardo Cardoso

Dabbler
Joined
Jul 27, 2013
Messages
21
New error!

Since the only command that reply something without error is zdb -e RAIDZ and it bypass the cache file as far as I understood I renamed the cache file and tried your commands again with -e.
Code:
[root@freenas] ~# mv /data/zfs/zpool.cache /data/zfs/zpool.cache.bak
[root@freenas] ~# zdb -AAA -L -t 5664014 -du -e RAIDZ
Segmentation fault


Better, worse or just different?
 

Ricardo Cardoso

Dabbler
Joined
Jul 27, 2013
Messages
21
News from the front.

Trying with a fresh new instalation of FreeBSD this time. Segmentation fault only occurred on FreeNAS.
Using zpool import -f -nFX -V RAIDZ the pool is up, but not online, the state still UNAVAILABLE, one disk is unavailable and the other still offline.
The command zpool online RAIDZ 13020385326369302278 say: cannot open 'RAIDZ' : pool is unavailable.
 
Status
Not open for further replies.
Top