LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-04-2001, 06:48 AM   #1
toady
LQ Newbie
 
Registered: Nov 2000
Location: Mossel Bay, South Africa
Posts: 2

Rep: Reputation: 0
Question Duplicate / Mirror Linux Drive


Hi, I am running Linux 6, Kernel 2.2.5-15 (I586), I have now installed a second hard drive (Exactly the same). I am wanting to make a mirror image on the second hard drive(from this first drive) on a daily basis for backup. What would be my best & easiset approach to solve this? The second drive must be able to be set to a primary master for booting if required. - Toady
 
Old 07-04-2001, 07:21 AM   #2
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
If they're identical you can use dd to do this, either on a disk or partition level... something like
Code:
dd if=/dev/hda of=/dev/hdb bs=1k count=sizeOfHDD
or perhaps per partition
Code:
dd if=/dev/hda1 of=/dev/hdb1 bs=1k count=sizeOfPartition
but I'd look into setting up software RAID-1 - this will mirror them for you, and mask failure of a single drive, although I don't know what the story is with having / on software raid.

HTH

Jamie...
 
Old 07-04-2001, 01:03 PM   #3
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
Software RAID on 2.2.x kernels require a patch. I never really got root raid to work nicely until 2.4.x

For a daily backup to that drive, I would just use the following (stolen from the "Root RAID How-To") commands. This stuff doesn't require RAID to run, it's just a handy tool for copying lots of stuff.

First you need to partition and format the new (empty) drive. Please make sure it's the right one! Then mount it to something like /mnt
Code:
cd /
find . -xdev | cpio -pm /mnt
You could use this in a script and mount/copy/unmount every day.
 
Old 07-04-2001, 02:15 PM   #4
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
Quote:
Originally posted by mcleodnine
Software RAID on 2.2.x kernels require a patch. I never really got root raid to work nicely until 2.4.x
Luckily I didn't need to try to RAID my root FS so I was OK on this one, do you know wether this was what the patches for 2.2 provided? I've had software RAID running fine on something like 2.2.14 (might have been a little higher, it was a while ago...).

cheers!

Jamie...
 
Old 07-04-2001, 03:03 PM   #5
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
IIRC the patches were necessary to get raidtools 0.91 to function. The mdutils were not able to use the fun stuff like the failed-disk directive. I don't remember if mdutils could mount a root raid fs <shrug>. I'm deleriously happy with the performance and management of RAID under 2.4.x so far. I've had reiserfs on RAID5 on my desktop box for the last three or four months and i'm impressed enough to migrate the servers to the same layout.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Drive Mirror Me jfinnican Linux - Hardware 5 06-14-2006 09:26 PM
Duplicate Hard drive 19 times? luminousnerd Linux - Software 1 08-13-2005 06:57 PM
Adding a second drive for mirror msaitta Linux - General 1 11-09-2004 04:55 PM
How to duplicate a Redhat Linux 9.0 Hard Drive garykuipers Red Hat 2 01-14-2004 05:44 PM
How to mirror a drive? _TK_ Linux - General 1 05-12-2003 05:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:13 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration