# Resizing partitions - safe and easy way?

## tactless

I have a pretty much ordinary 20GB IDE hard drive (Seagate Baracuda IV), partitioned into boot (ext3), swap, / (ext3) and /home (ext3). It seems that I've given too much space to /home (hda4), and too little to / (hda3). I want to transfer 2-3 GB... is there any reliable, relatively easy way to do this without data loss?

(I consider the Gentoo installation to be "relatively easy", don't go all-out looking for a pretty Qt GUI app that does this)

----------

## MathFreak

You may want to check out parted.  The homepage is http://www.gnu.org/software/parted and it's in portage.  Unfortunately, ext2/3 partitions have to start on the same place, so I don't know if this will work.

There's also Partition Magic which comes with bootdisks and can resize ext3 partitions.  That's not free however.  Also, the same restrictions as parted may apply (I'm not sure).

If you're in an emergency, try clearing out some files from /usr/portage/distfiles to give yourself some breathing room.

----------

## yngwin

First of all: make a backup of important data!

Parted is the way to go I think. If you go the way of a commercial program, don't even think about PM, get Acronis Partition Expert instead: it's much more reliable, and less expensive as well!

----------

## tactless

Since /home is the last partition on the drive, I guess I can tar up everything important and store it elsewhere, and then recreate it. Absolutely no way to move ext3 partitions?

Also: Is parted reliable and relatively easy?

----------

## PowerFactor

IMO parted is reliable, and not hard to use. Definately RTM first though.  Depending on how much stuff is in /home you might be able to shrink it enough to move it around.   IIRC you can move an ext3 partition with parted as long as the destinition doesn't overlap the source. IOW you cant just slide a 7gig partition over 2 gigs, you have to move it at least 7gig in either direction.

----------

## crimson

Are there any Linux programs besides parted that can resize ext3 partitions?  Unfortunately parted can't move the beginning of ext2/3 partitions so, I can't make my root filesystem any bigger since it's at the very end of the hard drive.  I do have partition magic, and regardless of what people say it is an excellent program and I"ve never had trouble with it, but I like to do things the Linux way even if it is a little harder and dangerous sometimes.

----------

## PowerFactor

 *crimson wrote:*   

> Are there any Linux programs besides parted that can resize ext3 partitions?  Unfortunately parted can't move the beginning of ext2/3 partitions so, I can't make my root filesystem any bigger since it's at the very end of the hard drive. 

 Well, the only way I know of is with fdisk + dd + resize2fs.  But I've never tried that combination to move the beginning of the partition so I don't know if that would work.  In theory I think it could. Anybody done that?

As far as other all in one partition resizers I think parted is pretty much it for linux.  I could very well be wrong about that though.

----------

## Calbar

take a look at qtparted !!! it's a qt-based app that use both ntfsprogs and parted --> resizing of NTFS.

qtparted.sourceforge.net

----------

