• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 294
  • Last Modified:

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
  • 2
1 Solution

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.

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.
> 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 :-)
I guess there is already an answer here


Hope this is what you are looking for


Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now