LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 02-10-2014, 06:14 AM   #1
WiseDraco
Member
 
Registered: Nov 2006
Location: Europe,Latvia,Riga
Distribution: slackware,slax, exMandriva
Posts: 379

Rep: Reputation: 30
raid1 disc backup?


Hello!
i slowly learn software RAID things, and now i get on the backup disc creation problem.
i have a raid 1 from two identical drives, and try to "clone" one of disc with thing, if i get that "cloned" ( backup version of my raid) disc on new computer, get one the same spare disc, then i can get up all my raid with all info on it.

as so i put third disc on machine with working raid1 from two discs ( slackware64 14.1 if that matter), as /dev/sdc ( raid discs is respectively, sda and sdb.)

i copy primary raid disc to spare disc with dd:
dd if=/dev/sda of=/dev/sdc bs=1M

when all copied, i shut down machine, remove both "old", raid discs ( sda and sdb) and put there that sdc where i copied data - as sda, and put there also one new identical empty disc as sdb, for restore a raid.
but there i encounter a problems - when i make first raid, i use --metadata=0.90 only for first raid partition - /md1 - which is bootable and root. md2 (swap) and md3 ( /second) maked without --metadata and thus it have ?superblock ver 1.2? not 0.9
when i start in new configuration, i get a many messages, and only my md1 partition \ raid start up and mount.
looks like it not right way to make raid backup
i suppose, better be a clone raid via grow source raid from 2 devices to 3, wait to synchronize all, and then someway shrink raid from 3 to 2 devices, and get new spare disc out?
maybe there is anyone with experience and knowledge in that field?
thanks in advice....

P.S. mostly i build entire RAID 1 based on this manual:
https://sites.google.com/site/pincza...at-4kb-sectors

except, as i say, i define --metadata=0.90 only for first partition raid, not for all.
 
Old 02-10-2014, 06:22 AM   #2
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 755

Rep: Reputation: 226Reputation: 226Reputation: 226
Did you happen to copy this while the RAID array was running?
 
Old 02-10-2014, 06:27 AM   #3
WiseDraco
Member
 
Registered: Nov 2006
Location: Europe,Latvia,Riga
Distribution: slackware,slax, exMandriva
Posts: 379

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by wildwizard View Post
Did you happen to copy this while the RAID array was running?
yes, sure. system i fully on soft raid 1 - i added extra hdd, and boot from my main system, and then do "dd"....
 
Old 02-10-2014, 06:48 AM   #4
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 755

Rep: Reputation: 226Reputation: 226Reputation: 226
ah then your going to get all sort of errors as parts of the disk get written too after you copied them.

You can only dd a disk that will not have any writes put to it, so it must not be mounted and raid must not be running.
 
Old 02-10-2014, 07:12 AM   #5
WiseDraco
Member
 
Registered: Nov 2006
Location: Europe,Latvia,Riga
Distribution: slackware,slax, exMandriva
Posts: 379

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by wildwizard View Post
ah then your going to get all sort of errors as parts of the disk get written too after you copied them.

You can only dd a disk that will not have any writes put to it, so it must not be mounted and raid must not be running.
now i understand that, and want to know, what is correct cloning methods from running raid 1 - for example with grow and then shrink raid devices quantity \ amount?
 
Old 02-10-2014, 11:22 AM   #6
granth
Member
 
Registered: Jul 2004
Location: USA
Distribution: Slackware64
Posts: 210

Rep: Reputation: 39
When cloning an OS drive, you should do it when booted from a live-cd. You shouldn't mount the device; just dd it over to the new drive.
 
Old 02-10-2014, 11:59 AM   #7
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Lenny/Squeeze/Wheezy/Sid
Posts: 4,067

Rep: Reputation: 491Reputation: 491Reputation: 491Reputation: 491Reputation: 491
The way to backup your RAID is to use a backup utility and copy files on the file level.

If you insist on having a clone, take out one disk, and put in a new one. After resyncing it is identical to the disk you took out.

Often you want to make both disks in a RAID array bootable. You do so with the original disk in the array, you would do the same with the new disk you just inserted.
If the disk you took out was properly bootable, you can insert it in a new system, add yet another disk. It will resync.

Cloning disks to get a back-up is a bad idea in most situations. Cloning is not backing-up.

jlinkels
 
  


Reply

Tags
backup, clone, mdamd, software raid 1


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
How to backup entire system to a disc cygpen Linux - Newbie 47 09-01-2011 01:00 PM
Backup Server (with RAID1) - Fedora 14 macdudeosx Linux - Server 1 03-06-2011 04:30 PM
Backup/restore system on RAID1 causes raid device to disappear deh6 Linux - Newbie 3 05-06-2008 03:10 PM
Help with RAID1 based backup strategy hgs Linux - Enterprise 4 01-25-2006 03:11 PM
Best disc mirroring backup program? mrmunson Linux - Software 1 12-04-2004 09:33 AM


All times are GMT -5. The time now is 11:34 AM.

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