Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 04-04-2005, 09:15 AM   #1
Registered: Aug 2001
Location: Kingsport, TN
Distribution: RHEL & FC
Posts: 267

Rep: Reputation: 30
Hard Drive Migration

I don't know why this seems to be so difficult for me, but...

It's not an unusual event for a server to have a filesystem get "full". We've had marginal (at best) success at doing straight drive-to-drive copies. Just recently a server here got full and I decided to see if I couldn't resolve this and get it migrated to a bigger (pair of) drives. I've not succeeded so far...

Here's what I did. If someone could look over this and point out my fallacy I'd appreciate it!

Pair of 200GB SATA drives in a 1U using Linux software RAID1 mirroring.
Replacement paif of 300GB SATA drives.
Fedora Core3 x86_64 OS.

I shut it down, pulled out drive 2, put in a 300GB in it's place. Booted "linux rescue" on CD1 and chose to skip detecting the installed OS.

# fdisk /dev/sdb and created each partition one at a time with the exact layout of sda, but larger on all the filesystems except /boot which was fine as is. SWAP is the same size as well.

Set partition 1 (/boot) as active.

Set the partition type of all to the same as sda, fd=Linux raid autodetect for the most part.

# mkfs.ext3 /dev/sdb1 (2,3...)
# mkswap /dev/sdb5
# mkdir /tmp/new /tmp/old

Did this over and over until all partitions were copied.
# mount /dev/sda1 /tmp/old
# mount /dev/sdb1 /tmp/new
# cd /tmp/old
# find . -xdev | cpio -pvmd /tmp/new

Put the drive in the position 1 slot and tried booting. All I get is "GRUB" in the upper left corner of the screen and that's it.

So I boot up on CD1 with "linux rescue" and let it try to find my linux install partitions for which it fails.

I try multiple incantations of the dark art of grub and grub-install without any good results.

I've poured through postings on here, various usenet newsgroups, etc.. The instructions above I kind of developed from bits and pieces from other postings here and there. Hopefully it's at least close to being correct...

Thanks in advance!
Old 04-04-2005, 09:28 AM   #2
Registered: Aug 2001
Location: Kingsport, TN
Distribution: RHEL & FC
Posts: 267

Original Poster
Rep: Reputation: 30
Oh yeah, and after fdisking /dev/sdb I did this:

# dd if=/dev/sda of=/dev/sdb bs=446 count=1

To copy the boot sector but not the partition table...
Old 04-07-2005, 01:19 PM   #3
Registered: Aug 2001
Location: Kingsport, TN
Distribution: RHEL & FC
Posts: 267

Original Poster
Rep: Reputation: 30
Anyone? Isn't this possible? Drive size a problem? Thanks...


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing grub to external USB hard drive for later use as internal hard drive dhave Linux From Scratch 2 12-10-2005 08:48 AM
Hard Drive Migration-upgrading to new SCSI stunter Linux - Hardware 1 07-04-2005 10:02 PM
2 hard drive in system mirror 1st hard drive sburns76247 Linux - General 2 12-21-2004 01:47 AM
URGENT: Hard drive is dying, need migration AngryLlama Linux - General 12 11-27-2004 10:31 AM
Grub to access new hard drive and old multi os hard drive ? gedi1 Linux - Hardware 0 06-03-2004 12:01 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:36 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration