Three HD, should use mirror or Raidz1?

Status
Not open for further replies.

Smarley

Explorer
Joined
Apr 11, 2016
Messages
64
Hi,

Today I have 2 HD of 2Tb in my FreeNAS and will put one more that I found here at home.
My data is small and space/speed is not a problem today.

Can I use this 3 drives in mirror configuration?
In this caso 2 drives can fail and I will continue having the data.

Or mirror is limited only for two drives?

Thanks!
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
Yes, you can create a three-way mirror.

Many users won't consider this option, due to the overhead. But, it's a very good option for the reason you mentioned.

If you can afford a 4th disk, you might also want to consider 4 disks in RAIDz2. It would provide twice the storage space and still allow for two drives to fail.
 

Smarley

Explorer
Joined
Apr 11, 2016
Messages
64
Sorry, I did not understand your comment "Many users won't consider this option, due to the overhead" wich overhead?

Other points:
- Can I use the same HD of 2Tb to create a pool with 1Tb in mirror configuration and another 1Tb on stripe? Or after I created a pool I compromise all the HD?

- Can I create a pool with 500Gb using 2Tb HD? Because I have 3 HD of 2Tb and 1 of 500Gb spare here in home.

- After I create a mirror configuration with 2 HD, it´s possible to just add another or I need to created a new pool and all dataset´s again?

- If I have mirror configuration and would like to change to RAIDZ1, and sometime after to RAIDZ2, I need to recreate all dataset or it´s possible to just change?

- In mirror and RAIDZ configuration if I would like to increase the size of each HD, for example, replace all 2Tb that I have for 4Tb in the future, it´s simple to do or I need to recreate all again?

Thanks!
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
By overhead, I meant that with a 3-way mirror, the equivalent of 2 disks are used for parity. With 3x2TB drives, you only have 2TB available. Nonetheless, it offers additional redundancy over a traditional mirror.

Sorry, I did not understand your comment "Many users won't consider this option, due to the overhead" wich overhead?

No, don't do that. If the stripe were to fail, you'd loose your entire pool. You could create 2 sets of mirrors (2x2TB) + (1x2TB + 1x1TB) and stripe them together in your pool. The latter would be limited to 1TB (size of smallest disk), but if you upgraded it down the road, it would automatically increase the size of your pool.

- Can I use the same HD of 2Tb to create a pool with 1Tb in mirror configuration and another 1Tb on stripe? Or after I created a pool I compromise all the HD?

You could, but, as I said above, it would limit the effective size of your smallest disk. If you used the 4 disks in RAIDz2, it would be equivalent to having 4x500GB drives. If doing mirrors, see my example above.

- Can I create a pool with 500Gb using 2Tb HD? Because I have 3 HD of 2Tb and 1 of 500Gb spare here in home.

Yes, you can add another mirror (vdev) to your existing pool.

- After I create a mirror configuration with 2 HD, it´s possible to just add another or I need to created a new pool and all dataset´s again?

Unfortunately, to change from mirrors to RAIDz1 or from RAIDz1 to RAIDz2, you'd need to back up your data, recreate your pool and restore your data.

- If I have mirror configuration and would like to change to RAIDZ1, and sometime after to RAIDZ2, I need to recreate all dataset or it´s possible to just change?

All you need to do is follow the manual and replace the disks, one at a time and let each resilver, before going onto the next. Once all have been replaced, your pool with auto-expand.

- In mirror and RAIDZ configuration if I would like to increase the size of each HD, for example, replace all 2Tb that I have for 4Tb in the future, it´s simple to do or I need to recreate all again?
 

Smarley

Explorer
Joined
Apr 11, 2016
Messages
64
Thank you!
I will do a mirror of 3 2TB drives for now, and buy one more in near future, than I put in RaidZ2.
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
You are welcome.

You realize that you'll have to back it your data, rebuild the pool, and restore the data, in order to switch to RAIDz2.

Thank you!
I will do a mirror of 3 2TB drives for now, and buy one more in near future, than I put in RaidZ2.
 

Smarley

Explorer
Joined
Apr 11, 2016
Messages
64
Yes, no problem!
Today I use small amout of data, around 30Gb only.
But I will start to starage the images from security system, so I will need at least 1Tb for it.
 

Smarley

Explorer
Joined
Apr 11, 2016
Messages
64
I put the third HD in the server and clicked on Volume Manager.
Selected the current Volume and new drive, but Mirror was not an option.
I will need to reassembly the pool to use mirror with 3 HD?
I put this new drive as Spare for now, this function will automacaly replace if it some drive fail?

Thanks!
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
Unfortunately, you can't add the 3rd disk to the mirror via the webGUI after the fact.

You'd need to use the command line to do it. Detailed instructions can be found on the forums. Don't use some random guide you might find on the 'net.
 

Smarley

Explorer
Joined
Apr 11, 2016
Messages
64
Unfortunately, you can't add the 3rd disk to the mirror via the webGUI after the fact.

You'd need to use the command line to do it. Detailed instructions can be found on the forums. Don't use some random guide you might find on the 'net.

Ok, I will try to find in the forum this information.
 

Smarley

Explorer
Joined
Apr 11, 2016
Messages
64
I followed this commands and got it.
I dont know if it´s the ideal but work.
I just noted that resilvering of this disk was little very slow, around 1.8M/s only, will take 14h for only 80Gb.
There is some problem with this commands?
And this disk already had a partition before, I think that was of when i put it on spare, I just created another like the commands and did not deleat the other, this could be a problem?
I attached the second one mark bellow (ada2p2).

Code:
gpart create -s gpt /dev/ada2
gpart add -a 4k -i 1 -s 2g -t freebsd-swap /dev/ada2
gpart add -a 4k -i 2 -t freebsd-zfs /dev/ada2
Run zpool status and note the gptid of the existing disk
Run glabel status and find the gptid of the newly created partition. It is the gptid associated with ada1p2.
zpool attach tank /dev/gptid/[gptid_of_the_existing_disk] /dev/gptid/[gptid_of_the_new_partition]



Code:
[root@Servidor] ~# glabel status
									  Name  Status  Components
gptid/9ddf3f41-233c-11e6-93a7-641c67795a8c	 N/A  da0p1
gptid/1393e1b7-b4d7-11e6-8d8d-641c67795a8c	 N/A  ada0p2
gptid/7abc5b8d-233f-11e6-a69a-641c67795a8c	 N/A  ada1p2
gptid/388eff3f-b757-11e6-ba89-641c67795a8c	 N/A  ada2p1
gptid/4761a2d5-b757-11e6-ba89-641c67795a8c	 N/A  ada2p2
 

Smarley

Explorer
Joined
Apr 11, 2016
Messages
64
After some time the of resilvering speed goes up to 23Mb/s, I think that maybe was some small files at the begining only.
 
Status
Not open for further replies.
Top