• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Linux RAID (mdadm) - RAID partition + OS partition on the same disk?

night_2004

2[H]4U
Joined
May 31, 2007
Messages
2,229
I've got a new Linux fileserver that I pieced together with 4x 1TB WD Caviar Black drives in RAID6 for 2TB of advertised space. I would like to stuff another 2 drives in there for 4TB advertised space but (1) drives are insanely expensive with the flooding events and (2) with the four RAID drives and one OS drive I'm almost out of SATA ports on the motherboard.

I have two other 2TB WD Caviar Green drives sitting on the desk from another NAS I'm retiring and I'm thinking about using the first 1TB of each drive as a RAID1 OS drive and the last 1TB of the drive as a part of that pre-existing RAID6 setup.

Problem is that I'm a little concerned about mixing and matching RAID setups on the same disk like that. I can't really see where there would be a problem with it but who knows. Intel's Matrix RAID has a feature like this but I've never played with it.

At least this would get me by until drive prices fall...anyone have experience with this?
 
This will work as long as the device sizes are big enough. mdadam is quite flexible.

first 1TB of each drive as a RAID1 OS drive and the last 1TB

Do you really need 1TB for the os? At work I generally make this a raid6 of 50 to 75GB total.
 
Do you really need 1TB for the os? At work I generally make this a raid6 of 50 to 75GB total.

Heck no, but with 1TB per drive used up by the RAID6 array which is already going to be 4TB I don't see myself using that other space any time soon. Maybe I'll set up another 750-900GB RAID1 array and use it as a media network share.
 
I generally use RAID-1 boot/root (with GRUB failover), RAID-1 swap, RAID-5/RAID-0 data partitions. I've set up dozens of headless co-located servers like this and never had an issue with the use of multiple partitions for md.

If you set up RAID-1 boot/root and GRUB failover it will usually manage to boot even with the first disk faulty. If it matters (i.e. headless box in annoying/remote location), do yourself a favor and pull the first disk to make sure it works before you send it off ;)
 
Tiberizzle is pretty much spot on with advise.

It used to be you could get many installers to install with a RAID1 /boot partition, but they would then only install grub to one of the drives. Your data would survive a disk failure, but there was a 50% chance your system would no longer boot. After you'd install the OS, you'd then have to manually go back and grub-install on each drive indivudally on your own to get things to actually work as you'd expect.

This, or pretty much any hardware or software raid setup, should be tested before you depend on it to do anything at all.

Also yeah mirrored swap is pretty common... tho these days with the price of RAM, I don't even use swap anymore. Just buy extra RAM an let kernel use it as cache if nothing else needs it.
 
Mirrored swap partition? Never even considered that.

I have never done that. Mainly because most of my linux boxes have 8+ hard drives. I guess I could raid5 swap but I usually just add 1GB to 2GB of each disk as a separate swap and let the OS do as it wants.
 
Yeah, having the swap scale across the array is pretty common.
Not sure why one wouldn't do this, when the swap space gets hit, only a single drive is doing all of the work. :confused:
 
The main motivation in RAID-1 of the swap isn't performance, but it certainly won't hurt compared to a single swap partition. It's mostly to prevent the system from crashing after paging out to a disk which later decides it is tired of your crap :p

Incidentally, multiple swap devices will be striped by Linux with or without RAID, so if swap performance is more important than system availability you can forego the RAID layer and just activate small swap partition near the beginning of each disk.
 
The main motivation in RAID-1 of the swap isn't performance, but it certainly won't hurt compared to a single swap partition. It's mostly to prevent the system from crashing after paging out to a disk which later decides it is tired of your crap :p

Yes, that does actually makes sense for RAID1.
I suppose I was thinking in terms of RAID0/10/5/6 with the swap partition being spanned across the array in terms of performance.
 
Back
Top