-1

today I have a question that I can not answer.

Our servers are dual power and battery. The operating system never crashes. (thanks linux)

Now, I wonder what happens if the server suddenly shuts down? (motherboard, processor?)

In this case, if I want to transfer my RAID10 cluster to another server, what happens if it is a software RAID or a hardware RAID?

Hardware RAID will really be safer in this case?

thank you in advance cordially

Dylan
  • 1
  • 1
  • 1
    BTW, just checking: did you wire the UPS on _one_ of your redundant power supplies only? Otherwise if your UPS fails or you need to replace a battery, the server still goes down. – Halfgaar Sep 30 '18 at 08:43
  • Keep in mind too that depending on your server manufacturer, the pieces available vary a lot. Some manufacturer ship same day for warrenty in big center. – yagmoth555 Sep 30 '18 at 21:49

3 Answers3

3

The answer is a definitive "depends".

It depends if it's a hard poweroff or not. With a hard power off you have a risk that caches didn't get written (with soft- and hardware RAID) and you lose data/files get corrupted. Data loss can occur with both systems.

I've also seen a problem with hardware RAID where the RAID-controller was the issue, it went bonkers and corrupted the data, even a new controller couldn't restore it (thanks for backups though).

In general, I am a BIG fan of Linux software RAID. The reason is you don't depend on one vendor and it has proven its value for many, many years now. It's reliable, you can restore data easily, you can modify it, you can do any thing you want.

In case of a Linux software RAID, when your mainboard etc. fails and you want to put your drives into new hardware you follow these steps:

  1. Take your harddrives out and put them into the new hardware.
  2. Done.

How you approach this with a hardware RAID depends on the type of RAID you use. Especially with old hardware this can be a bummer.

Also, always keep in mind: RAID is not a backup. The main reason for using RAID is reducing downtimes in case of drive fails. And in most cases it avoids having to reinstall and restore from backup but never use it instead of a backup but just as addition.

Broco
  • 1,919
  • 12
  • 21
  • Regarding caches, though, with proper hardware raid it's pretty normal that the controller has battery-backed cache and that you have the drive write cache disabled. – Håkan Lindqvist Sep 30 '18 at 11:27
  • Thank you for your answer, that's what I thought in the case where a server turns off suddenly, do not invest in hardware RAID because it does not change anything. Do you think a hardware RAID 10 works better on SSDs than on RAID software? (I speak for the performance) – Dylan Sep 30 '18 at 12:54
  • Performance wise you should see a (very) slight better performance in hardware RAID, but many experiments have shown that the overhead for software RAID is actually negligible. There are many comparisons available online, you can look up the benchmarks. – Broco Sep 30 '18 at 14:06
1

Rather than software vs hardware RAID, the different behaviors are due to the presence (or absence) of a powerloss protected cache:

  • software RAID1 are generally run from the integrated SATA/SAS ports, which lacks power protected caches. This means that in the case of an unexpected powerloss, a write can be stored on a single disk/leg only, effectively de-synchronizing the array. When power is restored the array is resynchronized by copying data from the first disk/leg. In order to reduce sync time, advanced RAID implementations (for example Linux MDRAID) use a write bitmap to keep track of latest block updates (synchronizing the areas around these blocks only). Please note that, based on the RAID implementation, you can have no guarantee that the first disk/leg has the most updated/correct data. This means that the resync process is mainly done to bring the array in a consistent state, rather than to "recover" data;

  • hardware RAID1 without a BBU/FBWC share the same shortcoming of its software brothers (with minor differences due to hardware RAID often disabling the disk's private DRAM cache, a practice which greatly reduce performance even compared to software RAID systems);

  • hardware RAID1s with BBU/FBWC are, by the virtue of the non-volatile nature of their caches, immune to this problem: any write committed into the cache will be always written to both disks, even in case of uncontrolled shutdown.

In short, I strongly favor Linux MDRAID rather than cacheless hardware RAID: its code is open, in contrast of the bynary blobs found inside hardware RAID cards. That said, a proper hardware RAID with a generous FBWC can be required to hit higher performance.

shodanshok
  • 44,038
  • 6
  • 98
  • 162
0

If you're asking what happens to your data in case of unexpected shutdown, hardware RAID has better protection against that, if you have battery backup. Software RAID often times has to initiate a full rebuild, unless you have a write-intent bitmap, which slows things down.

If you're asking which is more easily migrated to another server: software RAID. All you need is enough SATA ports. If your hardware controller breaks, this often leads to issues, and you'd better have a spare handy.

Halfgaar
  • 7,921
  • 5
  • 42
  • 81