LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Enterprise (https://www.linuxquestions.org/questions/linux-enterprise-47/)
-   -   Help with RAID1 based backup strategy (https://www.linuxquestions.org/questions/linux-enterprise-47/help-with-raid1-based-backup-strategy-402225/)

hgs 01-11-2006 06:22 PM

Help with RAID1 based backup strategy
 
Hello all,

We are trying to set up a pair of web servers with identical hardware and configuration. We want to keep the servers synchronised where possible by swapping disks between each machine's RAID1 array of SATA drives (the four drives are identical).

We would like the disk /dev/hdk to always receive it's data from /dev/hde.

I know it's not really what RAID is for, but it could potentially save us hours of downtime.

The machines are configured and bootable from the array, the only problem that I wish to avoid are the few times when /dev/hdk is newer than /dev/hde.

I've modified the initrd to include mdadm so I can use it during init, but I've not been able to force /dev/hde to have priority. I want to force this so I can later hotadd the partitions on /dev/hdk to sync the disks. Is there a better approach?

I've tried using mdadm --zero-superblock on each of /dev/hdk's partitions before the arrays are started, but one of the partitions is still started using /dev/hdk2 instead of /dev/hde2. There is some output before the ramdisk is used. It's prefixed with "md:". Is the kernel starting the arrays first?

I've also tried using mdadm --assemble --force /dev/mdX /dev/hdeX missing --run in the linuxrc file in the ramdisk to force the arrays to start degraded so I can hotadd the /dev/hdkX partitions in later.

This probably isn't the best way to go about it, and I'd be keen to hear any other ideas that could help. The approach doesn't really matter, it's just that /dev/hdk must obtain its data from /dev/hde when the disks are synchronised and not the other way around.

Thanks in advance

trickykid 01-12-2006 05:46 AM

rsync would do the job but I wouldn't recommend depending on a backup strategy like this. If this data and server is really important, you should really think about implementing another backup strategy that doesn't deal with two servers basically mirroring each other but rather a tape backup and offsite type backup strategy, seems like overkill but it's the sure fire way of securing your data.

hgs 01-12-2006 01:23 PM

Thanks for the reply.

Sorry, I should have mentioned that this isn't the only backup. We also backup various bits of important data to tape.

The idea here is really that we can recover from a failure quickly, rather than having to unpack everything from the backup.

zerovice 01-24-2006 07:12 PM

You should look at Lifekeeper for Linux by steeleye and their Data Replication module. Basically, this system will mirror a software/net raid between any number of systems at any scheduled interval you choose as well as much more functionality that you'll find on their site....just something I use at work and works well, good luck!

msound 01-25-2006 03:11 PM

Quote:

We are trying to set up a pair of web servers with identical hardware and configuration. We want to keep the servers synchronised where possible by swapping disks between each machine's RAID1 array of SATA drives (the four drives are identical).
That's a lot like our setup here. Our primary server has a RAID 1 array. Our backup is a stripped down version. (only one hdd, less ram, and a slower processor).

I have an rsync script sync the websites 4 times a day and the MySQL databases are synced every hour. (MySQL information changes a lot more then actual web site content)

The backup server has a tape backup drive that does a full system backup each night. Our tapes are on a 7 day rotation.

If a hard drive dies we're fine,
If the primary server dies we're fine,
If the server gets hacked, and both servers are compromised
(problem could autmotically replice to mirror)
Then we can restore from tape.

Worst case scenario is we lose 1 day's worth of data. For some companies that's unacceptable, but our web server doesn't hold a lot of highly critical information.


All times are GMT -5. The time now is 12:06 AM.