Skip to main content

Offsite Backup Solution - RAID with LVM for GNU/Linux server

Background



Hello, I am setting up a Ubuntu GNU/Linux server which will combine:
1) Software RAID1 (using mdadm) - To provide data protection against hardware failure
2) Logical Volume Manager (LVM) - Allowing flexibilty in organising my data and the ability to easily add more capacity in the future.




So far I have successfully:
1) Set up RAID1 using mdadm and created /dev/md0
2) Set up LVM making /dev/md0 a Physical Volume attached to a Volume Group called: vg_data. I have a Logical Volume called: lv_shared mounted on /home/shared :



NAME        FSTYPE LABEL UUID                                 MOUNTPOINT
sda
└─sda1 ext4 0xxxxxxx-2xxx-4xxx-8xxx-1xxxxxxxxxxx /
sdb
└─sdb1 linux_raid_member ubuntu:0 02342342-2333-4444-8888-111111111111
└─md0 LVM2_member 57e241ad-aee3-4486-8eaa-222222222222
└─vg_data-lv_shared ext4 048b529c-2e39-4f49-83c9-333333333333 /home/shared

sdc
└─sdc1 linux_raid_member ubuntu:0 02342342-2333-4444-8888-111111111111
└─md0 LVM2_member 57e241ad-aee3-4486-8eaa-222222222222
└─vg_data-lv_shared ext4 048b529c-2e39-4f49-83c9-333333333333 /home/shared


My Question



This is fine if there is a hardware failure on one of the data disks, but how do I go about creating an offsite backup
of the above setup?
The backup must be able to restore the entire system completely if something went wrong using just the offsite backup.




After reading up lots on the subject I found the following options but as I am completely new to this and want to ask and see what the community would recommend from their experience.
1) LVM snapshots
2) Duplicate one of the RAID drives. EG: (where sdd is my offsite backup physical disk.)



dd if=/dev/sdb of=/dev/sdd bs=64K conv=noerror,sync status=progress


What would the recovery process look like for the above backup methods?



I am really stuck on this and any pointers/links to relevent articles/suggestions would be really appreciated as I've spent a lot of time trying to figure out what to do, and my comfort zone is nowhere to be seen.




Thank you for reading my question and I hope it makes some sense to someone!



Update 1:
If I were to use rsync wouldn't I loose the Logical Volume Management scheme. A new problem also arises if you imagine that I expand the above setup to contain 3 pairs of RAID1. I then add those to expand total capacity of the logical volume. I would need to rsync the logical volume mount point (to copy all data) which would then contain 3 hard drives worth of data. This would need to be copied to span over multiple offsite drives (as I don't have a single drive that has the capacity of all 3 drives.) Is this possible using rsync. The more I think of this problem the only solution I can think of is making a backup server with the same configuration located offsite?

Comments

Popular posts from this blog

linux - iDRAC6 Virtual Media native library cannot be loaded

When attempting to mount Virtual Media on a iDRAC6 IP KVM session I get the following error: I'm using Ubuntu 9.04 and: $ javaws -version Java(TM) Web Start 1.6.0_16 $ uname -a Linux aud22419-linux 2.6.28-15-generic #51-Ubuntu SMP Mon Aug 31 13:39:06 UTC 2009 x86_64 GNU/Linux $ firefox -version Mozilla Firefox 3.0.14, Copyright (c) 1998 - 2009 mozilla.org On Windows + IE it (unsurprisingly) works. I've just gotten off the phone with the Dell tech support and I was told it is known to work on Linux + Firefox, albeit Ubuntu is not supported (by Dell, that is). Has anyone out there managed to mount virtual media in the same scenario?

hp proliant - Smart Array P822 with HBA Mode?

We get an HP DL360 G8 with an Smart Array P822 controller. On that controller will come a HP StorageWorks D2700 . Does anybody know, that it is possible to run the Smart Array P822 in HBA mode? I found only information about the P410i, who can run HBA. If this is not supported, what you think about the LSI 9207-8e controller? Will this fit good in that setup? The Hardware we get is used but all original from HP. The StorageWorks has 25 x 900 GB SAS 10K disks. Because the disks are not new I would like to use only 22 for raid6, and the rest for spare (I need to see if the disk count is optimal or not for zfs). It would be nice if I'm not stick to SAS in future. As OS I would like to install debian stretch with zfs 0.71 as file system and software raid. I have see that hp has an page for debian to. I would like to use hba mode because it is recommend, that zfs know at most as possible about the disk, and I'm independent from the raid controller. For us zfs have many benefits,

apache 2.2 - Server Potentially Compromised -- c99madshell

So, low and behold, a legacy site we've been hosting for a client had a version of FCKEditor that allowed someone to upload the dreaded c99madshell exploit onto our web host. I'm not a big security buff -- frankly I'm just a dev currently responsible for S/A duties due to a loss of personnel. Accordingly, I'd love any help you server-faulters could provide in assessing the damage from the exploit. To give you a bit of information: The file was uploaded into a directory within the webroot, "/_img/fck_uploads/File/". The Apache user and group are restricted such that they can't log in and don't have permissions outside of the directory from which we serve sites. All the files had 770 permissions (user rwx, group rwx, other none) -- something I wanted to fix but was told to hold off on as it wasn't "high priority" (hopefully this changes that). So it seems the hackers could've easily executed the script. Now I wasn't able