LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Is it possible to do mdraid for OS drive? (https://www.linuxquestions.org/questions/linux-server-73/is-it-possible-to-do-mdraid-for-os-drive-4175513929/)

Red Squirrel 08-07-2014 10:44 PM

Is it possible to do mdraid for OS drive?
 
I'm guessing no, given the OS has to be running for the raid system to initialize, but wondering if somehow there actually is a way.

For home I usually use a SSD for the OS and data is on separate md raid volumes, but I'm looking at switching to a cheaper dedicated server for my online stuff and since I'm not physically able to quickly go swap a drive and restore an image I rather have raid for the OS. Most providers charge an arm and a leg per month for hardware raid so if there's a way I can do it in software somehow that would save me like 50-100 bucks per month.

Ser Olmy 08-08-2014 08:51 AM

It is indeed possible, as long as you:
  1. use a boot loader capable of loading the kernel/initrd from the drives in the RAID Array, and
  2. use an initrd that takes care of the actual RAID initialization before mounting the root file system
I have several systems booting from RAID1 md devices. I use LILO as a boot loader, and it explicitly supports RAID1 md arrays (it copies itself to the MBR of both drives). I'm pretty sure RAID5 or RAID6 would not work.

I run Slackware with a standard initrd, which automatically activates the array.

Red Squirrel 08-08-2014 12:27 PM

That's good to know. I'll have to google further on what initrd is and how to influense whether or not it supports raid. I've always just installed normally from CD so I'm guessing it just puts whatever default is. Then again if I get it setup as a dedicated server I'm guessing the data centre staff would do that anyway.

jefro 08-08-2014 07:59 PM

If you are buying space, they have images for virtual machines usually. They don't exactly install it, just copy a golden copy. Kind of unlikely they'd set up a custom install just for one user. I may misunderstand this too.

Red Squirrel 08-09-2014 01:26 AM

Quote:

Originally Posted by jefro (Post 5217808)
If you are buying space, they have images for virtual machines usually. They don't exactly install it, just copy a golden copy. Kind of unlikely they'd set up a custom install just for one user. I may misunderstand this too.

They do provide "soft raid" as an option, but I always figured that was if you order more than 2 drives, so 1 for OS and you can raid 2 or more drives, but typically I'd just set that up myself anyway, but if it's possible to do for the OS then they have to do it given I wont have access till the OS and SSH is up. I'm currently paying like 100 bucks a month for a server with 4GB of ram and 1TB drives through Carat Networks and I was looking at OVH and can get a better server for less, so I'm looking at moving my stuff over. the one at Carat has hard raid though but if I can get away with soft raid for OS that will save lot of money.

273 08-10-2014 12:49 PM

What do they provide in terms of backup and recovery options? Remember RAID is not a backup and is more about continuation of service so if you can deal with a potential outage while you recover from backup do you really need RAID?
Just a thought, and I'm certainly no expert so feel free to ignore it.

Red Squirrel 08-28-2014 11:32 PM

I do my own backups so don't see the point of paying someone else to do it so never buy any services but typically providers do offer it. I just don't want all my stuff to be down if a drive fails. That's the main point of raid. Uptime, and also not having to rebuild everything from scratch from backups. Backups are the last resort. Typically I see backups more of an insurance if the provider goes tits up or a catastrophic failure where I permanently lose complete access to the server or it's data.

Just trying to figure out if raid 1 would actually work via software for the OS, I just can't understand how that would actually work.

yo8rxp 09-01-2014 12:42 PM

well , indeed RAID it is not so forth coming ,as software raid aint ran by itself ..
My followings cannot be reproduced on some other ISP's , but only to local servers.

Software (MADADM usually) cannot be started from itself unless /boot says so.
In order to to that , you need a separate partition where /boot (grub , lilo ) has to be put on.
Can do that by partitioning whatever disk you got there , using separate disk drive , or using 1, 2 or whatever spare flash drives you need.
Yes mate , can do grub install on flash drives , it takes just about 30-50 MB space , can be cloned onto multiple flashes just to be on the safe side,and server can boot from there .
main advantage : separate /boot partition , easy to clone , easy to replace if using same flashes , and can use SSD or ata /sata drives just for the server main purpose like grouping it into raid volume , and not partitioning it for /boot sake.
Eaxmple: my server uses 2 kingston 8 GB (Too much ) just for /boot , and 2 separate 1TB drives in mdadm Raid 1 without /swap partition .
in this way , i got fail safe cloned /boot partition / got 2 drives in mirror mdadm , NO expensive hardware raid , raid status can be easily be read into html page, easy to eject /mark fault/replace any drive at any moment with no down times (hot swap), simply put is as easy as pie !!(excuse my bad lang) . On my old Dell PE 1950 H/W raid was a real pain into da arse to properly replace a faulty drive , here on mdadm is just a matter of coffee break ..

Red Squirrel 09-01-2014 03:11 PM

Hmm interesting. I don't think a server provider would be willing to do something like that though but I can always ask them. I may look into doing something like this for my own home servers though.


All times are GMT -5. The time now is 07:47 PM.