Networking Forums

Networking Forums > Computer Networking > Linux Networking > How to transfer RHEL5 system to a smaller hard drive?

Reply
Thread Tools Display Modes

How to transfer RHEL5 system to a smaller hard drive?

 
 
Rick O
Guest
Posts: n/a

 
      10-22-2008, 12:24 PM
I've got a Redhat Enterprise Linux 5 system that I installed, had a
contractor install some stuff, and then found out that I need to
transfer it to another, smaller hard drive.

I haven't done this in a few years, and the last time I did it I had
simple ext2fs partitions. I could just use fdisk to make a partition,
mkfs.ext2, cp -ax everything to the new drive (or if the new drive was
the same size/larger, I could just use dd), install lilo or grub, and
move on with life. Now I've got this complex LVM system and I don't
know where to begin. Worse, I can't seem to find a HowTo or anyone
else's question on forum/newsgroups.

How can I transfer my complete RHEL5 system to another (smaller) hard
drive?
 
Reply With Quote
 
 
 
 
Chris Davies
Guest
Posts: n/a

 
      10-22-2008, 01:25 PM
Rick O <(E-Mail Removed)> wrote:
> How can I transfer my complete RHEL5 system to another (smaller) hard
> drive?


Boot two systems with a network-aware LiveCD (or boot the old one with
the new disk also installed). Build the new disk in the right shape
(partitions, LVM, RAID, whatever) and mount them all. Use rsync to copy
the old filesystem tree to the new. Install lilo or grub (whatever).
Check /dev really carefully (udev). Reboot.

Chris
 
Reply With Quote
 
Burkhard Ott
Guest
Posts: n/a

 
      10-22-2008, 01:36 PM
Am Wed, 22 Oct 2008 05:24:07 -0700 schrieb Rick O:

> I've got a Redhat Enterprise Linux 5 system that I installed, had a
> contractor install some stuff, and then found out that I need to
> transfer it to another, smaller hard drive.
>
> I haven't done this in a few years, and the last time I did it I had
> simple ext2fs partitions. I could just use fdisk to make a partition,
> mkfs.ext2, cp -ax everything to the new drive (or if the new drive was
> the same size/larger, I could just use dd), install lilo or grub, and
> move on with life. Now I've got this complex LVM system and I don't
> know where to begin. Worse, I can't seem to find a HowTo or anyone
> else's question on forum/newsgroups.
>
> How can I transfer my complete RHEL5 system to another (smaller) hard
> drive?


tar the root directory and save this on the smaller (formated) disk, start
a live or rescue cd, extract the tarball mount /proc, /sys and the
extracted root directory, change via chroot into the 'old system' ans run
your bootloader. Leave chrooted environment unmount /proc /sys and you
system, reboot finish.
It'll be faster than dd.
 
Reply With Quote
 
Rick O
Guest
Posts: n/a

 
      10-22-2008, 02:19 PM
On Oct 22, 9:36*am, Burkhard Ott <n...@derith.de> wrote:
> tar the root directory and save this on the smaller (formated) disk, start
> a live or rescue cd, extract the tarball mount /proc, /sys and the


On Oct 22, 9:25*am, Chris Davies <chris-use...@roaima.co.uk> wrote:
> Boot two systems with a network-aware LiveCD (or boot the old one with


Thanks...I was thinking of something along those lines as I posted,
and you both gave me some good ideas. I think I've got a plan now.
 
Reply With Quote
 
Allen Kistler
Guest
Posts: n/a

 
      10-22-2008, 02:21 PM
Chris Davies wrote:
> Rick O <(E-Mail Removed)> wrote:
>> How can I transfer my complete RHEL5 system to another (smaller) hard
>> drive?

>
> Boot two systems with a network-aware LiveCD (or boot the old one with
> the new disk also installed). Build the new disk in the right shape
> (partitions, LVM, RAID, whatever) and mount them all. Use rsync to copy
> the old filesystem tree to the new. Install lilo or grub (whatever).
> Check /dev really carefully (udev). Reboot.


If you're using SELinux, I'm not so certain rsync will get it done. You
need to make sure that whatever you use to copy files keeps all the
extended attributes and SELinux labels.

LVM complicates things. Without LVM I'd say maybe resize the partition,
then copy it whole. As it is, I'd say pick a backup/recover utility you
can run from a CD/DVD. Or just build another server. At some point,
one of them will clearly be easier than the other.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
switching out hard drive rb Wireless Internet 7 10-08-2007 03:35 AM
USB Hard drive Wireless ? mal_k100 Wireless Internet 2 01-15-2007 12:19 PM
FS 10 GB9.55 mm Hard Drive ngcomp@ntlworld.com Home Networking 1 10-09-2005 05:49 PM
Backup to Transfer 100% Drive to New Drive Curtis Olson Windows Networking 0 07-30-2003 01:49 PM
Add hard drive Christopher Linux Networking 1 06-29-2003 10:37 PM



1 2 3 4 5 6 7 8 9 10 11