ZFS ZFS RAID10 or RSYNC?

Are there any advantages to set up a mirror between two mirrored pair of ZFS disks [RAID10] than using RSYNC between two separate pairs of mirrored disks?

1000003116.jpg
 
So two mirror pairs, mirrored? Not trying to get any extra space out of the four disks? You could lose 3 of the 4 drives and still have the data. But there may be better configurations for the 4 drives for data integrity.

Ease of replacing disks in case of failure, as I don't have any spares, with the exact same specs.
That is why setting up partitions is useful.
Partitions can be used for pretty much any kind of ZFS construct, so you can get any disk that's bigger and use it.
If I recall correctly a vdev will use the smallest size physical device so if you create a mirror with a 2T and a 4T drive even using whole device, you have a mirror of size 2T
 
I think you are saying you have striped two mirrors (RAID10 requires 4 disks), and you want to be able to replace failed disks easily.

My instincts tell me that triple mirrors, or hot spares, are likely to be operationally superior to using rsync.

mer mentions using partitions to manage vdev size. You can also use geom(8) concats to concatenate providers (read partitions) to make larger providers (read vdevs) -- but you have to apply some common sense.

Please tell us about the capacity of each disk including the drives you are considering for rsync.
 
If you're using a two pools mirror consisting of two mirrored drives each, you can also just use the 4 drives in a single mirror.
Same redundancy, but less complicated. No rsync is needed to synchronize data within a mirror. That's what ZFS does.
"Mirror" doesn't neccassarily mean "two drives." You can have any amount of drives in a mirror-pool - even one, even if that does not make much sense.
But the question is to find a reasonable compromise that's worth the situation.
What exactly are you going to achive?
You see, having a mirror of 4 drives, gives you a lot of safety (3 drives may fail) - against hardware failure, but cost you a lot of space (only the space of 1 drive available.) Also write and access speed will differ on the kind of RAID and the amount of drives. While your BU device may be slower, your drive/pool containing / and /var/ should be fast.
Setting up the 4 drives as a raidz2 pool, gives you also very good safety against hardware failure (2 drives may fail) but also more space (~2 drives) Adding a 5th drive could either add more space to a raidz2, or you can create a raidz3 (3 drives may fail.) But,
Question is: How much safety do you need for what?
A RAID system "only" protects you from hardware failure. But for being protected from the whole machine stolen or destroyed, e.g. by fire or a natural desaster, no amount of HW redundancy protects you from that. For that you need to have some additional BU space in another place, a second machine in the basement or outside your home, or webspace on a server in another country...
So, again the question: What kind of data needs to be how safe? And how much is it?
E.g. your porn collection may be safe enough on a single two drives mirror. But your source code repository, company's accounting files etc. better be saved on more than one machine, plus best having also some copies as encrypted tarballs on some webspace.
 
Thanks everyone!

This is what I have right now, both mirrors (pairs) are empty:

Code:
# zfs list
NAME                 USED  AVAIL  REFER  MOUNTPOINT
mirr_master          936K   225G    96K  /www_master
mirr_slave           888K   899G    96K  /www_slave
zroot               10.4G   213G    96K  /zroot


# zpool status
pool: mirr_master
state: ONLINE
config:
        NAME         STATE     READ WRITE CKSUM
        mirr_master  ONLINE       0     0     0
          mirror-0   ONLINE       0     0     0
            ada0     ONLINE       0     0     0
            ada1     ONLINE       0     0     0
errors: No known data errors

pool: mirr_slave
state: ONLINE
config:
        NAME        STATE     READ WRITE CKSUM
        mirr_slave  ONLINE       0     0     0
          mirror-0  ONLINE       0     0     0
            ada2    ONLINE       0     0     0
            ada3    ONLINE       0     0     0
errors: No known data errors

I'm aiming to replace both drives in mirr_master or mirr_slave, if one disk is failing.
I think the setup isn't optimal, since mirr_master has a pair of Hitachi 7200 rpm disks (same specs), and mirr_slave has a pair of 5400 rpm NAS disks (same specs).

I only need to store about 100G of data.
 
Yeah, I see. It was not perfect to combine the two slower drives with faster ones in one pool.
But anyway you need to see:
Having four drives in one machine saving the same data - one two drives mirror will be the backupped to the other two drives mirror - gives you bottom line the exact same redundancy against hardware failure as having them all together in a single pool.
The question you need to answer for yourself is:
Is the gain of performance by separating the 7k2 drives from the 5k4 ones needed, and worth the effort of the overhead you get with additional rsyncing both mirrors, which also needs time to be done you need to substract from your gain of performance by separating the drives; as cracauer@ already said: don't underestimate the load rsync burdens your drives with - instead of having them just pooled directly all together in one 4 drives mirror or a raidz2 pool and just let ZFS keep them all mirrored up-to-date automatically, which was easier to set up, easier to maintain, faster in mirroring, plus integrated error correction?

You may do a small read/write-speed test with both types of drives (or just compare the specs.) This could reveal the difference in performance maybe not really that much, since read/write speed of a HDD depends not only on its RPM alone.

Anyway my first recommendation was to label your drives instead of using "ada0", "ada1" etc. Saves you a lot of trouble at the latest, when the day come you need to replace a drive.
 
Re-lay it using partitions of exactly the same size with a 4-way mirror in one pool. Figure out the maximum identical partition size you can use (one which fits on all disks). Destroy the unused mirr_slave. Start constructing the new pool with partitions placed on the two disks previously allocated to mirr_slave. Destroy mirr_master only when you no longer need it, create and label new partitions on the two drives released from mirr_master and add them as mirrors to the new pool.

Don't worry about the mis-match in drive performance. It will slow down the writing a bit, but most applications spend most of their time reading, and reading will generally proceed at the pace of the fastest dives(s).

ZFS will default to a sector size that will work with all drives.

And, as Maturin suggests, work out a naming scheme and label your partitions (e.g. gpart add -t freebsd-zfs -l "$label" /dev/adaX) and use that label when constructing your pool.
 
Back
Top