Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#115645 - 09/09/2002 18:34 cloning a ext2 hard drive to a bigger drive?
elinenbe
new poster

Registered: 03/02/2002
Posts: 31
Loc: New York, NY
I have to update a Beowulf cluster in a week and I know I can rely on this group for some help. I have a 10 node cluster that has 20 gigabyte hard drives and I will be updating it to 2x120 gigabyte hard drives in a RAID. The 20 gigabyte hard drives have these partitions on it:

/ 2500 Megs Linux Native
/usr 7500 Megs Linux Native
/usr/local 9000 Megs Linux Native
Linux Swap 384 Megs (no mount point)

what I would like to do is clone this hard drive to the larger hard drive (it will look like a 120 gigabyte hard drive as the RAID is hardware RAID and the controller takes over all the RAID stuff.)

I would like to dynamically adjust the size of the partitions so the new hard drive is completly full. Something like:

/ 12500 Megs Linux Native
/usr 52000 Megs Linux Native
/usr/local 45000 Megs Linux Native
Linux Swap 2250 Megs (no mount point) (I am also installing much more RAM in each node 2 Gigs per node)

I need to keep the permissions and the owners of each file so something like cp will not work (it does not keep owners), and I have to do this 10 times so I think something like tar (which does keep owners) will be out of the question. What I would really like to do is something like what partition magic under windows does.

The smaller drives are going to be removed, so the new drives will need to be bootable. You guys have alot of experience cloning smaller drives to larger drives, etc. so that is why I am looking here.

All help is appreciated.

Thanks,
Eric

Top
#115646 - 09/09/2002 19:36 Re: cloning a ext2 hard drive to a bigger drive? [Re: elinenbe]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
There's some deep magic that might allow you to copy the raw data of the filesystem and then expand it, but I can't see what possible benefit it would have to offset its likely flakiness.

No matter what you do, you're going to have to copy massive amounts of data, so it's going to take a long time, no matter what manner you choose. I'd use tar, since it's a Linux system. Make sure to use the right options to keep owners and permissions and whatnot. You might want to grab a copy of star; it's likely to be faster than gtar. If it was another Unix, I'd definitely use dump and restore, but those are a little flaky on ext2.

This, of course, assumes that I understand your question properly and that this is going to be a brand new filesystem, and not that you're trying to add more drives to an already existing RAID solution. That's a different story.
_________________________
Bitt Faulk

Top