LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   raid1 disc backup? (http://www.linuxquestions.org/questions/slackware-14/raid1-disc-backup-4175494414/)

WiseDraco 02-10-2014 06:14 AM

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.

wildwizard 02-10-2014 06:22 AM

Did you happen to copy this while the RAID array was running?

WiseDraco 02-10-2014 06:27 AM

Quote:

Originally Posted by wildwizard (Post 5114896)
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"....

wildwizard 02-10-2014 06:48 AM

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.

WiseDraco 02-10-2014 07:12 AM

Quote:

Originally Posted by wildwizard (Post 5114907)
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?

granth 02-10-2014 11:22 AM

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.

jlinkels 02-10-2014 11:59 AM

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


All times are GMT -5. The time now is 09:59 PM.