I am currently building a storage unit
for our office. It is rather low budget at the moment, but it needs to be extendable.
basically we have a huge database
that will grow over the next few months quite heavily. Therefore, ideally we would just
like to throw hard discs at our new server.
We
have not purchased the server yet, but going through some details. However, I would like
to get an answer to a question first.
How easy
is it to expand existing RAID systems?
We will
start with two HDD 4TBs WD black. But after about 1 month we will need to add another 2
4TB disks. The server we are going to get has 12 bays.
Mirroring is important, However RAID 1 only
works with 2 disks. Raid 10, would already allow us to mirror a RAID 0. And from what I
have seen even the raid 10 can be installed with two disks. However, what happens after
that ? Is there any recommendation to achieve a flexible RAID system ?
On the OS layer I would just like to
build a LVM, that recognises once there is space added to the "disk" so that it can be
expanded. But in fact, it lies on several disks which are managed by the RAID
controller.
There are
quite a few options with varying degrees of resilience, disk efficiency and ease of
operation. Here are a few:
RAID 0
& 1
RAID 0 and 1 are immediately out of the question, RAID
0 offers no redundancy (in fact it increases risk) and RAID 1 is limited - as you
mentioned - to the maximum size of 1
disk.
RAID
5
Is an option and you only lose 1 disk for parity; though this
is bitter-sweet as the more disks you have the chances of finding an error on 2 (or
more) disks rises (and you're screwed if that happens). Write speeds are often lacking.
Minimum 3 disks to start with. Expanding is time consuming and has a high risk of total
failure.
RAID
6
Is a more resilient option, same as RAID 5 except it uses 2 x
disks for parity, thus you can lose 2 x disks to failure as still be able to rebuild.
Write speeds are often lacking. Minimum 4 disks to start with. Expanding is very time
consuming and has a lower-than-RAID5 risk of total failure, but not negligible
risk.
RAID
10
Is the most resilient option of all the RAIDs and also the
lease efficient as it uses half of all disks present for mirroring. One major benefit
over RAID 5 and 6 is write speeds are often significantly improved with every disk you
add (as opposed to declining in performance) - this can be essential depending on what
type of database you're implementing. Minimum 4 disks to start with, adding 2 at a time
after that. Expanding is probably the fastest with the minimum risk
associated.
RAID
50/60
Is the middle ground between RAID 5/6 and RAID 10 - has
better disk usage efficiency than RAID 10 but has the requirement of having lots of
disks to start with (Minimum 6), also performs better than the basic RAIDs. Expansion is
very time consuming, risk depends on how many disks are in the array but is somewhere
between RAID 10 and 5/6 (weighted towards
5/6).
LVM
I
don't use this much, so I'll leave that avenue for someone else to comment
on.
Filesystem-based
RAID
BTRFS and ZFS can both perform RAID 0,1,5 transparently
across disks without the need for Linux RAID managment. Adding/removing/altering array
sets are easy (though time consuming, as RAID is). ZFS has the benefit of being tried
and tested for many years, whereas BTRFS is still an emerging filesystem.
Conclusion:
Linux
RAID is somewhat more forgiving than hardware RAID, where RAID 5/6/50/60 are involved
Linux RAID can make your life a bit easier if things go pear shaped (like losing 2 disks
on a RAID 5 array, you can still assemble the array and try to recover whereas most HBAs
will outright refuse). RAID 10 with hardware RAID is usually the safest bet both in
regards to resiliency, I/O throughput and expanding times. So put it down to my top
2:
If I/O throughput is not a high
priority:
* Linux RAID 5, but routinely back your data up elsewhere
to offset the risk. Expansion is as simple as a 1-line command, though it'll take a
while to complete.
If I/O throughput is a
priority:
* Hardware RAID 10, the schedule for backing your data up can be
relaxed somewhat. Expansion will depend on the hardware RAID type, but won't take as
long to initialise.
Comments
Post a Comment