how to import a detached volume with status UNAVAIL

ashokmedia

Dabbler
Joined
May 26, 2019
Messages
11
I had a raidz 2by2 configuration,My zpool status changed to UNAVAIL. When i examined my hardware one of my hard disk is failure. After i replaced my hard disk with new one the status remained UNAVAIL. I detached the volume from gui. When I tried to import using shell command zpool import its showing error message "one or more device missing ...". Anyone please help me to repair and import my zpool.
 

ashokmedia

Dabbler
Joined
May 26, 2019
Messages
11
thanks for your reply
Code:
[root@freenas ~]# zpool import                                                                                                     
   pool: segate2by2                                                                                                                 
     id: 7849192800514392078                                                                                                       
  state: UNAVAIL                                                                                                                   
 status: One or more devices are missing from the system.                                                                           
 action: The pool cannot be imported. Attach the missing                                                                           
        devices and try again.                                                                                                     
   see: http://illumos.org/msg/ZFS-8000-6X                                                                                         
 config:                                                                                                                           
                                                                                                                                    
        segate2by2                                    UNAVAIL  missing device                                                       
          gptid/44dbc0c3-bc42-11e8-b444-001b21240432  ONLINE                                                                       
          gptid/e2344073-ea0f-11e5-b4ad-001b21240432  ONLINE                                                                       
          gptid/e2d70637-ea0f-11e5-b4ad-001b21240432  ONLINE                                                                       
                                                                                                                                    
        Additional devices are known to be part of this pool, though their                                                         
        exact configuration cannot be determined.       
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I had a raidz 2by2 configuration
There's no such thing (the closest thing I can think of to that terminology would have traditionally been called RAID 10, and with ZFS is called striped mirrors, but that wouldn't be any flavor of RAIDZ, and also isn't what you had). What you appear to have had was four disks striped, with one of the disks now missing or dead. Unless you can revive that disk for at least a while, your data is gone.
 

ashokmedia

Dabbler
Joined
May 26, 2019
Messages
11
There's no such thing (the closest thing I can think of to that terminology would have traditionally been called RAID 10, and with ZFS is called striped mirrors, but that wouldn't be any flavor of RAIDZ, and also isn't what you had). What you appear to have had was four disks striped, with one of the disks now missing or dead. Unless you can revive that disk for at least a while, your data is gone.
 

Attachments

  • 2019-05-28 (2).png
    2019-05-28 (2).png
    24 KB · Views: 403

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
yes this is how i created
The output of zpool import indicates that you're mistaken. That output indicates that you had three disks (which are available to the system) striped with at least one more (and from the rest of your post, almost certainly exactly one more). You had no redundancy in that configuration, so with the loss of one disk all the data in your pool is lost. The only way to get any of your data back is to bring that disk back online, or to restore from backup.
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
To get mirrors you needed to select “mirror” in the creation dialogue drop down. You show “stripe” and thus you will create a striped pool, regardless of how many rows of disks you have.
 

ashokmedia

Dabbler
Joined
May 26, 2019
Messages
11
The output of zpool import indicates that you're mistaken. That output indicates that you had three disks (which are available to the system) striped with at least one more (and from the rest of your post, almost certainly exactly one more). You had no redundancy in that configuration, so with the loss of one disk all the data in your pool is lost. The only way to get any of your data back is to bring that disk back online, or to restore from backup.

I already resilvered a disk a year before.So im sure that failure of a disk will not destroy my array.
 

ashokmedia

Dabbler
Joined
May 26, 2019
Messages
11
Is it possible to change the status of my zpool to degrade and resilver it with a new disk?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
I already resilvered a disk a year before.So im sure that failure of a disk will not destroy my array.
Based on what you have shown us, that can't be true... are you sure you resilvered and didn't just add a disk to the pool?
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
You can resilver a drive in a stripe as long as you don’t have checksum errors, but if you have an unavailable drive and you can’t revive it you lose the pool
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
As @garm pointed out, perhaps you did resilver by temporarily adding a disk, resilvering a working disk to it (which must work during the process), then removing the working original disk.

Zpool status (which is shown for an unimported pool with zpool import anyway) shows us that you don't have a redundant pool setup, so with a missing disk, you have no options to recover other than your backup (if you have one).
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
Grab the output of zpool history in one text file, the output of zdb -U /data/zfs/zpool.cache in another, and attach the two text files to a post here.

This will definitively tell you the past and present states of your pool.
 

ashokmedia

Dabbler
Joined
May 26, 2019
Messages
11
Grab the output of zpool history in one text file, the output of zdb -U /data/zfs/zpool.cache in another, and attach the two text files to a post here.

This will definitively tell you the past and present states of your pool.
sory for the delay
 

Attachments

  • try.txt
    5 KB · Views: 412

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
sory for the delay

Your zpool history is only showing the freenas-boot pool ... although since the other one is in an exported state that's probably to be expected.

But looking at the zdb output we can see that your pool was indeed created with four striped vdevs. All four disks are directly from the root.
 

ashokmedia

Dabbler
Joined
May 26, 2019
Messages
11
Your zpool history is only showing the freenas-boot pool ... although since the other one is in an exported state that's probably to be expected.

But looking at the zdb output we can see that your pool was indeed created with four striped vdevs. All four disks are directly from the root.
It's showing only boot because I detached segate2by2 volume. I had only that volume.
 
Top