S
S
Sergey2016-11-13 18:16:26
linux
Sergey, 2016-11-13 18:16:26

Which RAID configuration should I choose for my home NAS?

The question arose of organizing a data storage system in a home network.
Available HDD: 3TB - 2 pcs. (WD Green), 2TB x 1(WD Green), 1TB x 1(WD Blue).
It will store both unique information (personal photo and video archive), which cannot be restored after loss, or simply collections of music, films and other not very valuable information. As always, you want maximum volume and minimum risks.
The problem is that the ratio required for each of the categories is not known in advance.
At first, I thought about exchanging 1 and 2 TB disks for 3TB, and collecting RAID-5 for all data, but after reading the article , I really thought about it.
There was also an idea to assemble 3TB RAID-1, and assemble 1 and 2 TB into RAID-0 or JBOD. But I do not fully understand how to increase RAID-1 later. For this, you will have to add 2 3TB disks at once.
Help to understand the following questions:
1) How real is the probability of failure of the second disk during RAID-5 rebuild?
2) Comparative advantages and disadvantages of RAID-0 and JBOD. If I understand correctly, then RAID-0 writes each file block to a new disk in turn, and if one disk fails, data from all is lost. In the case of JBOD, the second disk is simply a continuation of the first one, data is written sequentially to one disk, and if the disk is lost, only data from it is lost (well, those that were stored immediately on 2x). Did I understand everything correctly?
3) Which RAID option is better to choose? Software or hardware? If hardware, then which models (or what key parameters should you pay attention to)? The system will run on OpenMediavault, which is based on Debian.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2016-11-13
@plin2s

First, answer the question - why do you need a NAS RAID?
RAID != Backup
Accordingly, any frills with arrays are needed only if you need real-time fault tolerance.
If I were you, I would create
1) raid1 from 2x3TB
2) raid5 from 2x3TB+1x2TB (naturally, only 2+2 will be available, but you can eventually replace a two-terabyte unit with another three and expand the array).
And the remaining disks (well, or one, if you act according to the second option) should be used for a cold backup of the most important data.
JBODs are just separate drives that will be mounted at different points.
Total:
- I would advise using a software raid, because it is more versatile and will not depend on hardware (which can also be fatal)
- see above about the array, depending on how much space you need right now, including for backup.
I saw problems with the raid5 rebuild personally. And the worst thing is that you can never be 100% sure whether the data was damaged or there was a void in place of the bad blocks. Just check with the backup.

M
Melkij, 2016-11-13
@melkij

A soft raid does not limit you with nonsense like 1 disk can be in only one array. You can combine partitions of one disk into different arrays.
You can cut discs in any way you like. For example, split 3TB disks each into two partitions: 1 and 2TB each. Collect as a result two raid5: 3 volumes of 1TB each and three volumes of 2TB each. Total 6tb of formatted capacity, loss of any disk of the array is acceptable. If necessary, in a single piece of space - deploy LVM on top of this.
You can grow disks of any size, there is only one condition: the added volume is not less than the used volume size in the current array.
About raid5 in home NAS - I have two disks at once for 8 years did not die. By default, debian includes a cron script to verify all soft raids once a month. He discovered a couple of problem disks in advance.
But here two disks fall out of the array at once - it was. The power cable has come off. It was possible to collect the array back, but the FS was beaten. But I had a backup, only unimportant data was lost.
If there is no way to use a geographically remote location for backup, then you can allocate areas on these disks for backup. Just not as part of something complex (lvm, raid) and not on the same disk as the main copy! You can use raid1 if you need to continue working if a disk fails - at least restoring a mirror is simple and just one of any disk is enough.
For example, cut 3TB disks into two partitions: 2TB and 1TB. Then build raid5 on three 2tb volumes - for everything that is not very necessary. Three sections of 1 TB - for important data. It is possible to build raid1 from two disks. But not like a mirror of all 3 discs! This will only help from a physical breakdown, but not from a problem with the FS. One partition should not be mounted permanently, it is mounted only for the duration of the backup of the main part. rsync in cron as the easiest option. It would be better, as already advised, 3 independent volumes: an up-to-date copy, a hot regular backup, the last disk for a cold backup, physically turn it off (you can build an automatic device to open circuits on solid-state relays).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question