PDA

View Full Version : How to quickly get started using RAID?



kung foo man
15th July 2023, 13:56
Hey all,

I learned about RAID many years ago, but I never actually used it. How would you get started?

Simply buy a Hardware RAID controller and two same-size/type SSD's e.g.?

Mitch
16th July 2023, 09:36
I would recommend using a hardware RAID controller for duplicating your OS with RAID 1.
With a hardware controller you have these benefits:
- OS doesn't know about the underlying disks including boot partition.
- You can remove one disk and still boot up (in theory you could do this with MD raid in Linux, but not Windows).
- Independent from motherboard (fakeRAID e.g. Intel Rapid Storage Technology)
- Less problems after BIOS reset e.g. from (fake)RAID mode back to AHCI.

Cons:
- Checking the disk health with SMART could be different per (controller) vendor.
- More expensive than fakeRAID (motherboard).
- You need a SAS SFF to SATA cable.

For data storage software raid is the easier, cheaper and you have a lot of options under Linux e.g. MD, BTRFS or OpenZFS.

And yes, you need the same size disks (i think it uses the smallest size).
(For HDDs: don't buy SMR (Shingled) hard disks.)

kung foo man
16th July 2023, 15:12
Thank you Mitch!

I watched a simple tutorial so far: https://youtu.be/_QjHUi6VXV8?t=124

1) Basically every hardware RAID card comes with another kind of interface?
2) Is there any card/interface you would recommend?
3) And do I need to reinstall Linux, or could I just say to the RAID card "Hey, I want RAID 1, start with that disc and mirror it for a while like rsync"?

Sorry for noob questions, but it seems like every hardware RAID card would require a somewhat different setup with a different procedure, which feels confusing.

Mitch
16th July 2023, 19:33
1) Basically every hardware RAID card comes with another kind of interface?
I guess, yes. It is same as BIOS/UEFI motherboard setups.
I think the steps are the same.

https://www.thomas-krenn.com/en/wiki/Create_Adaptec_SmartRAID_RAID_via_BIOS
https://www.thomas-krenn.com/en/wiki/Managing_an_MegaRAID_Controller

2) Is there any card/interface you would recommend?
I'm using a Adaptec controller with arcconf for managing and (manual) monitoring after boot.
For LSI/Broadcom you have storcli.
It has been a while since i used the menu for both. Either would do the job and i don't know any other brands except server vendors as HPE, Dell etc.
It might be possible to read smart data via the smartctl. I need to try again if i can get it working for my Adaptec card.

https://www.thomas-krenn.com/en/wiki/Adaptec_arcconf_CLI_Commands
https://www.thomas-krenn.com/en/wiki/StorCLI_commands
https://unix.stackexchange.com/questions/457229/hard-disk-info-behind-hardware-raid-controller
https://docs.hetzner.com/robot/dedicated-server/raid/adaptec-raid-controller/

3) And do I need to reinstall Linux, or could I just say to the RAID card "Hey, I want RAID 1, start with that disc and mirror it for a while like rsync"?

I think it is basically like formatting a new disk.
You can clone from your original disk to your new virtual disk.
The raid card will keep both disks (under the virtual disk) in sync.

IzNoGoD
17th July 2023, 05:23
Please use software raid. For linux, try ZFS. For windows, try storage spaces.

HW raid cards are so proprietary that if they fail, you gotto find the same card again to save your data. With software raid, just get the same software again.

For interfaces, get a hba adapter, or flash some old hw raid card to a hba firmware (i got a spare card if you want one)

kung foo man
17th July 2023, 08:49
I think it is basically like formatting a new disk.
You can clone from your original disk to your new virtual disk.
The raid card will keep both disks (under the virtual disk) in sync.


Thank you a lot, Mitch! Your descriptions help me to understand RAID hardware a bit better.


Please use software raid. For linux, try ZFS. For windows, try storage spaces.

Nice, I already use ZFS, so I guess I just need to figure out how to put it in RAID1 mode...

https://pve.proxmox.com/wiki/ZFS_on_Linux

They also talk about need for: https://en.wikipedia.org/wiki/ECC_memory

And a lot of that RAM, because it helps the caching etc...

Do you use RAID1 with two disks always? Contemplating RAID10 with 4 disks... speed + safety... speed isn't even that important to me, things shall just work... and speed critical applications can go in RAMFS/TMPFS anyway.



HW raid cards are so proprietary that if they fail, you gotto find the same card again to save your data. With software raid, just get the same software again.


Right, I developed that impression aswell, they will format the disk as they please and I will be stuck on proprietary hardware and file formats etc.




For interfaces, get a hba adapter, or flash some old hw raid card to a hba firmware (i got a spare card if you want one)


Do I need a HBA adapter for additional storage or what is it good for?

IzNoGoD
18th July 2023, 15:55
If you're doing spinning rust (hdd, not ssd) with 4 disks, use zfs raid Z2 feature, gives you 2 parity disks, so any 2 disks can fail, contrary to raid10 with 4 disks, where 2 disks of the same raid1 array will kill your data entirely.