Hard Disk upgrade

Robert Brockway rbrockway-wgAaPJgzrDxH4x6Dk/4f9A at public.gmane.org
Sat Feb 19 19:25:14 UTC 2005


On Sat, 19 Feb 2005, Jeremy Baker wrote:

> What is the easiest way to upgrade the hard disk in a linux system to a larger
> one?  If it makes a difference, it is running fedora core 2.  I was thinking
> of using dd if=/dev/hda of=/dev/hdc, but I didn't think it would work because
> hda is 6 GB, and hdc is 15 GB.  I also thought of partitioning hdc ahead of
> time, and dd'ing each partition separately.  What about the mbr in this case?

Hi Jeremy.  dd is a bad idea for a couple of reasons.  It grabs the 
filesystem, not the files so you'd end up with a 6GB filesystem on a 15GB 
disk (which you could possibly grow but this would be additional work). 
If you are using the xfs filesystem then SGI strongly recommend the use of 
xfsdump/xfsrestore, otherwise tar is good.  There are actually a bunch of 
tools that will do this.

If you do use tar I highly recommend you use the -X switch, eg:

tar -X ./tar.exclude filesystem.tar /

Where tar.exclude contains directories like:

/cdrom
/floppy
/mnt
/proc
/tmp
/var/tmp

You'd need to adapt this to your own system.  This will prevent tar from 
grabbing mounted cdroms, etc.

Also, it is best to do the transfer in single user mode.

Rob

-- 
Robert Brockway B.Sc.
Senior Technical Consultant, OpenTrend Solutions Ltd.
Phone: 416-669-3073 Email: rbrockway-wgAaPJgzrDxH4x6Dk/4f9A at public.gmane.org http://www.opentrend.net
OpenTrend Solutions: Reliable, secure solutions to real world problems.
Contributing Member of Software in the Public Interest (http://www.spi-inc.org)
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list