MDADM RAID 6 and UPS questions
OS: Mint 18 Mate
I have a few questions concerning mdadm and how to tell Mint what to do when there is a power loss and the batteries in the UPS kick in. 1) As I play around with Mint 18 and a software RAID 6 array, I installed mdadm and webmin and had no problems setting up the array. When I go into Caja and poke around, I can browse to /dev/md0 and see my RAID 6 array and access it perfectly fine. Then, I started to see posts about editing /etc/mdadm/mdadm.conf and something about adding "/dev/md0 ext4 defaults 0 0" to fstab. I don't remember doing any of this and the array seems to come up just fine after reboots. Can somebody explain why all this is needed? When I get home tonight, I'm going to check for these files and open them up. Maybe webmin took care of all this for me auto-magically? (Or does this fstab step needed in order for the RAID to show up as 'mounted' on my desktop somewhere?) 2) My RAID array is not the boot drive. Is it critically important to stop the array before rebooting the system? Right now, I don't and again, it seems to be there when I browse out to it. 3) Compared to using hardware RAID cards and Windows.... if a drive fails it's just a matter of typically popping out the dead one and inserting the new one and the HW RAID card will start rebuilding the array automatically. With mdadm, there seems to be multiple steps to accomplishing this same goal. What is the easiest, quickest way to go about addressing a failing hard drive that needs replaced in a mdadm RAID 6 array? 4) Right now, if my house suffers a power outage, the Windows "server" box that the UPS is connected to takes over. This Widows box is hooked up via a USB cable to an APC UPS. Once battery levels gets to 20%, Windows power management is configured to shut down the PC at that threshold. How would you accomplish the same thing in Linux? Is there a simple GUI for setting this up or must you use the command line? |
1) /etc/fstab is used to define the system drives and mount points, so the raid will be automatically mounted on boot in the place you want it with the mount options you want.
2) There is no need to stop the array before rebooting/shutting down, it'll be safely synced and unmounted as part of the shutdown process. 4) You would do the same with Linux if the Linux machine could see the UPS, but since it can't, you'll have to find another way. Is it possible to define a custom program that gets run before shutting down the system on Windows? If so you could write a little Cygwin script to ssh into the Linux machine and command it to shut down, so when the battery gets to 20% Windows tells the Linux machine to shut down before shutting itself down. |
For 3 with Linux software RAID you can just take the drives out of one machine and plug them into another with enough SATA ports and mdadm installed, then mount (OK, the steps are a little more involved than that but that really is the gist).
|
4) In addition, there is a daemon called apcuspd that can monitor the UPS status and shutdown at defined run time parameters. There isn't a GUI but setting up the configuration files is not difficult. There is also a windows version. apcupsd has a network protocol as well as compatible with APC's PCNET so other devices on a UPS can be automatically shutdown too.
http://www.apcupsd.org/ While apcupsd is specific to APC UPS devices there is a generic software program called NUT. http://networkupstools.org/stable-hcl.html |
Quote:
2) Good to know, thanks! 4) I guess I should have worded that better. If I stick with Linux for my Plex server.... the Windows machine will be removed from the UPS and the Linux box will take its place and be hooked to it via the USB cable. |
Quote:
The past few weeks/months (when time permits) I've been testing allllllllllllll sorts of configurations over here as I decide on a new Plex server build. Mint with MDADM RAID 5, 6, different file systems on top of that.... Windows Server Storage spaces.... Ubuntu, OpenMediaVault, UnRAID, FlexRAID. My mind is starting to melt. I just ordered a PERC H700 card and will carry out similar tests with that. The big thing I worry about, I've used Windows practically all my life. I've played with Linux from time to time and the thought of going 100% Linux for my Plex server and mdadm worries me. Lets say that everything is set up and working then months down the road, I decide to reboot the server and when it comes back up, the mdadm RAID is gone. Then, I have to pound away on forums and scramble for help. With Linux, I'm out of my comfort zone and like most humans, I fear the unknown. Sure, I was once like this with Windows but when I was a young teenager starting out with Windows, I didn't have to worry about managing a multi-terrabyte Plex server. :) And since we've been a Plex family for nearly 2 years, my wife and kids have grown attached to watching movies/cartoons/TV shows off of it. No, they don't freak out if it's down for a few days/week but I will feel the pressure to get everything back up and running ASAP. I know that I could have a catastrophic failure in Windows as well but with my experience with Windows, I'm 100% confident in my troubleshooting capabilities around that OS. With Linux..... I'm at about a 5-10%. So to get back on track.... what is the EASIEST way to recover from a single failed drive with an mdadm RAID 6 setup? (Lots of steps or just a few?) I found this on another forum when asking the same question: "No need to stop the array or fail the bad drive beforehand. Add new drive to array, mark old drive for replacement (--replace), remove old drive after replacement is complete. The old drive will then still be used for parity if necessary when there are other drive failures during the replacement process." When I get some time, I'm going to try that out. Seems easy enough. Something to note about mdadm..... it seems bullet proof. I've booted into Windows with these drives and formatted them then eventually booted back into Linux and when I went to set up a new array, mdadm warned me that these drives are part of a RAID array and cautioned me about proceeding. |
Quote:
|
Quote:
To me, at least, using Linux means a little more work and attention to details (with command line being used a fair bit) in return for much greater flexibility. So I would expect you to have some issues or frustrations at first but if you like to mess around with things you'll enjoy it and, even if you don't, you'll likely find you can end up with a very flexible setup indeed. |
Quote:
Code:
use a combination of mdadm --detail /dev/md0, fdisk -l, and smartctl -a /dev/sdX to get serial numbers of good/bad drives |
Quote:
|
All times are GMT -5. The time now is 10:21 AM. |