Diskspace issue on RedHat 7.3

Posted on 2006-04-10
Last Modified: 2010-04-20
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
Question by:m0nk3yza
    LVL 3

    Accepted 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.
    LVL 16

    Expert Comment


    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.
    LVL 3

    Expert Comment

    > 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 :-)
    LVL 1

    Expert Comment

    I guess there is already an answer here

    Hope this is what you are looking for


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Suggested Solutions

    rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
    SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    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.

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now