What is the raid setup for?

why don’t you get a decent raid controller and run raid 5 or raid 10

That is a good question. Sense I’m not a linux person or Server person I’m still somewhat new to this I’m just learning i didn’t know you can in freepbx raid 5 or 10? i know somewhat about raid in general but that is all.

Since you’re a self-described newbie, the “big” answer to the original question is “Because it is consistent with management best-practices”.

There are lots of things built into the underlying Linux (regardless of the distro) that are there because of years of people saying “it sucks when <X> happens, so let’s do this to make it not suck as much.”

Automatically initing a backup drive that is a hot-swap that you can fail over to in case of emergency (if one is available) is one of the more obvious things that Linux managers over the years have done to make it easier on less experiencing sysadmins.

this is not a FreePBX issue. for stand alone systems we run dell servers with a raid controller but there are raid controllers out there for just about any hardware. you configure the raid controller to do what you want and then the all the disks in the Raid appear as a single drive to Linux, FreePBX or any other application. this approach is a bit more expensive to set up (cost of the raid controller plus more drives) but is much more forgiving when it comes to failures. in fact with raid 5 you can lose a disk and keep right on running and then assuming you have hot swappable drives, you just replace the failed drive and rebuild it on the fly with no down time. if you don’t understand Raid, then i suggest looking at the Wikipedia article as a starting point.
However, as cynjut says, raid is not a substitute for a good back up strategy.
other things like virtual machines and the FreePBX HA can be used to create very robust environments. Raid is simply one of the building blocks

Hello Cynjut i don’t think Linux sucks at all. I’m learning more and more each day. And yes I’m new or as they call it Newbie somewhat to linux. I have been learning and playing with linux for some time. But there is a lot i still don’t know and Raiding a system is one thing i never got into yet. among other things. I’m just learning right now how it works. I know there is a big difference between hardware raid and software raid. But at the end they basically do the same thing Weather it be raid 0 or raid 1 even raid 5 and 10. But with the freepbx i don’t know which one is that. or what it does is what I’m trying to figure out now.

@josephchrz I applaud your efforts to learn, The “Distro” offers a basic raid 1, if you want a more robust solution then you will have to “go off the reservation”, perhaps look at ZFS as it scaleable, manages many levels of RAID and also and “logical volumes” to even huge seemlessly, but generally bypasses both hardware and software traditional solutions for best effect, BUT if you have a hardware raid, you don’t need it yet, if you have a software raid then you still don’t need it yet,most folks will be happy with RAID1 which mirrors two disks and survives a failure, BUT as I told you before, recovering from a failure is NOT automatic.

Hello Dicko thank you for the respond back. And thank you for the information. I understand it won’t be easy once you learn a drive. And this is something I’m learning each time. Also something i need to learn because in the future there might be a problem like this. and Learning how to deal with it instead of worrying about it being stressful. won’t help. So that is why I’m here to ask and figure out what i need to do and learn.

The wise virgin always trims her lamp, that is all, kudos to you for realizing that.

holy moly that something my dad would say to me .Wait you ant related to my family are you LOL just kidding thank you for all the help and information.

It is always a pleasure speaking with an evolved warm-ware unit, probably your dad agrees :wink:

Maybe because I’m the only one out of 3 boys and I’m the oldest that he loves talking to not sure why :slight_smile:

Just to add to this discussion on the why of Hardware Raid.

Number one, as Dicko says, software raid is not automatic,
Good Hardware Raid is. Just pull the bad drive and plug in a new one and the controller automatically rebuilds.
No downtime, No Hassle.
Most Good Raid controllers do 0,1,5,10 and BYOD. Raid 5 used to be common because drives were small and it took a lot of them to create space. With large drives being cheap now I have found that simple mirrors work just fine and needs only 2 drives, especially for a FreePBX server.

I use Dell Servers for FreePBX with real Hardware Raid and they are cheep and work great, way more power than needed.
Beware of Dell and the onboard S300 series “raid” controller as it is NOT a Hardware Controller and will NOT work with Linux (Windows only Software driven).
Pay the few hundred for a Real Hardware Controller. Drive failures become a non issue.

Hello adamsffi thank you. So if i build a system with a hardware raid controller in say raid 1 mirroring the installation do i select the one that says non raid or the first selection.

The Raid “virtual disk” must be built (and modified) in the BIOS of the controller while booting up the machine. Once it is built and you boot on up to the Linux install the virtual disk will be all that appears and as only one disk so non raid is all you can do.

These days I only deal with Dell and their PERC H series controllers which I think are made by LSI but there are a lot of add in cards you can buy such as Adaptec if you don’t do Dell, just make sure it is in the Distribution approve hardware list. The drivers in the distribution have worked just fine for me.
Dell has Windows Software to modify and work on the virtual vs physical disks in the OS but as far as I know there is non available for Linux.
If a disk fails you can just hot swap the bad drive for a good one. Most controllers auto rebuild for a location on the bus and most will let you add a third disk as a Hot Spare if you don’t check your servers daily. Lots of nice options, such as battery backup for the cache and such in case of a hard power crash.

Thank you Adminsffi.

Hello i know in all these comments and post. About hardware raid vs software raid. But i was wondering something in the Freepbx install it has the option to select without raid and with raid. So if you system doesn’t have a raid card does that mean it is a software raid?

Second question is if that is a software raid and and your main drive dies out. Do you simply unplug the first hard drive that went bad and put it to boot to that second drive? Will all the programming like ext, usernames, passwords will still be there all the latest stuff that up to the point where the first drive die out will be on that second drive?

  1. Yes it is software raid.
  2. If the first drive fails, your box should continue to work with all your configurations. To rebuild the raid is hard, well harder from a true hardware raid. You must power down the box, replace the drive, boot again and run mdadm commands to start rebuilding the raid. Finally hot swap is another subject that any other user can contribute. :smiley:

thank you astbox. I understand now.

Dicko - I have appreciated your help in the past and thought you might provide a bit of clarity for me. If I have two HD and I install the Full FreePBX Distro I know it goes on both HD. If I then access the system and create an extension, will that extension be on both HD?

I know the failover is not automatic, you have to reboot the system to utilize the other HD but does that mirroring of extensions, DIDs and programming happen automatically?

Thank You

If you have two hard drives and chose the raid install then the file system is mirrored to both drives, either should be bootable but if one drive disappears, then everything works fine off the remaining one, if the drive reappears then it will likely just rebuild you can watch the progress with:-

watch cat /proc/mdstat

the metadata and the journal of the md file system will choose to sync the ‘older’ hardware to the newer, If there is no metadata , i.e. a replacement drive then you will need to fail/remove/rebuild the various partitions and then add the partitions back into the md device as documented in this thread. Always wait until any rebuild or problems about missing devices in that /dev/mdstat thingy are resolved until you do anything else.

Anecdotally, it can help when doing a really major update to the system to remove a drive before that possibly cataclysmic event, if it fails then rebooting from the ‘old’ drive without the new drive will return you to where you were before, then do the fail/remove/add/rebuild thingy.