2

I have 4 disks: 2x2TB and 2x1TB. All of the same RPM 7200 and manufacturer. OS is Ubuntu 16.04. I want to make a RAID 10 pool, but I've heard that mixing disks size is not a good approach to ZFS - correct me if I'm wrong... So which is better of these 3 options ("m" means mirror):

  1. Whole disks mirrors: (2TB m 2TB) + (1TB m 1TB).
  2. Split 2TB disks into 1TB partitions: (1TB m 1TB) + (1TB m 1TB) + (1TB m 1TB).
  3. Two separate pools: (2TB m 2TB) and (1TB m 1TB).

Personally I don't really like the third option, but maybe it is the most stable one? I am new to ZFS so please suggest.

I've made an image to illustrate the second option:

image of option 2

2 Answers 2

1

Before answering your question, a disclaimer: obviously it's simplest to just use duplicate hardware. It's worth noting that even though your devices are from the same manufacturer and have the same number of RPMs, the throughput will be different between them for a given IO size (because the 2TB drives probably have higher byte density per ring), and the number of IOPS will be the same between them even though the 2TB drives will be hit twice as frequently in a random read situation. Basically, you'll have asymmetric performance anyway, where the 2TB disks do ~2x better on large IOs, and the 1TB disks do ~2x better at short random IOs.

I'm going to answer assuming that you don't want to sell your 1TB drives to buy another 2TB drive. From your question I can't really tell -- what's your desired replication level? No matter what, there are two guidelines you should try to follow:

  1. You're better off letting ZFS configure full disks in the zpool, because the failure semantics when one drive fails are a lot simpler than if two partitions can fail together (when the disk they're both on fails).
  2. It's easiest to add new disks to the pool later if your top-level node in the pool is a striped vdev. That way you can always add groups of duplicate new devices at the same time and it doesn't matter if their sizes match those of the existing devices in the pool.

If you want a 2-disk mirror, your option 1 seems the best to me. If you ever buy another disk, buy a second of the same type and add them both as a new mirror under the striped node in this tree:

striped
    mirror
        2TB
        2TB
    mirror
        1TB
        1TB

If you want a 3-disk mirror, you could do a mirror like this, but adding devices to that later is harder (add them as another mirror? add them as another stripe under the 1TB area?):

mirror
    2TB
    2TB
    striped
        1TB
        1TB

If you want to do RAID-Z, I'd recommend just not using different-sized devices, or you could buy some more 2TB and 1TB devices and stripe across multiple RAID-Z groups.

An alternate method for replicating data in ZFS is the copies=N setting that you can set on filesystems within the pool. This may be tempting for your use case, but note it doesn't help for all data loss problems -- a device-level failure will still result in failure to use the entire pool. (The main use case for this is corruptions within a disk.)

0

what i would suggest is raid10 with : mirror-0 2TB & 1TB mirror-1 2TB & 1TB

to accomplish this, you would create a raid0 with both 1TB first and then perform a zpool attach twice to attach each 2TB drive to each 1TB drive. this evens the load on both mirrors. make sure to set autoexpand for future expansion. you'll end up with about ~2TB space.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .