Convert a striped array to Raid 10

Status
Not open for further replies.

jhc

Dabbler
Joined
Jul 3, 2013
Messages
22
Apologies if this has been asked before but I cannot seem to find a definitive answer.

I am in the process to migrating all my data, which is currently scattered around a number of computers and external disks, to a NAS box which I have constructed.

For a number of reasons I created a striped array of 3 disks, with the intention of moving the data onto these disks and then using the original disks to form a mirror of the 3 disk array.

I had read widely on various FreeBSD forums that I could add a mirror using the <attach> command however I have now read that FreeNAS recommends using only the GUI so I'm stuck.

Is there a way to do this or not.

I'm afraid to proceed as the whole point of using ZFS and mirrors was to mitigate against the loss to family photos etc and I don't want to bugger it up in my efforts.

Thanks,

John
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
You can't do what you want to do as far as I know. You can convert a single disk vdev to a mirrored vdev, but you can't do anything else other than that. It's mentioned in my guide that vdevs can't be changed except for this one exception.

I believe you would have had to create the mirrors first, then striped.
 

jhc

Dabbler
Joined
Jul 3, 2013
Messages
22
Thanks for that and d*mn!

Having looked again at your guide, many thanks by the way, and looked again at the manual, I see that a mirror can be split.

However, the example only shows a 3-way mirror so .... can this only be done with a 3-way to 2-way mirror?

John
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
A mirror can be split? What do you mean? Any disks, once added to a vdev, cannot be removed. The only exceptions are ZILs and L2ARCs. I could be missing something though. I'm not a big fan of mirrors for the most part.
 

William Grzybowski

Wizard
iXsystems
Joined
May 27, 2011
Messages
1,754
If you have a stripe of N disks I don't see why turning it in a 2*N disks raid10 wouldn't work.

And you're right, you just need to use zpool attach command for each disk. Just make sure to copy the GPT partition layout from the existing disks to the new one.
 

jhc

Dabbler
Joined
Jul 3, 2013
Messages
22
Hi,

Okay here's what I've got.

Item 6.3.13 of the freenas 8.3.1 guide details splitting a 3-way mirror; so a 3-way mirror can be done.

No amount of googling shows a split of a 2-way mirror so maybe this is not allowable due to redundancy.

In theory I can see that it should be possible to clone any or all of the drives in an array (not sure of the syntax to do this but theoretically possible)

However, in practice I don't know these drives could be assembled into a separate array or if the resulting array could then be made to mirror my original array.

My set Up
Currently I have three disks in a striped array (2x3GB and 1x2GB) and three additional disks to act as mirrors (2x3GB and 1x2GB). All are 4K sector disks.

Each set of three disks has been bought from a different supplier to try to mitigate against "bad batch" problems and ideally I'd like to mirror in such a way as to have mirrors between (across?) the different batches.

In VIEW DISKS I can see all 6 disks and, for those currently in the zpool, STATUS yields the gptid for the disks, however the other blank/new disks are not visible.

How should I prepare the 3 additional disks (again I have no idea what the steps or the syntax would be) . And having prepared them how should I attach them.

IF this is possible then I think is should be Disk 1 to Disk 4, Disk 2 etc rather than the striped Disk 1-3 to Disk 4-6.

Again, even having done this, will it subsequently play nice with Freenas and the GUI.

There is a possibility that this cannot be implemented because enterprise environments have not need of it.

However if I cannot get this to work then I will have to spend an additional €400 buying additional drives to create mirrors before copying the original array and currently that would be very painful.

Have you any ideas?

Many thanks for your advice to date.

John
 

jhc

Dabbler
Joined
Jul 3, 2013
Messages
22
Is this not possible then?

Oh well, back to the drawing board (and the Drive shop)

J
 

jhc

Dabbler
Joined
Jul 3, 2013
Messages
22
Well, I couldn't afford more drives so, after much googling, here's what I've attempted.

  • Boot using an Ubuntu live CD and installed gdisk

  • Used sgdisk command to copy GPT partition layout, from each of the drives in the striped zpool to the proposed mirror drives as suggested by William Grzybowski in post 5. Also changed GUID of the (mirror) drives


  • Booted into Freenas8 and using shell attempted attach new drives to existing drives using the command attach <pool> <device> <new-device>

zpool status
mirror-0 ONLINE 0 0 0 gptid/adfecc2c-cea7-11e2-ba58-d43d7e981428 ONLINE 0 0 0 gptid/a5ef4f6c-49c8-4068-985d-4be517cce6c8 ONLINE 0 0 0 (resilvering) mirror-1 ONLINE 0 0 0 gptid/ca6702e2-cea7-11e2-ba58-d43d7e981434 ONLINE 0 0 0 gptid/ebb9f0a5-89a6-4818-8b8c-9662953b7df3 ONLINE 0 0 0 (resilvering) mirror-2 ONLINE 0 0 0 gptid/87ebdf1d-d206-11e2-adc4-d43d7e981498 ONLINE 0 0 0 gptid/03b0437f-2281-4db9-86f8-03735e6f6311 ONLINE 0 0 0 (resilvering)
errors: No known data errors

The Freenas GUI <Volume Status> shows three, 2-way mirrors.

I now have a nervous wait of 6h36m of resilvering to see if this is a success; or if I'm getting divorced.:oops:

J
 

jhc

Dabbler
Joined
Jul 3, 2013
Messages
22
Oops.
see now that the zpool status output didn't retain its formatting when I posted, but you get the idea.

J
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
I now have a nervous wait of 6h36m of resilvering to see if this is a success; or if I'm getting divorced.:oops:

That should be "quote of the week". I got a good laugh at that one.
 

jhc

Dabbler
Joined
Jul 3, 2013
Messages
22
Turns out I'm not getting divorced :D, it all worked out fine.

The Freenas GUI <Volume Status> shows three, 2-way mirrors.

Shell ZPOOL STATUS, everything appears okay, again showing 3, 2-way mirrors.

To be sure, I OFFLINED one of the original vdevs from the original (striped) pool and the zpool continued to worked, all be it in a degraded state until I ONLINED the drive again.

Not sure what other tests I can run

Yippee.

J
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,402
see now that the zpool status output didn't retain its formatting when I posted, but you get the idea.
Next time use [code][/code] tags.

  • Boot using an Ubuntu live CD and installed gdisk
You could simply have done this in FreeNAS via the CLI. I believe I've even posted the appropriate commands, assuming you use the default swap size, in the past. Still the important thing is you successfully mirrored the drives.

Not sure what other tests I can run
Code:
zpool scrub poolname
 

jhc

Dabbler
Joined
Jul 3, 2013
Messages
22
Hi

Handy to know about the CLI, not sure of the syntax, is it the same as using sgdisk?

I ran zpool scrub and it yielded a report of 2K unrecoverable ... (listed in the general heading but not listed against any specific device).

Ran zpool again and no errors listed on this (the second) run or any subsequent runs.

J
 
Status
Not open for further replies.
Top