Is it possible to setup ZFS/Btrfs RAID with just 1 drive, then add more in the future?

Is it possible to setup ZFS/Btrfs RAID with just 1 drive, and will just add more drives in the future?

I currently just purchased 1 20TB IronWolf & planning on buying another 1 later this year for my Jellyfin/Nextcloud server. I plan on getting another 20TB NAS drive in the future, and i don’t want to deal with erasing the drive, and just want to simply add the drive for and enable redundancy. Then add a 3rd for RAID 10.

No. The D in RAID is plural: disks.

Absolutely! A single disk has no fault tolerance, of course, but you can still scrub and check for errors.

BTRFS has more flexible options for expansion, but ZFS will require that you add redundancy as a mirror pair which doesn’t give you more storage capacity.

To clarify, with BTRFS you can use the “single” type which just expands the storage capacity with no redundancy. See table.

With ZFS (and BTRFS) you can use the mirror type (DUP in BTRFS) to add redundancy. Then you can add more capacity with mirror pairs. This article discusses layouts.

It is possible, but not recommended.

If you start with a single drive, with ZFS, you can later “attach” a second drive, which will not add any extra capacity, but means the first drive, or the second can fail, and you still have access to the data.

I would recommend the third and fourth drives, be brought as a pair, and they be connected to the existing two, as a pair.

So first drive, on its own, 20TB data that can die any time. Later, attach second drive, still 20TB space, but either can die. Later still, two 10TB drives, added as a mirror, so total space just under 30TB, but either of the first two, and either of the second two drives can fail, while the pool remains operational.
If you extend it by a pair each time, the data remains safe.

And as long as you know, the first drive can fail any time, then go-ahead, it’s your array.

1 Like

Isn’t that the default for Btrfs when you partition a drive as Btrfs, or am I missing something? My PC’s root filesystem is using Btrfs, so isn’t that “single”?

To clarify, my goal is to not make it a headache when I add more drives for RAID. Down the road (within this year or next year).

Yeah, exactly!

On btrfs, by default, ‘data’ is ‘single’, ‘metadata’ and ‘system’ stuff are ‘dup’.

I think you can add a drive as parity to btrfs after the fact? and then add more data drives as needed, but if you want the data to stripe across the drives instead of just have parity data for recovery, you’ll need to tell btrfs to run a balance across all the drives, which is slow, might be expensive on your nand flash/disk wear, and might take longer than just copying the data to an intermediate source, making a new volume, and writing it back striped.

That’s probably what you’re looking for though, right? I’m not sure ZFS can do this, though, and it’s harder to set up as a boot drive anyway. I’m not sure btrfs ever solved the raid5 write hole issue, though.

This is actually what I’m looking for! I just wanna plug in a second drive to enable the redundancy.

Those 2 10TB are RAID0?

1 Like

raid10

with ZFS, the words “attach” and “add” have specific actions, and can harm, or help, so be careful, and Don’t Mix Them Up (double check, before executing)

if you add a mirror the two drives, you pool would consist of the first two drives as a mirror, and the second two drives also as a mirror.

it won’t move/balance any data off the first mirror, but new data will be share between the first mirror, and the new mirror.

so 1 drive, is like raid0 attach an identical drive, and it becomes like raid1. Adding a mirror of identical drives, would be like raid10.
1 drive - raid0 full speed,
2 drives (mirror) - raid1 double read speed, redundancy, healing, single write speed
4 drives (mirror + mirror) - raid10 faster read speed, redundancy, healing, double write speed

if you started with 1 drive it would start raid0, and if you added a second drive, it would still be raid0 if you added a third drive later, that would be raid0 still (triple capacity, triple chance of total data loss, no redundancy, but triple speed)
1 drive - raid0 just a single drive
2 drives, no mirror - raid0 Double capacity, double chance of failure, no healing, no redundancy, but double read and write speed
3 drives, no mirrors - raid0 triple capacity, triple chance of failure, no healing, no redundancy, but triple read and write speed
4 drives, no mirror - raid0 quad capacity, quad chance of failure, no healing, no redundancy, but quad read and write speed
(numbers not exact)

1 Like

Can’t speak toward the other things but specifically with Synology NAS you can do that.

Simply create a btrfs SHR array and it will automatically expand the RAID type as you later add disks. Obviously the single disk has no redundancy. However that expands into a RAID 5 or 6 array, not 10. I believe you can configure it for RAID 10 with just one drive installed as well, but I haven’t done that personally.

In btrfs it is possible, but you’ll need to balance after some operations:

https://btrfs.readthedocs.io/en/latest/Balance.html#examples

https://btrfs.readthedocs.io/en/latest/mkfs.btrfs.html#man-mkfs-profiles

I think you can add a drive as parity to btrfs after the fact?

Btrfs parity (raid 5/6) is broken and should not be used for production.

Note also that btrfs mirroring (raid 1/10) works on a block level. Drives are never mirrored, rather each block is guaranteed to be stored twice (or more in the RAID1c3 or RAID1c4 profiles).

Btrfs is more flexible, especially with differently sized disks. The biggest drawback IMO is the lack of parity RAID, compared to ZFS