[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How can I clone a hard drive with Centos 4 to a larger hard drive and utilize the "new" free space on the drive?

Posted on 2007-08-01
6
Medium Priority
?
1,259 Views
Last Modified: 2013-12-16
I have a Centos 4 web server with an 80 GB hard drive and I need to upgrade it to a new 320. What is the best way to clone the drive and make the remaing 240 GB available in the / partition. In Windows its as easy as using Symantec Ghost. I know that there is a project called Ghost for Linux, but it doesn't state the ability to "grow" the partition. Any suggestions?

Thanks,
Brian
brian@allstatecomputers.com
0
Comment
Question by:bacamaro
5 Comments
 
LVL 63

Assisted Solution

by:SysExpert
SysExpert earned 500 total points
ID: 19610931
1) I think that there are a number of partition editos etc for unix systems, Qparted etc that can grow a partition.

2) I would check Ghost just in case to see if it allows creating a larger partition, it may be version dependent.

3) in general, since Unix supports hard and soft file links, it should not be an issue as you can mount a new partition on an existing volume

I hope this helps !
0
 
LVL 7

Accepted Solution

by:
mzalfres earned 500 total points
ID: 19612423
Depending on your partition setup, you can use parted/qtparted/fdisk to make the same partition set on your new HDD, then copy data using dd. Example:

you have /dev/hda1 partition and want it to be copied to /dev/hdb1:

dd if=/dev/hda1 of=/dev/hdb1

while input partition can be mounted, the second one shouldn't.

It is maybe not the quickest way, but I think the safest way of copying whole partition/disk.
You can also do just:

dd if=/dev/hda of=/dev/hdb

to dump exactly everything from disk one to disk two, and then manipulate partitions with data on disk two. In case, something fails, you have still disk one.



0
 
LVL 15

Assisted Solution

by:veedar
veedar earned 500 total points
ID: 19613812
Do your ghosting and then resize. Bootitng is a boot floppy, the trial version should handle the resize for you.
http://www.terabyteunlimited.com/bootitng.html

Or get a  Linux boot CD like Knoppix and you can launch QtParted from there to resize.
http://www.knoppix.org/
0
 
LVL 15

Assisted Solution

by:m1tk4
m1tk4 earned 500 total points
ID: 19667027
Symantec Ghost is not Windows specific. You can copy and resize ext2/ext3 partitions with it as well.
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20246468
Forced accept.

Computer101
EE Admin
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
Often times it's very very easy to extend a volume on a Linux instance in AWS, but impossible to shrink it. I wanted to contribute to the experts-exchange community a way of providing a procedure that works on an AWS instance. It can also be used on…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month19 days, 4 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question