LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 12-12-2011, 06:54 AM   #1
slimjim
Member
 
Registered: Apr 2004
Location: east midlands, england
Distribution: Ubuntu 9.04
Posts: 56

Rep: Reputation: 15
Create Single Disk Image from 5 disk RAID 5 setup?


Hi,

I have been tasked with the job of creating a backup machine for a business-critical server. I'll only have a small window of opportunity to do this, over the holidays - the box is usually running 24/7.

My first idea was to boot a live CD with ddrescue, then clone the disk to an image on a USB drive, bring the drive back to the office and prepare a backup machine from that.

Unfortunately on closer examination it turns out that the server has five hard drives, arranged in a RAID5 configuration:

Code:
[root@sonic ~]# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4] 
md0 : active raid5 sde1[4] sdd1[3] sdc1[2] sdb1[1] sda2[0]
      141820928 blocks level 5, 256k chunk, algorithm 2 [5/5] [UUUUU]
      
unused devices: <none>
[root@sonic ~]# cat /etc/fstab
/dev/VolGroup00/LogVol00 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0
[root@sonic ~]#
So here's my revised idea. I won't be able to test this unfortunately - I can't bring the server down, and I don't have another box with a RAID5 config to play with.

My idea is to bring the server up using a live CD with mdadm and ddrescue on, then do

Code:
mdadm --assemble --scan
.. I'm hoping that this will assemble the array (as md0, presumably) so that I can then take an image of /dev/md0 to a file on a USB drive (I'll use ddrescue).

Back at base, I can transfer the image to the root disk of the backup machine, tinker with its fstab using a live CD so that it's not expecting a metadevice, and I think I should have a working copy of the server, ready to boot up in case of disaster.

Anyone tried something similar? Can anyone see a flaw in this plan? As I say, I can't test it at the moment and I've never tried it before, so I'm grateful for any comments.

Cheers
James

Last edited by slimjim; 12-12-2011 at 10:17 AM.
 
Old 12-12-2011, 11:08 AM   #2
_bsd
Member
 
Registered: Jan 2010
Location: Velveeta, USA
Distribution: Xen, Gentoo,Ubuntu,openSUSE,Debian,pfSense
Posts: 98

Rep: Reputation: 8
Since you seem to have most of your system on / as a logical volume, have you looked into logical volume snapshots?
/boot can easily be backed up a dozen different ways.
 
Old 12-13-2011, 03:35 AM   #3
slimjim
Member
 
Registered: Apr 2004
Location: east midlands, england
Distribution: Ubuntu 9.04
Posts: 56

Original Poster
Rep: Reputation: 15
Thanks for the reply - is it possible to take a logical volume snapshot to an external drive, then create a partition on a single drive from it?
 
Old 12-13-2011, 05:34 AM   #4
_bsd
Member
 
Registered: Jan 2010
Location: Velveeta, USA
Distribution: Xen, Gentoo,Ubuntu,openSUSE,Debian,pfSense
Posts: 98

Rep: Reputation: 8
If size permits, yes.
When the logical volume snapshot was originally developed snapshots were written to tape devices.
Just pay close attention to sizes, the snapshot only has to be as big as the data actually being used.
Use the man pages and read up on any LVM command before using it.

I always suggest going through a trial, make a temp VG, LV, copy some small collection of files, take a snap shot, restore.
After you're comfortable with the process, and achieved success in practice, go ahead and perform the same with production data.
Don't practice with production data.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora 11 RAID 1, Disk failure - How to boot from the single working disk NothingSpecial Linux - Hardware 2 10-18-2009 06:20 PM
Better use of single RAID 0 disk? watcher69b Linux - Server 3 11-01-2008 06:16 PM
RAID like implementation on a single disk Tahir Saleh Linux - Newbie 7 11-06-2007 06:44 AM
Create a RAID-1 of the boot disk and a new disk Oskare100 Linux - Server 3 09-21-2007 07:45 PM
mouting a single disk of a RAID jdt Linux - General 1 12-22-2003 01:16 PM


All times are GMT -5. The time now is 01:52 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