You are not logged in.

#1 2022-11-19 18:46:35

KaibutsuX
Member
Registered: 2015-04-22
Posts: 22

Expanding a RAID5 with mismatched drives

I know in a raid5, the smallest drive is generally the lowest available size making the rest of the larger drives unavailable to the pool.

My question is regarding possibilities for relcaiming some of that unused space.

I have a 5x10TB server and with drive prices per TB coming down, I recently bought 2 new 14TB drives.

In adding the new drives, I can partition them to be 10TB and individually add them to the array and reclaim 8TB (logical volume) of unused space for system usage outside the raid.

Am I overlooking any other options here?

It seems like eventually it would get really complicated with reclaiming logical volumes on ever increasing drives sizes like,  4 14TB drives added to an existing 10TB node array would give me:

* 10TB (4TB unused) - partitioned to 10
* 10TB (4TB unused) - partitioned to 10
* 10TB (4TB unused) - partitioned to 10
* 10TB (4TB unused) - partitioned to 10
* 10TB (made of 4 + 4 + 4 unused space) - logical volume
* Unused remaining 6TB


Is this just the reality of mixing drive sizes?

Offline

#2 2022-11-19 19:29:52

frostschutz
Member
Registered: 2013-11-15
Posts: 1,647

Re: Expanding a RAID5 with mismatched drives

With mdadm software RAID, you can build another RAID out of those 4x 4TB unused partitions.

I slice all my drives into 250GB partitions. You don't have to take it that far, though.

# parted /dev/sdb print
Model: ATA ST6000DM003-2CY1 (scsi)
Disk /dev/sdb: 6001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name   Flags
 1      1049kB  250GB   250GB                SMR1   lvm
 2      250GB   500GB   250GB                SMR2   lvm
 3      500GB   750GB   250GB                SMR3   lvm
 4      750GB   1000GB  250GB                SMR4   lvm
 5      1000GB  1250GB  250GB                SMR5   lvm
 6      1250GB  1500GB  250GB                SMR6   lvm
 7      1500GB  1750GB  250GB                SMR7   lvm
 8      1750GB  2000GB  250GB                SMR8   lvm
 9      2000GB  2250GB  250GB                SMR9   lvm
10      2250GB  2500GB  250GB                SMR10  lvm
11      2500GB  2750GB  250GB                SMR11  lvm
12      2750GB  3000GB  250GB                SMR12  lvm
13      3000GB  3250GB  250GB                SMR13  lvm
14      3250GB  3500GB  250GB                SMR14  lvm
15      3500GB  3750GB  250GB                SMR15  lvm
16      3750GB  4000GB  250GB                SMR16  lvm
17      4000GB  4250GB  250GB                SMR17  lvm
18      4250GB  4500GB  250GB                SMR18  lvm
19      4500GB  4750GB  250GB                SMR19  lvm
20      4750GB  5000GB  250GB                SMR20  lvm
21      5000GB  5250GB  250GB                SMR21  lvm
22      5250GB  5500GB  250GB                SMR22  lvm
23      5500GB  5750GB  250GB                SMR23  lvm
24      5750GB  6000GB  250GB                SMR24  lvm
25      6000GB  6001GB  1188MB               SMRx   lvm

Synology uses the same approach, calls it Hybrid Raid - https://kb.synology.com/en-my/DSM/tutor … d_RAID_SHR

Last edited by frostschutz (2022-11-19 19:32:37)

Offline

#3 2022-11-19 19:35:07

KaibutsuX
Member
Registered: 2015-04-22
Posts: 22

Re: Expanding a RAID5 with mismatched drives

Hmm, I am using mdadm right now. When you say another raid, I'm not looking to make another raid, I just want to maximise space for the single raid.

What is the purpose for your partitioning logic to 250gb?

Offline

#4 2022-11-19 20:06:12

frostschutz
Member
Registered: 2013-11-15
Posts: 1,647

Re: Expanding a RAID5 with mismatched drives

It's part "personal preference" - I don't like "one big filesystem for everything", I'd rather have multiple smaller filesystems. And part "it's actually better this way" since you can do cool stuff you couldn't do otherwise. Like, for example, mixing drive sizes in a raid.

I can also rebuild, reshape, resync one smaller part of my RAID instead of betting everything in one go or having to wait for 20TB's to finish syncing. What's the point of using one big partition for everything? From my point of view, "one big thing" only has downsides.

Of course, you have to know what you're doing.

Not sure if I interpreted your first post correctly but if your idea is to use LVM to create another 10TB device to add to your RAID, banish the thought. You'd effectively be reducing your RAID 5 to a RAID 0. Since with one dead drive, you'd be losing two RAID members instead of just one. The 10TB partition of that drive. Plus the other 10TB LVM 4TB of which were contributed by the same drive also.

You can use partitions but you can't use multiple from the same drive in a single RAID. You don't have any redundancy if you do.

Offline

Board footer

Powered by FluxBB