LinuxQuestions.org
Review your favorite Linux distribution.
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 04-06-2008, 06:09 PM   #1
deh6
LQ Newbie
 
Registered: Aug 2004
Posts: 18

Rep: Reputation: 0
Backup/restore system on RAID1 causes raid device to disappear


I want to backup the whole system (Suse 10.3) running on RAID1 and restore it. When I restore and try to boot /dev/md0 is no longer present.

I started with a clean install of Suse 10.3 to /dev/md0 (RAID1) on sdb3 and sdc3. Works fine.

The backup sequence is--
1. Boot up on Suse installed in another partition (sdb2)
2. Try to mount /dev/md0 and discover md0 doesn't exist.
3. Go Yast and set RAID partitions to md0 (and do not format)
4. /dev/md0 mounts.
5. Copy system on md0 to the external drive.

Test the restore--
1. Boot up Suse sdb2
2. 'rm' everything on /dev/md0
3. Copy backup from the external drive to md0.
Looks fine.
3. Reboot and select the Suse with raid
Boot fails.
mdadm: no devices found for /dev/md0

Further experiments--
With Suse 10.3 installed on sdc2, as well as sdb2, when I boot up the "other" installation, /dev/md0 is not present. Creating it on Yast with no formatting, brings it back (with all the data intact). Reboot the other Suse and /dev/md0 is not present.

It appears that something in the RAID1 partitions is set that identifies the specific system it was setup under. If so, then how can one backup a system installed on RAID1, then restore it so that it will run with RAID1?
 
Old 05-05-2008, 10:47 AM   #2
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware 14.1 (multilib) with kernel 3.15.5
Posts: 1,550
Blog Entries: 12

Rep: Reputation: 177Reputation: 177
Some thoughts:

I don't know if you are still working on this, and I have only limited experience myself, but I guess the relevant questions I would be asking are:
(1) How did you backup/copy the files (rsync?,cp?, init level 1?)?
(2) what does mdadm.conf say about the file system (has it changed UUID?)
(3) how are you booting and starting the system and mdadm (grub?, lilo?, autodetect?, initrd? etc.)

Another strategy would be to add the external backup drive to your RAID1, let it sync, then remove it from the RAID (for backup). Restore would be booting the system, starting the raid with only the external drive and adding the blanked out originals and letting them sync.
 
Old 05-05-2008, 01:34 PM   #3
deh6
LQ Newbie
 
Registered: Aug 2004
Posts: 18

Original Poster
Rep: Reputation: 0
Thanks for the ideas.

I've forgotten the details, but I did something that made it more tractable, in that I can run run Linux in a different drive/partition and access /dev/md0 (which requires)--

mdadm --create --level-raid1 --raid-drives=2 --spare-drives=0 /dev/sdb3 /dev/sdc3

which then sees that these partitions already part of a raid1 array and asks for y/n to proceed. Proceeding it then (re)creates the raid1 and /dev/md0 is then available (and it can then be copied, or tar'ed, to an external drive for backup).

When I reboot, and select the "main" Linux that was installed with /dev/md0 it now locates the md0 without intervention (and I forgot what had to do to make this happen...seems like I something was missing that I had to add...).

Even more recent--I've found that save/restore of the whole system works if tar, with an exclude file that eliminates things such as /dev and /proc, is used.

Quote:
what does mdadm.conf say about the file system (has it changed UUID?)
As far as the raid1 "knowing" the Linux system--I haven't looked at the UUID in the mdadm.conf file. When I get a chance I'll take a look at that.

Last edited by deh6; 05-05-2008 at 01:37 PM.
 
Old 05-06-2008, 03:10 PM   #4
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware 14.1 (multilib) with kernel 3.15.5
Posts: 1,550
Blog Entries: 12

Rep: Reputation: 177Reputation: 177
Well, I figured you had it fixed by now. Congrats
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Backup and restore system.... tar.gz? lebabyg Linux - General 10 09-28-2007 09:16 AM
Backup and Restore a LAMP system? cucolin@ Linux - General 2 02-24-2007 07:29 AM
using raid1 with mdadm to "restore" system to previous state predder Linux - Enterprise 0 08-08-2006 07:57 PM
Backup/Restore - LVM, RAID keith ralph Linux - General 0 04-19-2006 08:31 AM
Linux Raid system backup and restore ron4linux Red Hat 1 08-29-2003 12:57 PM


All times are GMT -5. The time now is 06:22 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration