HDD Mirroring / Disc image

Place to discuss Fedora and/or Red Hat

HDD Mirroring / Disc image

Postby Membrax » Fri Jun 25, 2004 3:40 am

Hi folks,

my current configuration is :
hda (IDE PATA) boot drive --> FC2 installed, up & running
hdb (IDE PATA) backup drive --> hdd onwhich I usually backup my files

My next step will be installing a new drive (SATA this time) and actually this drive would be replacing my current boot drive (hda).


No wonder that I'd first like to clone my boot drive. :wink:


So here comes my cry for help :

- where can I find a clear step-by-step procedure to do so ?
- which software should I use ?
- how can I be sure that replacing my PATA drive by a new SATA drive (with hda cloned on it) will make it my boot drive ... and that it'll boot ?

...so many questions, so much stress, and so little time. :cry:


anyway, thanks in advance for help ! :D
Membrax
scripter
scripter
 
Posts: 99
Joined: Tue Oct 21, 2003 2:04 pm
Location: 50'48''N - 4'21''E

Postby Griffin518 » Fri Jun 25, 2004 5:45 am

http://willert.dk/geek/raid.html

I've got a dedicated linux server with 2 80GB drives, mirrored... it works great, however there are some limitations. The two most annoying are that the partitions to be mirrored need to be labled as "Linux Software Raid" (which requires reformating them, IE reinstall), and the fact that there can be only one active boot sector.

What the second problem means is that if the primary disk fails, you won't be able to boot off of the second disk. All it takes is a boot off of the linux disk into rescue mode, but still it's a pain. I would suggest that you mirror all of your configuration files, and important data, rather than the OS itself... since you'll need to basically resinstall if the disk dies anyways. Whatever, it's up to you how you lay it out. :)

Remember that partitions to be mirrored must have the same number of blocks... MD devices are fabulously easy to maintain, and nice and reliable.

-Grififn-
Griffin518
user
user
 
Posts: 38
Joined: Tue Apr 06, 2004 8:43 pm

Postby Membrax » Mon Jun 28, 2004 3:49 am

Well, actually this is not exactly what I asked.

To be clearer, I'd add that my current config :

hda (IDE PATA) boot drive --> FC2 installed, up & running
hdb (IDE PATA) backup drive --> hdd onwhich I usually backup my files


has to be fully replaced by one drive only : a brand new SATA drive.

In that purpose I'd for sure like to grab the current data from hda (which is a PATA IDE and my Master Boot but you know that already).

So, without using RAID stuff, I'd just like to mirror my drive thanks to some software like driveimage for Windblow$ or so.

After doing that I'll put the new SATA drive as Master Boot and this one would then replace all my previous stuff.

Any clue regarding the software I should use to accomplish that task safely ... and easily ?
Membrax
scripter
scripter
 
Posts: 99
Joined: Tue Oct 21, 2003 2:04 pm
Location: 50'48''N - 4'21''E

Postby Void Main » Mon Jun 28, 2004 5:54 am

When I swap out drives I usually stick the new one in as a second drive and then boot from an alternate media (rescue disk or Knoppix). Then I create my partition table on the new drive so that the partitions are at least slightly bigger than the partitions on the original drive. Then I use "dd" to copy the file systems over. With "dd" everything will stay exactly as it was on the original because it copies block by block (a lower level copy than "cp"). Say your root file system is on /dev/hda1. You want to put it on the first partition on the second drive (which might show up as /dev/hdb1 currently). An example might be:

# dd if=/dev/hda1 of=/dev/hdb1

When you remove the original drive and set the new drive up as the primary master the partition numbers will change from hdbx to hdax so you shouldn't even have to change anything in your fstab. You'll just have to reinstall your boot loader (GRUB). This can also be done from your rescue disk.

Also, not that you need to here, there is a way to set labels without formatting if you are running ext2 or ext3. The "tune2fs" utility can change labels.
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA

Postby Membrax » Mon Jun 28, 2004 11:31 am

Void Main, once again, you're the man !

I really expected some explanation like that one.
You really saved my life !

Many thanks !
Membrax
scripter
scripter
 
Posts: 99
Joined: Tue Oct 21, 2003 2:04 pm
Location: 50'48''N - 4'21''E


Return to Fedora/Red Hat

Who is online

Users browsing this forum: No registered users and 0 guests

cron