I'm very excited about the new features of btrfs and would like to start tesing it. Before I get started, I would like to ask if btrfs supports increasing raid capacity by replacing disks by bigger ones (and not adding additional disks). Example: A RAID10 consisting of 8x 2TB drives results in a capacity of 8 TB. Then, each 2TB drive gets replaced by a 6 TB drive. After each disk replacement, a rebuild / rebalance is executed. I'm wondering, if after the last disk replacement and rebalance the capacity jumps from 8TB to 24TB?
There is some lecture about it in the internet, but there is no 100% statement like "yes, after rebalance, the capacity gets increased!". https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices#Adding_new_devices
The NAS devices from Synology support exactly the feature I'm asking about: https://www.synology.com/en-global/knowledgebase/DSM/help/DSM/StorageManager/volume_diskgroup_expand_replace_disk But, I'm not sure, if this feature is a native feature of btrfs or if the developers from Synology created it especially for their disk station operating system.
It should work as you have described it. However, an additional step may be necessary.
For example, if you put 4 drives with 3 GB each in a raid1 configuration, you'll end up with a capacity of 6 GB. Replacing two of those drives with 4 GB drives should give you 7 GB of capacity (btrfs disk usage calculator).
Step 1: Create BTRFS RAID1 volume with 4x 3G = 6G capacity:
Step 2: Replace 2 3G drives (3rd and 4th drive) with 4G drives:
The RAID1 filesystem should have a capacity of 7 GB, but it only has 6 GB.
Solution
It needs to be resized to use all available space (balance won't help). It needs to be resized on every device that has been replaced, so on device #3 and #4.
The filesystem now has its expected capacity of 7 GB.
Step 2 (alternative): Remove drives (the old way, not recommended)
Before the replace command was added, the only workaround to replace drives was to add a new drive and remove the old one. However, this may take more time. And it has the drawback that it will leave you with a devid hole, i.e., the removed device's id won't be used anymore and the device ids no longer match their respective position in the raid array.
When using add/remove, it is not necessary to manually grow the volume.
Note that, when using add/remove, the 3rd drive in the raid array has index 5 instead of 3, which may be confusing when you need to identify a drive based on its slot in your rack.
This is BTRFS version 4.4. Future versions may behave differently.
Yes, the capacity will grow in btrfs when you replace the drives with bigger ones. But make sure you always have backups! While the RAID0/1 code is not nearly as buggy as the RAID5/6 code in btrfs (as of 07/2016), your device replacement would not be the first one to go horrible wrong.