Some differences between RAIDZ and mirrors, and why we use mirrors for block storage

Status
Not open for further replies.

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
Yes, you can create the 4 x 2 disk mirrors in one fell swoop. IIRC, grab the slider gizmo so that you end up with 4 rows and 2 columns.

Or, you create one mirror at a time and extend your pool by another mirror, etc.

You can verify your results by doing a zpool status.

edit: fixed my mistake regarding pool setup (thanks Mirfster)
 
Last edited:

Mirfster

Doesn't know what he's talking about
Joined
Oct 2, 2015
Messages
3,215
IIRC, grab the slider gizmo so that you end up with 2 rows and 4 across.
Only have 4 Drives to use in the example but....

Think it is the other way around for Mirrors, 4 Rows with 2 Columns:
upload_2016-7-13_18-31-19.png


Otherwise you would end up with Two RaidZ2 vDevs:
upload_2016-7-13_18-32-4.png
 
Last edited:

dagrichards

Dabbler
Joined
Jun 24, 2015
Messages
12
OK I made a mirror, and then added a 2 way mirror three times .... one potato two potato ( my brain is really that slow ).

The goal was to have 4 vdevs, on the theory that this was the closest I was going to come to a silk purse with my sow's ears gear.
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
4 2 way mirrors and then striping across them? Will that give me 4 vdevs? that does not seem to be a gui-able config.
Yes, No, Yes, correct.

Create 4 2-way mirrors. These are your 4 vdevs. ZFS stripes across vdevs, so you don't need to do anything else.
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
Sorry for the confusion with me getting it backwards. Mirfster, thanks for pointing it out.

I'm glad to hear that you were get it done.
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
Please do not recommend this for FreeNAS users. One can create a striped mirror from the webGUI. When it's created in the GUI, it puts a 2GB swap partition on each drive and uses the GPTID.

In the URL you provided, it's using whole disks. While FreeNAS users should have sufficient memory, such that it doesn't use swap, having the swap space allows for disk replacement when the drive sizes aren't exactly the same.

create the pool as desired on the command line
 

dagrichards

Dabbler
Joined
Jun 24, 2015
Messages
12
oh dang, sorry.
However when I used the gui to create a striped mirror it created one mirror of 2 x 4 drive slices and striped across that, one vdev.
As opposed to 4 2 way mirrors with data striped across, 4 vdevs.

Or I'm completely wrong. But the zpool status output ( not available from my current location ) was very different.
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
After getting my rows and columns mixed up, I reran a test a few days ago (using the webGUI) and confirmed the configuration by doing a zpool status.
 

El Burro

Cadet
Joined
Jan 13, 2017
Messages
2
jgreco said:
That 12 drive system we were just talking about will have 4 three-way mirrors or 6 two-way mirrors, which is 4x or 6x the number of vdevs.

How do you end up with 4x more vdevs unless you are adding a single vdev per 3 disks in a 3 way mirror setup? Would it make a difference if you were to make 3 four disk mirrors?
 

brando56894

Wizard
Joined
Feb 15, 2014
Messages
1,537
I went with Mirrors when I created my pool because of this post and my initial problems with using RAIDZ when I first started using ZFS (inability to add more devices to vdev, must upgrade all drives to realize space increase, etc..). Just recently I got a 256 GB Samsung 960 Evo NVMe drive for my system so IOPS are no longer an issue for me since this is for home use and will easily handle everything I throw at it. Since I'm using FreeNAS 10 (yes I no it's not stable, save me the warnings lol) I have my NVMe drive in it's own pool and have it dedicated for VMs and Docker containers, mass storage is handled by my Storage pool.

My Storage pool, which consists of 6x 4 TB and 4x 1 TB drives with an SLOG, houses mostly multimedia (480P/720P/1080P/2160P, ranging from 256 MB to 20 GB per file), a dataset which is shared over SMB for my Steam Library, and a download directory which is used for long term seeding of torrents and as temporary space for Usenet downloads (they get copied to the multimedia dataset on the same drive).

My question is, would I be better off converting this back to RAIDZ2 in order to realize a bit more space (using a raidz calculator and adding in parity and reserved space equals about 1.5 TB gained without the use of the 4x 1 TB drives) or would it generally hurt performance? I currently have about 2 TB free out of 12.8 TB.

I wouldn't be doing this any time soon since I don't really have any place to backup ~9 TB and I would have to get a few drives to place those 4x 1 TB drives, I'm just curious.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,175
If RAIDZ performance is fine, by all means stick to RAIDZ.
 

brando56894

Wizard
Joined
Feb 15, 2014
Messages
1,537
If RAIDZ performance is fine, by all means stick to RAIDZ.

What is RAIDZ performance compared to mirrors, other than less? You have a pretty similar pool setup compared to what I would have, so what kind of read and write speeds do you get? I think I'm around 600 MB/sec read and about 300 MB/sec write. Haven't tested it in a while.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,175
One disk's worth of IOPS, n-parity disks' worth of throughput.
 
Joined
Apr 16, 2017
Messages
1
So if the IOP performance of ZFS is based on VDEVS for the most part then why cant we, if we have the disks, do alot of RAIDZ2 vdevs, like 4 drive RAIDZ2, and then put in a SLOG and do a sync=always? Based on some reading I have done, the SYNC will turn those writes into sequential writes any ways and write the data with one write. Doesn't this help the small file issue with RAIDZ2? What would be some other benefits of this?
 

jamiejunk

Contributor
Joined
Jan 13, 2013
Messages
134
We use 2 way mirrors for our live data. Then do backups to a raidz2 on another box. Actually a few other RaidZ2 boxes. Storage is cheap when your data is important :)
 
Status
Not open for further replies.
Top