NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
mwagonermpm
May 04, 2016Follower
XRAID turned RAID5 into RAID6 when adding a drive
When I added a drive, my RAID5 config changed to RAID6. Is it supposed to do that?
StephenB
May 06, 2016Guru - Experienced User
First of all, thx for the detailed reply and research. Much appreciated.
jak0lantash wrote:
8a) If the unit has more than 6 bays, starting with 3x1TB + 2x2TB. md127 is a RAID5 of 5 partitions of 1TB (4TB capacity, 1TB parity). md126 is a RAID1 of 2 partitions of 1TB (1TB capacity, 1TB parity). BTRFS volume capacity is 5TB.
If you add a 1TB HDD, you have 4x1TB + 2x2TB. md127 should be reshaped to a RAID6 of 6 partitions of 1TB (4TB capacity, 1TB parity). But md126 can't be reshaped to a RAID6 as there are only two partitions for it and no unused capacity on the new HDD. I need to confirm what happens in this case.
If reshape to RAID6 does occur on md127, you end up with a two devices redundancy on primary raid, but remain with a one device redundancy on secondary raid. Which is not good in my opinion.
It's not good in my opinion either, which loops back to the original question. It isn't dual redundancy unless both md126 and md127 are both dual redundancy. If md126 is RAID-5, the array can recover from some combinations of 2-drive failures, it can't recover from them all.
Also,I'd expect a factory reset with 7 drives still in place should always give me the same volume size I had before (although the details of the underlying RAID layers can be different, depending on the history). At this point its hard to know if that will happen or not (its still on your confirm list for the factory reset cases).
However, there is a problem with 8a. The 6th drive would need to be 2 TB in order to be added to the array. XRAID always limits new disks to be >= the largest disk in the array. Disk replacements can match the size they are replacing.
There is problem with 8c also - as written it goes from 6 drives to 8 (though only a single 2 TB drive was added).
Retired_Member
May 06, 2016Sorry, bad copy/paste
(corrected) 8c) (following 8b) If the unit has more than 6 bays, starting with 4x1TB + 3x2TB. md127 is a RAID6 of 6 partitions of 1TB (4TB capacity, 2TB parity). There is unused capacity on both 2TB HDDs. BTRFS volume capacity is 4TB.
If you add a 2TB HDD, you have 4x1TB + 4x2TB. md127 should expand to a RAID6 of 8 partitions of 1TB (6TB capacity, 2TB parity). X-RAID creates md126 as a RAID6 of 4 partitions of 1TB (capacity 2TB, parity 2TB). BTRFS volume capacity is 8TB.
StephenB wrote:However, there is a problem with 8a. The 6th drive would need to be 2 TB in order to be added to the array. XRAID always limits new disks to be >= the largest disk in the array. Disk replacements can match the size they are replacing.
For HDD swap, I agree. For horizontal expansion, I don't thing this is actually true.
8d) Factory Default with 1x1TB + 1x2TB HDDs. md127 is a RAID1 of 2 partitions of 1TB (1TB capacity, 1TB mirror). The 2TB HDD has unused capacity. BTRFS volume capacity is 1TB.
If you add a 1TB HDD, you have 2x1TB + 1x2TB. I believe md127 should reshape to a RAID5 of 3 partitions of 1TB (2TB capacity, 1TB parity). The 2TB HDD has unused capacity. BTRFS volume capacity is 2TB.
This is what you would get if you Factory Default in that HDD configuration.
--> I'll confirm that.
8e) Factory Default with 1x1TB + 2x2TB HDDs. md127 is a RAID5 of 3 partitions of 1TB (2TB capacity, 1TB parity). md126 is a RAID1 of 2 partitions of 1TB (1TB capacity, 1TB mirror). BTRFS volume capacity is 3TB.
If you add a 1TB HDD, you have 2x1TB + 2x2TB. I believe md127 should expand to RAID5 of 4 partitions of 1TB (3TB capacity, 1TB parity). md126 remains a RAID1 of 2 partitions of 1TB (1TB capacity, 1TB mirror). BTRFS volume capacity is 4TB.
This is what you would get if you Factory Default in that HDD configuration.
--> I'll confirm that.
- StephenBMay 06, 2016Guru - Experienced User
jak0lantash wrote:
StephenB wrote:
However, there is a problem with 8a. The 6th drive would need to be 2 TB in order to be added to the array. XRAID always limits new disks to be >= the largest disk in the array. Disk replacements can match the size they are replacing.
For HDD swap, I agree. For horizontal expansion, I don't thing this is actually true.
The horizontal expansion rule has always been that the new disk needs at least as large as the biggest installed. Technically there are some cases where a smaller disk can be accomodated (for instance in principle any drive size already in the array can be added). But if you do that in practice, the disk insertion is ignored.
- Retired_MemberMay 06, 2016
I have discovered a few things since I started questionning this. So I'll be sure once I have tested it :D
- Retired_MemberMay 09, 2016
StephenB wrote:The horizontal expansion rule has always been that the new disk needs at least as large as the biggest installed. Technically there are some cases where a smaller disk can be accomodated (for instance in principle any drive size already in the array can be added). But if you do that in practice, the disk insertion is ignored.
8a) If the unit has more than 6 bays, starting with 3x1TB + 2x2TB. md127 is a RAID5 of 5 partitions of 1TB (4TB capacity, 1TB parity). md126 is a RAID1 of 2 partitions of 1TB (1TB capacity, 1TB parity). BTRFS volume capacity is 5TB.
If you add a 1TB HDD, you have 4x1TB + 2x2TB. md127 should be reshaped to a RAID6 of 6 partitions of 1TB (4TB capacity, 1TB parity). But md126 can't be reshaped to a RAID6 as there are only two partitions for it and no unused capacity on the new HDD. I need to confirm what happens in this case.
If reshape to RAID6 does occur on md127, you end up with a two devices redundancy on primary raid, but remain with a one device redundancy on secondary raid. Which is not good in my opinion.
If reshape to RAID6 doesn't occur on md127, then what happens? Expansion in a RAID5?
-> I need to confirm that.-> Confirmed on 6.5.0 RC3
It seems that while the RAID5 should be reshaped to RAID6, that would require to shrink the volume, therefore the RAID5 is expanded in place, not reshaped to RAID6.Also, when adding a HDD (horizontal expansion), the limitation is not determined by the biggest HDD in the volume, but by the smallest.
Starting with 3x1TB + 2x4TB. md127 is a RAID5 of 5 partitions of 1TB (4TB capacity, 1TB parity). md126 is a RAID1 of 2 partitions of 3TB (3TB capacity, 3TB mirror). BTRFS volume capacity is 7TB.
Adding 1x1TB. Now is 4x1TB + 2x4TB. md127 remains a RAID5 and is expanded to 6 partitions of 1TB (5TB capacity, 1TB parity). md126 remains a RAID1 of 2 partitions of 3TB (3TB capacity, 3TB mirror). BTRFS volume capacity is 8TB.(Interesting to note that this is not what you would get if you Factory Default in that configuration)
md126 : active raid1 sda4[1] sdf4[0]
3418502912 blocks super 1.2 [2/2] [UU]md127 : active raid5 sdg3[5] sda3[0] sdf3[4] sde3[3] sdc3[2] sdb3[1]
1934139136 blocks super 1.2 level 5, 64k chunk, algorithm 2 [6/6] [UUUUUU]
[=>...................] reshape = 7.2% (35267264/483534784) finish=239.7min speed=31159K/sec
8b) If the unit has more than 6 bays, starting with 4x1TB + 2x2TB. md127 is a RAID6 of 6 partitions of 1TB (4TB capacity, 2TB parity). BTRFS volume capacity is 4TB.
If you add a 2TB HDD, you have 4x1TB + 3x2TB. md127 should expand to a RAID6 of 7 partitions of 1TB (5TB capacity, 2TB parity). X-RAID can't create a RAID6 on the three last HDDs unused capacity. BTRFS volume capacity is 5TB.
-> I need to confirm that.-> Confirmed on 6.5.0 RC3
Vertical expansion (even following horizontal expansion) on RAID6 requires four devices.
Example:
Starting with 4x1TB + 2x4TB. md127 is a RAID6 of 6 partitions of 1TB (4TB capacity, 2TB parity). BTRFS volume capacity is 4TB.
Adding 1x4TB. Now is 4x1TB + 3x4TB. md127 is RAID6 of 7 partitions of 1TB (5TB capacity, 2TB parity). X-RAID can't create md126 as RAID6 because there is only three HDDs with unused capacity. BTRFS volume capacity is 5TB.md127 : active raid6 sdh3[6] sda3[0] sdg3[5] sdf3[4] sdd3[3] sdc3[2] sdb3[1]
3887643136 blocks super 1.2 level 6, 64k chunk, algorithm 2 [7/7] [UUUUUUU]
[>....................] reshape = 0.3% (3076288/971910784) finish=388.0min speed=41604K/sec
8c) (following 8b) If the unit has more than 6 bays, starting with 4x1TB + 3x2TB. md127 is a RAID6 of 6 partitions of 1TB (4TB capacity, 2TB parity). There is unused capacity on both 2TB HDDs. BTRFS volume capacity is 4TB.
If you add a 2TB HDD, you have 4x1TB + 4x2TB. md127 should expand to a RAID6 of 8 partitions of 1TB (6TB capacity, 2TB parity). X-RAID creates md126 as a RAID6 of 4 partitions of 1TB (capacity 2TB, parity 2TB). BTRFS volume capacity is 8TB.-> Confirmed on 6.5.0 RC3
md126 : active raid6 sdi4[3] sdc4[2] sdb4[1] sda4[0]
5860253824 blocks super 1.2 level 6, 64k chunk, algorithm 2 [4/4] [UUUU]
resync=DELAYEDmd127 : active raid6 sdi3[7] sda3[0] sdc3[6] sdh3[5] sdg3[4] sde3[3] sdd3[2] sdb3[1]
4859553920 blocks super 1.2 level 6, 64k chunk, algorithm 2 [8/8] [UUUUUUUU]
[=>...................] reshape = 7.8% (76391200/971910784) finish=345.5min speed=43192K/sec- Retired_MemberMay 09, 2016
8d) Factory Default with 1x1TB + 1x2TB HDDs. md127 is a RAID1 of 2 partitions of 1TB (1TB capacity, 1TB mirror). The 2TB HDD has unused capacity. BTRFS volume capacity is 1TB.
If you add a 1TB HDD, you have 2x1TB + 1x2TB. I believe md127 should reshape to a RAID5 of 3 partitions of 1TB (2TB capacity, 1TB parity). The 2TB HDD has unused capacity. BTRFS volume capacity is 2TB.
This is what you would get if you Factory Default in that HDD configuration.
--> I'll confirm that.
-> Confirmed on 6.5.0 RC3
Start with 1x500GB + 1x1TB. md127 is a RAID1 of 2 partitions of 500GB (500GB capacity, 500GB mirror). BTRFS volume capacity is 500GB.
md127 : active raid1 sda3[0] sdb3[1] 483534784 blocks super 1.2 [2/2] [UU]
Adding 1x500GB. Now is 2x500GB + 1x1TB. md127 reshapes to a RAID5 of 3 partitions of 500GB (1TB capacity, 500GB mirror). BTRFS volume capacity is 1TB.
md127 : active raid5 sdc3[2] sda3[0] sdb3[1] 483534784 blocks super 1.2 level 5, 64k chunk, algorithm 2 [3/3] [UUU] [>....................] reshape = 1.3% (6579136/483534784) finish=264.6min speed=30031K/sec
Will double check 8e now, to confirm that the size of the HDD is not restricted to the biggest but the smallest in horizontal expansion ;)
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!