2

My son and I are about to head off on and adventure converting 4 disks into one array.

Let me give you some background on what the layout looks like today. We are running gentoo linux and have 4 10TB disks.

Two of them currently have data on them, but not in an array. Two disks are unused at this time.

What I would like to do is:

  • create an array, either software raid (mdadm) or ZFS pool
  • mount that new array on an alternate mount point (i.e. /mnt/blah)
  • copy the data from the other disks on to this new array,
  • then finally add the two older disks into that new array.

I'm not worried about fault tolerance but space and performance would be great. What is the best pathway to reach this goal?

1
  • 3
    Research types of raid in the first instance, then you'll have a better idea of what you want. Commented Jul 1 at 9:54

1 Answer 1

4

What sort of raid array do you want? e.g. you can't create a RAIDZ/5 array with 2 disks that will hold more that will fit on a single disk.

The best you could manages with just 2 of the disks is RAID0 (striped only), then add the old pair as a mirror of the first 2 which will potentially give you better performance (reads/writes split across 2 drives) and redundancy to loose 1 disk out of the mirror pairs. But no extra storage as you would still have a max of 2 x disk size.

If you just want to combine the storage and are not interested in data redundancy, then you can create a LVM pool from the 2 new disks, copy the data over and then format the old disks and add them to the pool to get the full 4 x disk size of storage.

3
  • or, if the OP can afford one more 10TB drive (and it can physically fit into the machine), start with a 3-drive RAIDZ-1, copy the data from the original two drives to it, and then use ZFS' relatively recent (2022-ish) RAIDZ expansion feature to expand it to a 5-drive RAIDZ-1. And then use zfs snapshot, zfs send, and zfs receive to force a rewrite of all data to take full advantage of the new layout). Commented Jul 2 at 7:18
  • The reason I say "get another drive if you can" is because this can't be done safely with only two empty drives, but can be done with some risk by starting with a two-drive DEGRADED RAIDZ-1 pool, copy the data from one original drive then add that to the zpool (so it's no longer degraded). Then copy the data from the second original drive and then add that to the zpool. End result, a 4-drive RAIDZ-1 array, with total capacity of 30TB, not including zstd compression (which won't be significant if the files are mostly already-compressed videos, music, photos, etc) Commented Jul 2 at 7:21
  • Finally, to improve performance: make sure that the system has enough RAM for normal usage PLUS another 16 or 32 GB or more for ARC caching. And optionally add an SSD (or use a partition on an existing SSD) for L2ARC caching (so that frequently read data comes from the SSD rather than direct from the HDDs). Commented Jul 2 at 7:29

You must log in to answer this question.