Zpool MIrror goes into degraded state after ~12 hours?

Status
Not open for further replies.

jakeandchase

Explorer
Joined
Aug 26, 2014
Messages
53
Hi All,

I recently set up a zpool mirror with my exisiting 3tb drive and a new 3tb drive (identical drives).
It all worked fine following http://aarononeal.info/freenas-convert-an-encrypted-disk-to-mirror/ (due to my partitions being encrypted).

Now after about 12 hours I received an alert to say the pool is in a degraded state?

Code:
[root@freenas] ~# zpool status
  pool: DATA1
state: DEGRADED
status: One or more devices could not be opened.  Sufficient replicas exist for
        the pool to continue functioning in a degraded state.
action: Attach the missing device and online it using 'zpool online'.
   see: http://illumos.org/msg/ZFS-8000-2Q
  scan: resilvered 114G in 0h57m with 0 errors on Fri Dec 12 19:11:13 2014
config:

        NAME                                                STATE     READ WRITE                                                                                                                                                              CKSUM
        DATA1                                               DEGRADED     0     0                                                                                                                                                                  0
          mirror-0                                          DEGRADED     0     0                                                                                                                                                                  0
            gptid/1616f111-29cc-11e4-ba37-38eaa7abfe00.eli  ONLINE       0     0                                                                                                                                                                  0
            7337295173128088955                             UNAVAIL      0     0                                                                                                                                                                  0  was /dev/gptid/fca57713-81cc-11e4-ae0e-38eaa7abfe00.eli

errors: No known data errors

  pool: freenas-boot
state: ONLINE
  scan: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        freenas-boot  ONLINE       0     0     0
          da0p2     ONLINE       0     0     0

errors: No known data errors


If anyone could help, it'd be great :)
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Sorry, I won't be participating in this discussion. We really don't support.... whatever you are trying to do. I wouldn't even recommend that procedure to a friend. If they really wanted to go from encrypted single disk to a mirror I'd tell them to backup their data, destroy and recreate the pool from the WebGUI, and then copy the data back. What that webpage is doing may or may not work, and may or may not be the "proper" way to do things. In any case, not recommended as a conservative decision.
 

jakeandchase

Explorer
Joined
Aug 26, 2014
Messages
53
Sorry, I won't be participating in this discussion. We really don't support.... whatever you are trying to do. I wouldn't even recommend that procedure to a friend. If they really wanted to go from encrypted single disk to a mirror I'd tell them to backup their data, destroy and recreate the pool from the WebGUI, and then copy the data back. What that webpage is doing may or may not work, and may or may not be the "proper" way to do things. In any case, not recommended as a conservative decision.


It's essentially the same guide as shown https://forums.freenas.org/index.php?threads/create-zfs-mirror-by-adding-a-drive.14880/ but with 1 line on how to encrypt the mirrored partition.
 

mjws00

Guru
Joined
Jul 25, 2014
Messages
798
That thread is old and obsolete. I linked you the correct structure via Josh Paetzel's thread. Even included a snippet from notifier.py to show 4K alignment was not a guess.

Unfortunately, as soon as you got into encryption... my eyes glazed over. The CLI is nothing, encryption is just a disaster waiting to happen.

So you can do a few things:
1. Best. Build a new mirrored pool (unencrypted) via the GUI. Restore the data.
2.Detach the second disk. Make a NEW clean unencrypted pool via GUI. Copy the data. Add the original disk as a mirror. Export. Auto Import.
3.Mess around risking your data until you get it.

My guess is your access to the geli attached device is not persistent because the GUI doesn't know what's up. So the disk is unavailable to the pool. The good news is you are only degraded and not unavailable so you can backup and restore easily.
 

jakeandchase

Explorer
Joined
Aug 26, 2014
Messages
53
That thread is old and obsolete. I linked you the correct structure via Josh Paetzel's thread. Even included a snippet from notifier.py to show 4K alignment was not a guess.

Unfortunately, as soon as you got into encryption... my eyes glazed over. The CLI is nothing, encryption is just a disaster waiting to happen.

So you can do a few things:
1. Best. Build a new mirrored pool (unencrypted) via the GUI. Restore the data.
2.Detach the second disk. Make a NEW clean unencrypted pool via GUI. Copy the data. Add the original disk as a mirror. Export. Auto Import.
3.Mess around risking your data until you get it.

My guess is your access to the geli attached device is not persistent because the GUI doesn't know what's up. So the disk is unavailable to the pool. The good news is you are only degraded and not unavailable so you can backup and restore easily.

Would it possible to:
Format the NEW disk and put an unencrypted pool on it.
Copy my data from my ORIGINAL disk to the NEW unencrypted disk.
Format the ORIGINAL disk and set it up to mirror the NEW disk.

Thanks
 
Last edited:

mjws00

Guru
Joined
Jul 25, 2014
Messages
798
That is option 2. :)
 

jakeandchase

Explorer
Joined
Aug 26, 2014
Messages
53
That is option 2. :)
Excellent! I'll look into doing it when I get home.

So I should
Format the NEW drive in the gui and set up a pool the exact same (but unencrypted of coarse).
What would be the best way to copy the data across?
 

mjws00

Guru
Joined
Jul 25, 2014
Messages
798
Just build a second pool from the GUI and copy the data. I'd just use cp from the CLI, but you could rsync, or replicate zfs. It would be preferable to have the disk and mirror set up from the start via GUI, but it isn't the end of the world.
 

mjws00

Guru
Joined
Jul 25, 2014
Messages
798
Not partition. Create a new pool with the new drive. You can only pick stripe as it is a single device. Then make a dataset and copy the data.
 

jakeandchase

Explorer
Joined
Aug 26, 2014
Messages
53
Not partition. Create a new pool with the new drive. You can only pick stripe as it is a single device. Then make a dataset and copy the data.
Thanks.
I did some basic research and i'll attempt an rsync tonight. Do you know if there are any guides for this?
 

mjws00

Guru
Joined
Jul 25, 2014
Messages
798
You'll have to work through it a bit. But it shouldn't be too bad.
 

mjws00

Guru
Joined
Jul 25, 2014
Messages
798
It should do folders and files. If you need to replicate datasets and whatnot. Use replication. Both have a learning curve. For dead easy, you could simply use sync software between two shares on a windows box, or just drag and drop (slow). Each method has strengths and weaknesses. I am impatient so would work at the CLI so things are local. Rsync isn't terribly fast, but it is a good tool.
 

mjws00

Guru
Joined
Jul 25, 2014
Messages
798
You probably got around this. You don't have to import a volume you made in the GUI it shows up automatically.
 

mjws00

Guru
Joined
Jul 25, 2014
Messages
798
Did it throw an error while making it? What is the output of 'zpool status' ?
 

mjws00

Guru
Joined
Jul 25, 2014
Messages
798
You must be throwing an error on zpool creation or something. Make sure show console messages in footer is on. Or 'more /var/log/messages' We're still at the easy part. :) You likely need to zero out that drive. You could post the debug file from. Settings | Advanced | Save Debug
 
Status
Not open for further replies.
Top