LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-19-2009, 05:33 AM   #1
newbuyer17
Member
 
Registered: Sep 2006
Posts: 38

Rep: Reputation: 15
software raid mirror split as a backup?


I have set up a RAID 1 software raid system.
What I'd like to be able to do is when performing upgrades etc I can split the mirror off and keep one mirror as a backup.
If the upgrade works I then add in the old disk again.
If it fails I'd like to be able to rebuild the array using the OLD mirror that I kept.

I cant find any info on this. I know I can fail the drive with mdadm, but my understanding is that the data on this this drive can't then be used again. Is that correct or can the bad upgrade disk be failed and then the old disk un-failed?

Thanks

Last edited by newbuyer17; 06-19-2009 at 05:34 AM.
 
Old 06-19-2009, 06:12 PM   #2
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197

Rep: Reputation: 105Reputation: 105
Still on the zero reply threads list. hmm. I want to jump in and give you the steps, but my linux mdadm experience is scant and mostly second hand. I've done a lot of raid, mirroring, breaking, rebuilding and upgrading, but all in Solaris (just did it today). I can say that what you are suggesting is common practice. We had a tutorial on it in our weekly sysadmin meeting a couple of months ago (with linux and mdadm).

I could check the man pages and google it, but you could do that too. Google mdadm, with split or break, and upgrade or backup. That gives you a couple of combinations, and it turns up a lot of threads that are close enough to be useful. Or toss howto into the search. "howto mdadm" turns up some useful material.

Or maybe someone will pop up and give the steps here. Should only be a half dozen or so steps for the whole process.
 
Old 06-19-2009, 07:12 PM   #3
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
That seems totally possible with mdadmn. I haven't done that since we usually have "staging" servers for that type of purpose. Having an extra computer/server for testing reduces human error and saves a lot of time. It's also cleaner. However, I can understand if the budget is not there for this exercise.

Quote:
I cant find any info on this. I know I can fail the drive with mdadm, but my understanding is that the data on this this drive can't then be used again. Is that correct or can the bad upgrade disk be failed and then the old disk un-failed?
You can't force a rebuild against the disk that has the updates you want? What does the error say when you try to do a force rebuild?

-twantrd
 
Old 06-22-2009, 02:47 AM   #4
newbuyer17
Member
 
Registered: Sep 2006
Posts: 38

Original Poster
Rep: Reputation: 15
Thanks Guys. I honestly have googled it but unfortunately the words split and break all have different meanings so bring up lots of articles such as 'disk breaks' and 'split into 3 disks'
I wasn't even sure this was possible, hence my question.
I was also hoping someone on here would do it reguilarly and be fully versed with how to do so.
Now that I know it is possible I will keep googling, and playing about.

I haven't tried forcing a rebuild against the good disk yet. I'm very new to all this so please bear with me.

So I have a good backup which I have 'failed' manually. This actually stays intact then does it?

What would the next step be - fail the other disk? Drop the array completely? Then how do I create a new array using the old disk without creating it as a fresh blank array?

Thanks again. As I said I'm new to this and still trying to work out exactly how it all works so any pointers you can give me would be greatly appreciated.

Last edited by newbuyer17; 06-22-2009 at 02:49 AM.
 
Old 12-08-2009, 04:32 AM   #5
naxo79
LQ Newbie
 
Registered: Dec 2009
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by newbuyer17 View Post
So I have a good backup which I have 'failed' manually. This actually stays intact then does it?

What would the next step be - fail the other disk? Drop the array completely? Then how do I create a new array using the old disk without creating it as a fresh blank array?

Thanks again. As I said I'm new to this and still trying to work out exactly how it all works so any pointers you can give me would be greatly appreciated.
Hi,

Did u find out how to do this?

I am facing the same situation. Need to distupgrade from debian sarge a software raid 1 system.

Situation: Raid 1, mirrored system running on 2 identical disks.
Steps: (as I have figured)
-I power down
-I unplug one disk
-I power up
-I do the dist-upgrade
-I power down
-I insert previously unplugged disk

Now comes the problem:
-If the upgrade was successful I obviously want the upgraded disk to be synced to the previously unplugged disk

-On the other hand if the upgrade failed I want the unplugged disk to be synced to the upgraded disk.

How does the software raid determine which disks data to use in the array and which disk to sync to which? Especially if both have working copies of the data but different versions.

Thankful for any help.

Last edited by naxo79; 12-08-2009 at 04:34 AM.
 
Old 12-08-2009, 05:29 AM   #6
naxo79
LQ Newbie
 
Registered: Dec 2009
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by naxo79 View Post
Hi,

Did u find out how to do this?

I am facing the same situation. Need to distupgrade from debian sarge a software raid 1 system.

Situation: Raid 1, mirrored system running on 2 identical disks.
Steps: (as I have figured)
-I power down
-I unplug one disk
-I power up
-I do the dist-upgrade
-I power down
-I insert previously unplugged disk

Now comes the problem:
-If the upgrade was successful I obviously want the upgraded disk to be synced to the previously unplugged disk

-On the other hand if the upgrade failed I want the unplugged disk to be synced to the upgraded disk.

How does the software raid determine which disks data to use in the array and which disk to sync to which? Especially if both have working copies of the data but different versions.

Thankful for any help.
Probably figured it out.
Seems like I have to wipe the partition table of the drive I dont want to be used?
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with software mirror (Raid) setup in startup drummer54 Linux - Newbie 2 03-24-2009 11:46 PM
Creating software mirror raid during installation hq4ever Fedora 1 02-21-2006 09:09 AM
Recovering Software RAID Mirror rootking Linux - Software 1 11-01-2004 07:32 PM
Split mirror for Hardware Raid Perc3/Di redhat_zephyr Red Hat 0 01-15-2004 12:51 AM
software raid/mirror in MDK 9.1? basicaccess Mandriva 2 09-19-2003 04:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:31 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