Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linux Hard Drive upgrade

Status
Not open for further replies.

RottPaws

Programmer
Mar 1, 2002
478
US
We are running Red Hat 9 server and we would like to install a larger hard drive. The computer only has space for a single HD, so simply adding a 2nd drive is not an option.

Is there a relatively simple way to image the existing drive and copy it to the new drive to get it back up with minimal downtime?

I've searched, but have not been able to find any good instructions for doing this.

_________
Rott Paws

...It's not a bug. It's an undocumented feature!!!
 
Does the PC have a CDROM that can be temporarily removed while you change the harddrive

--------------------
Life is a mind game
Wanna Play?
 
Yes, there is DVD-ROM drive. But I don't think it's got a burner.

_________
Rott Paws

...It's not a bug. It's an undocumented feature!!!
 
But what im saying is that you can temporarily remove the DVD-ROM so that you can add the larger HDD onto the cable that is meant for the DVD-Rom so that your can move to the larger drive.

--------------------
Life is a mind game
Wanna Play?
 
That's what I understood from your question. I was just adding that there is no burner to avoid that question came up later . . .

_________
Rott Paws

...It's not a bug. It's an undocumented feature!!!
 
Oh ok...sorry

--------------------
Life is a mind game
Wanna Play?
 
Thanks a bunch! We'll give it a shot.

_________
Rott Paws

...It's not a bug. It's an undocumented feature!!!
 
If you're using grub, like a sane person, do this:

1) install new drive, partition and create your filesystems (I'll use hdb1 = /boot, hdb2 = swap and hdb3 = / as the example)

2) mount hdb3 under (for example) /mnt/new, copy everything from the old disk to the new (exclude mount points like /boot, /proc, /sys, etc., but create the directories). Then mount hdb1 into /mnt/new/boot and copy the contents of /boot over to it.

3) Here's the magic: mount your proc filesystem under /mnt/new/proc (mount -t proc none /mnt/new/proc) then chroot to the new drive directory (chroot /mnt/new /bin/bash) and "cp /proc/mounts /etc/mtab" so grub will know what's mounted.

4) Run "grub-install /dev/hdb". Your new drive should be bootable now. Replace the old one and try it out.
 
Thanks Eric.

_________
Rott Paws

...It's not a bug. It's an undocumented feature!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top