[CLUE-Tech] making use of unused disk space

Collins erichey2 at attbi.com
Sun Jul 21 20:50:00 MDT 2002


On Sun, 21 Jul 2002 18:26:44 -0600 "Timothy C. Klein"
<teece at silverklein.net> wrote:
> * Mark Cuny (clue at stardyne.org) wrote:
> > On Sun, 21 Jul 2002, Collins wrote:
> > 
> > > On Sun, 21 Jul 2002 19:58:56 +0000 Jason Friedman
> > > <jason at powerpull.net> wrote:
> > > > 
> > > > I want to allocate some of that to an existing partition.
> > > > How do I do that?
> > > 
> > > I gave you the method for creating a new partition.  I'm not
> > > aware of any way you can add on to an existing partition.
> > 
> > To re-allocate partitions without destroying data, you can use
> > either Partition Magic (approximately $50) or you can use GNU's
> > Parted program (free) at http://www.gnu.org/software/parted/
> > 
> > - Mark
> 
> Note: I have only used parted a couple of times, but with the
> partition layout you listed, expanding any but the last partition
> would be a serious pain in the but.  If your last partition is the
> swap partition, you might be stuck.  But again, I have only used
> parted a couple of times.
> 
> Check parted out first, at least.  It is free.

Assuming that parted will work, you could do the following:

1. use fdisk/cfdisk to allocate a new swap partition at the end of the
free space 
2. update your fstab and use the new swap partition. 
3. remove the old swap partition. 4. use parted to extend the last
remaining partition (hda10 in your list) to include some of the
existing free space.

Actually, since hda10 is temp space, you could temporarily map /tmp to
one of the other partitions, then remove hda10 and reallocate the
resulting free space without requiring parted.

You didn't mention which partition(s) you are intested in expanding,
nor have you explained why you need so many partitions.  Is this a
server or a desktop system?  The /var and /opt partitions appear to be
suspiciously large

For my personal use, I find /boot, /, /home, and swap partitions to be
quite adequate.  Actually, I don't even use a /boot partition any
more.  I have several / partitions (different distros) sharing the one
/home and swap.  Since my systems run about 2.2g used space in / with
full gnome, kde, open office, lots of browsers, etc., and since you
have something like 13g allocated to /usr /opt /var /tmp and /, you
must have oodles of free space wasted in this configuration.  Since
/usr is the bulk of a / filesystem, you must have lots of free space
in /.

In several steps, you could use the free space on your drive to move
various partitions temporarily to the end of the drive, then expand
the partitions that remain earlier on the drive.

Get yourself a sheet of paper.  Use df to determine the present used
space in each partition, then layout a series of moves to make space
available where you need it most.  You should be able to clean out
/tmp and let the / partion absorb that temporarily, unless your /
partion is totally full.

You may be able to do all the work with fdisk, or you may need a
combination of fdisk and parted work.  Whatever, several steps will be
required.

Sorry for the rambling; I just wanted to give you some ideas.

-- 
Collins Richey - Denver Area - WWTLRD?
gentoo(since 01/01/01) kernel 2.4.18+(ext3) xfce-sylpheed-skipstone



More information about the clue-tech mailing list