LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-03-2016, 01:02 PM   #1
road hazard
Member
 
Registered: Nov 2015
Posts: 241

Rep: Reputation: Disabled
Question How to backup MDADM super blocks and other tips I should know about mdadm?


My mega Linux Plex server is finally ready for lift off. I'll be using mdadm RAID 6 to build the array but had a question.

One of the things I've read is it's usually a good idea to backup the super blocks of the mdadm RAID. How exactly is this carried out?

I did some google searching and found LOTS of posts about people recovering without the super blocks and people messing up and overwriting the super blocks....... and no matter how I phrased my question, this was the best result i saw:

http://serverfault.com/questions/754...uperblock-info

....... somebody asking the exact same question with no answer.

But, along with that, where are some other mdadm tips? I think I saw it was also a good idea to make a copy of your mdadm.conf file. Any other precautionary steps I should take in case tragedy strikes and I need to reinstall Linux and get my array back up and running?

(My boot drive will be /dev/sda and the array will be on 6, 4TB drives (/dev/sdb-g)
 
Old 08-03-2016, 03:57 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
The superblock info is replicated on every drive, so backing it up is not usually a big concern. It does help to have a record in case someone does something dumb. I see nothing wrong with saving the output of mdadm --examine for this.

Other stuff to do:

1) Monitor the health and have a mechanism to email you when there is a problem. I've known people who set up RAID 6 and forgot about it until the 3rd drive dropped out.

2) Also run smartmon from cron to check individual drive health. But don't run the online drive self-tests which can interfere and trigger a RAID failure.

3) Be aware that loss of power during RAID 5 or 6 writes causes loss of data integrity. There is no way to tell which drives are up to date, especially on drives with a large cache. Use a UPS for important (all) data.

4) If performance is a concern consider RAID 10.
 
Old 08-03-2016, 04:58 PM   #3
road hazard
Member
 
Registered: Nov 2015
Posts: 241

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by smallpond View Post
The superblock info is replicated on every drive, so backing it up is not usually a big concern. It does help to have a record in case someone does something dumb. I see nothing wrong with saving the output of mdadm --examine for this.

Other stuff to do:

1) Monitor the health and have a mechanism to email you when there is a problem. I've known people who set up RAID 6 and forgot about it until the 3rd drive dropped out.

2) Also run smartmon from cron to check individual drive health. But don't run the online drive self-tests which can interfere and trigger a RAID failure.

3) Be aware that loss of power during RAID 5 or 6 writes causes loss of data integrity. There is no way to tell which drives are up to date, especially on drives with a large cache. Use a UPS for important (all) data.

4) If performance is a concern consider RAID 10.
Thank you so much for the info! The server will definitely be on a UPS.

Fortunately, performance isn't a concern, it's just going to be a Plex server.
 
Old 08-03-2016, 07:29 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
As I said in your other thread, keep a copy of /etc/lvm somewhere safe.

I prefer to use LVM to manage the RAID these days - add sufficient separate devices, then define the array, and LVM handles all the messy work of ensuring data and metadata are separated appropriately. Note this is different to the old way of defining LVM over the top of pre-defined mdadm RAID.
You can even define a failure policy, and let LVM handle it for you rather than having a subsequent (boot) failure. Very nice.

Works well on Fedora/RHEL (they are the motivation behind the development) - not sure about other distros.
 
Old 08-03-2016, 09:03 PM   #5
road hazard
Member
 
Registered: Nov 2015
Posts: 241

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
As I said in your other thread, keep a copy of /etc/lvm somewhere safe.

I prefer to use LVM to manage the RAID these days - add sufficient separate devices, then define the array, and LVM handles all the messy work of ensuring data and metadata are separated appropriately. Note this is different to the old way of defining LVM over the top of pre-defined mdadm RAID.
You can even define a failure policy, and let LVM handle it for you rather than having a subsequent (boot) failure. Very nice.

Works well on Fedora/RHEL (they are the motivation behind the development) - not sure about other distros.
LVM.....something new for me to learn.

Did some quick reading and sorta kinda understood it. Hmmm, LVM needs to be used on TOP of mdadm or with LVM, you don't need mdadm? (Yes, I'm totally confused.)
 
Old 08-04-2016, 12:21 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
mdadm and LVM are both (different) abstraction layers that you can insert between your filesystem and the real devices underneath. They have different functions. mdadm you know about - LVM abstracts the devices so you can operate as a storage pool; add/remove/move devices and extend filesystems across devices.
LVM can sit on top of mdadm, or mdadm can sit on top of LVM depending on requirement. Due to recent changes in LVM, it can now manage the mdadm interface transparently. I find it (now) very useful.
 
  


Reply

Tags
mdadm, superblock



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mdadm raid5 module blocks array rebuild angry.tangerine Linux - Server 0 09-25-2011 11:07 AM
[SOLVED] Attempts to work around a mdadm bug/ mdadm cannot get exclusive access to /dev/md127 Sereph Linux - Newbie 1 08-16-2011 03:21 AM
MDADM screws up the LVM partitions? Can't mount the LVMs after mdadm stopped alirezan1 Linux - Newbie 3 11-18-2008 04:42 PM
unable to load MDADM module BUT mdadm works?!?!?! alirezan1 Linux - Software 2 09-08-2008 07:58 PM
mdadm super block - RH9 wombatz Linux - Software 4 05-04-2004 04:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration