Storage pool reorg: easy way?

Status
Not open for further replies.

Herman Eggink

Explorer
Joined
Jan 27, 2014
Messages
73
I just built my first Freenas box replacing my old DNS323. So far pretty happy with it: nice performance, easy config, lots of functionality.
BUT, as always, hind sight is an exact science and had I known then...

My key challenge is that, having a 4 2TB drive system, Freenas ended up configuring ZFS mirroring the 2 drives. In essence not bad but I have stuff (e.g. OSX backups) that don't really require a mirror.

Is there an 'easy' way to reconfigure the storage such that I can 1) unmirror one of the mirrored disks, 2) move some of the volumes (specifically the time machine volumes) to another volume without having to reconfigure the entire box, 3) add the previously mirrored disk as a non mirrored volume and then 4) move the time machines back?

I am happy to attach a separate esata disk to support the move. Luckily, I don't that much data just yet so the moves should be fairly fast. I just noticed that all the mount points (and thus all the sharing) is based on the volume name so changing this immediately affects what's being shared, right?

Thanks for helping!

H
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
Everything is possible with mirrors (you can for example split a mirror and create two volumes containing the same data; you can also detach individual drives from teh mirror). However, I'm not sure I understand what you want to do. You say you want to "unmirror" (detach) one of the drives and then use it for something else. However, this would leave your primary volume in a funny state -- it would consists of one mirrored vdev and one single drive, which doesn't make much sense. So, could you please be more specific?
 

Herman Eggink

Explorer
Joined
Jan 27, 2014
Messages
73
Thanks, sure. So I have 1 ZFS volume that consists of the 4 disks where the disks are mirrored. Ideally, I's like to split this volume in 2 and unmirror half of it as I don't really need the redundancy. So end up with one volume of 2 disks in mirror and 2 disks that are then configired in an unmirrored volume. Does that make sense (or should I say did I make myself clear)?
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
Yes. To use proper terminology what you have now is a stripe of two mirrored vdevs -- two and two drives are mirrored to create two 2TB mirrors and those are then striped to create one 4TB volume. What you want is to have one 4TB stripe (no redundancy) and one 2TB mirror. Correct? (I also think you said volume when you meant dataset in your original post).
This is possible, but not without losing redundancy for a period of time.
You could detach one drive from both of the mirror vdevs. This would leave you with one 4TB non-redundant volume that still contains your original data and two "unassigned" drives. You can then use those two drives to create a new 2TB mirrored volume. You can then copy the important data from the 4TB volume to the 2TB mirrored volume. However, there is a risk that if one of the drives in the 4TB volume fails (before you are able to copy your important data to the mirrored volume) you lose your data.
Unfortunately, it is not possible to do it the other way -- detach two drives and end up with a 2TB mirror and two unassigned drives.
I can walk you through this if you accept the risk.
 

Herman Eggink

Explorer
Joined
Jan 27, 2014
Messages
73
Exactly! Apologies for mixing up terminologies. In terms of redundancies, I'll accept losing that by (up front) just backing up the data itself to an esata drive (should be fast enough and should work, right?). The thing that I was wondering was what the impact on my existing shares would be. Right now, all shares (whether AFP, CIFS or NFS) are part of the same "Main" ZFS Volume. When you take me through how this could be done (and yes, please do) then do these still remain as they are? Example: the AFP time machine shares are part of the "Main" volume. When I move these to the non mirrored volumed, do I need to change this as well or is that adapted automatically?

Many thanks for helping me out!

Herman
ps: Initially I had wanted a RAIDZ2 instead of these 2 and 2 drives mirrors. Once I de-mirror, that won't be possible anymore. Are there any reasons why a RAIDZ2 would be preferrable over the mirrored drives?
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
After you finish the zpool changes all your data will be on the 4TB non-mirrored volume and it will still be named the same so all shares will work. The 2TB mirrored volume will be the new, empty one. If that is not what you want it is also possible to rename the volumes.
 

Herman Eggink

Explorer
Joined
Jan 27, 2014
Messages
73
Ah, OK. so if I then want to move some of the data in the non-mirrored volume to the mirrored volume then I would have to change the shares. Since that would be my music, photos and home videos, this would only apply to a limited set which is quite doable.

Definitely appreciate a walk through on how to do this.\

Thanks!

H:)
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
ps: Initially I had wanted a RAIDZ2 instead of these 2 and 2 drives mirrors. Once I de-mirror, that won't be possible anymore. Are there any reasons why a RAIDZ2 would be preferrable over the mirrored drives?
RAIDZ2 is a bit more safe, but it's slower. With 2 striped mirrors you could have two drives fail and the volume will still work. However, the two failed drives have to be one from each mirror. If both drives in one of the mirrors fail your volume fails too. With RAIDZ2 any two drives can fail and your data is still accessible.
Definitely appreciate a walk through on how to do this.\
OK, I will need output of "zpool status". Please enclose it in the [ CODE ] tags.
 

Herman Eggink

Explorer
Joined
Jan 27, 2014
Messages
73
Code:
[root@freenas] ~# zpool status
  pool: Main
state: ONLINE
  scan: scrub repaired 0 in 1h58m with 0 errors on Sat Jan 25 04:58:32 2014
config:
 
        NAME                                            STATE    READ WRITE CKSUM
        Main                                            ONLINE      0    0    0
          mirror-0                                      ONLINE      0    0    0
            gptid/9f7f243e-7e92-11e3-923d-b8975a5fdb2b  ONLINE      0    0    0
            gptid/a040eceb-7e92-11e3-923d-b8975a5fdb2b  ONLINE      0    0    0
          mirror-1                                      ONLINE      0    0    0
            gptid/a1038b23-7e92-11e3-923d-b8975a5fdb2b  ONLINE      0    0    0
            gptid/a1c40058-7e92-11e3-923d-b8975a5fdb2b  ONLINE      0    0    0
 
errors: No known data errors
 
 

Herman Eggink

Explorer
Joined
Jan 27, 2014
Messages
73
Would RAIDZ2 have given me the same amount of net storage as the mirrors I have now?
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
Would RAIDZ2 have given me the same amount of net storage as the mirrors I have now?
Yes.

While doing a test run of the procedure in a VM I ran into a problem in FreeNAS 9.2.0. zpool detach (the command you'd need to use) is hanging in kernel: https://bugs.freenas.org/issues/4037. As you mentioned that you are able to backup your data the easiest path at this moment is to backup, destroy the volume, create two new volumes and copy the data back. :(
 

Herman Eggink

Explorer
Joined
Jan 27, 2014
Messages
73
Hmmm. That's not very nice is it?
Backing up the data and destroying the volume I assume means that all my shares, that depend on that volume (ie everything) is gone as well, right?

It would be really nice if there were some sort of data migration tool as part of freenas that would allow you to move data/volumes without destroying the shares that depend on it but migrate those configs instead. All it would need is a change in mount point and an adaptation of config files (I also have a couple of jails that use data on the shares).

Again, thanks for trying!

H
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
Hmm, you can also wait a bit. There is a chance the problem will be fixed in 9.2.1.
 

Herman Eggink

Explorer
Joined
Jan 27, 2014
Messages
73
That sounds more reasonable to me. No rush as data is not filling up fast anyway. Just a waste of disk space. Thanks again. I'll monitor 9.2.1 and, as soon as it's out, contact you again, OK? Many thanks and greetings from the Netherlands!
 

Herman Eggink

Explorer
Joined
Jan 27, 2014
Messages
73
Looks like this is fixed in 9.2.1, correct? I have that installed and backed up my critical data to an esata disk. If need be, I can test the zpool detach command on that disk (no problem recreating it).
H
 
Status
Not open for further replies.
Top