Diskspace issue on RedHat 7.3

Hi All,

We have a RedHat 7.3 server with an 18 GB hardrive.

We have run out of disk space and have to either add an additional drive or clone the drive on to a larger harddrive.

I would prefer the latter, as the former may force us to add a 3rd (or even 4th) harddrive over the next year or so and there is only space for 1 more drive.

--Therefore, my question: Is there a clone script / procedure specifically for RH 7.3?--

We need to stay with 7.3 due to legacy issues.

Thank you
Jo
LVL 1
m0nk3yzaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

martinCommented:

The simplest method of copying a whole partition is to use tar: this can copy device files, links etc. and can be told to stay in one partition (file system).

Set up the partitions you want on the new drive and mount them. For example, create a partition that will be the new root partition and mount it on /root2. Then to copy the existing root partition on the old drive to /root2 on the new drive do this:

cd /; tar cpf - --one-file-system . | ( cd /root2 ; tar xpBf - )

Do the same for any other partitions, eg:

cd /home; tar cpf - --one-file-system . | ( cd /home2 ; tar xpBf - )

To be totally safe, you are supposed to unmount a partition before you copy it. You can do this by booting from a "live" CD such as MandrakeMove or Ubuntu, but I have never had problems backing up a mounted root partition.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
xDamoxCommented:
Hi,

Why not try the folloiwng:

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

The above example copys the hda which is Harddrive one over to hdb Harddrive two.
0
martinCommented:
> dd if=/dev/hda of=/dev/hdb

This is OK for two drives that are the same size, and for which you want the same partitions. I am assuming that the questioner wants to set up the new drive with *larger* partitions :-)
0
ZentooCommented:
I guess there is already an answer here

http://www.experts-exchange.com/Operating_Systems/Linux/Linux_Administration/Q_21284198.html

Hope this is what you are looking for

Regards
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.