Hard Drive Reshuffle
Charles Steinkuehler
charles at steinkuehler.net
Fri Apr 18 12:16:04 CDT 2003
Gene Dascher wrote:
> I am running out of space on my /usr partition and want to expand that
> partition, if possible.
>
> Here is how the drive is laid out:
>
> hda1 700 MB Windows 98
> hda5 700 MB Windows NT
> hda6 1500 MB /usr
> hda7 100 MB /boot
> hda8 260 MB swap
> hda9 1500 MB /
> hda9 32000 MB /data
>
> I want to reconfigure the drive like so:
>
> hda1 500 MB /boot
> hda5 2000 MB /
> hda6 3000 MB /usr
> hda7 500 MB swap
> hda8 30000 MB /data
>
> I want to back up all of the data on the existing partitions. I was
> thinking about using the following command to save the data on another
> drive:
>
> dd if=/dev/hda6 of=usr.iso
>
> Is that a valid way to save the data on the drive? If so, do I get that
> data back onto the drive like so:
>
> dd if=usr.iso of=/dev/hda6
>
> Also, are there any tools (i.e. Ghost )that I can use to help make the
> process easier?
If you're migrating to a new disk, it's easy enough to do this with tar
(rather than dd), which will keep all your hardlinks in place (if you
use rsync, hardlinks are turned into new files, increasing disk usage).
As mentioned, dd will not work properly unless the partitions are
exactly the same geometry (ie no changing partition size while copying).
If you're trying to do this "in place" on the same drive, you'll
probably need something like partition magic. IIRC, recent versions can
resize ext2/3 partitions. It's not free (as in speach or beer), but
I've found it worth the money for the overall time and grief saved when
doing something like this.
There are some open-source utilities that do partition moving and
resizing as well, but I haven't used them.
--
Charles Steinkuehler
charles at steinkuehler.net
More information about the Kclug
mailing list