Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[gentoo-user] Resizing ext3 Partition

106 views
Skip to first unread message

Marco

unread,
May 4, 2009, 9:00:15 AM5/4/09
to
Hi all,

I am new to gentoo and so far I really like it. But now, I am running
out of disk space on my root partition (10 GB), although I have a
rather small system with fluxbox (no KDE, GNOME,...). Thought gentoo
would not waste my resources that much. Now I am thinking about how to
resize my ext3 partitions. Bellow is the output of fdisk:

fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xbbc58b91

Device Boot Start End Blocks Id System
/dev/sda1 1 893 7168000 1c Hidden W95 FAT32 (LBA)
Partition 1 does not end on cylinder boundary.
/dev/sda2 * 893 5968 40765440 7 HPFS/NTFS
/dev/sda3 10622 19458 70975488 f W95 Ext'd (LBA)
/dev/sda5 10622 13575 23719972 7 HPFS/NTFS
/dev/sda6 13575 13581 54819 83 Linux
/dev/sda7 13582 13831 2008093+ 82 Linux swap / Solaris
/dev/sda8 13832 15077 10008463+ 83 Linux
/dev/sda9 15078 19458 35182990 83 Linux

sda8 is my root partition and sda9 is my home partition where there is
plenty of space. Is there any safe way to resize with Linux tools? The
descriptions found on google did not help me a lot...

Thanks for your help!

--
Regards,
Marco

Andrew MacKenzie

unread,
May 4, 2009, 9:50:15 AM5/4/09
to
+++ Marco [gentoo-user] [Mon, May 04, 2009 at 12:56:05PM +0000]:

> I am new to gentoo and so far I really like it. But now, I am running
> out of disk space on my root partition (10 GB), although I have a
> rather small system with fluxbox (no KDE, GNOME,...). Thought gentoo
> would not waste my resources that much. Now I am thinking about how to
> resize my ext3 partitions. Bellow is the output of fdisk:
Just to be sure you checked - Gentoo keeps temporary files in
/var/tmp/portage/ (build temp location, sometimes things get left here) and
/usr/portage/distfiles/ (download location).

/usr/portage/distfiles can get pretty large over time.

--
// Andrew MacKenzie | http://www.edespot.com
// GPG public key: http://www.edespot.com/~amackenz/public.key
// The best book on programming for the layman is "Alice in Wonderland";
// but that's because it's the best book on anything for the layman.
// - Alan Perlis

Masood Ahmed

unread,
May 4, 2009, 10:00:10 AM5/4/09
to
Marco <list...@gmail.com> writes:

Try this article:

http://www.howtoforge.com/linux_resizing_ext3_partitions

Regards,
Masood Ahmed

--
Chaos is King and Magic is loose in the world.

Neil Bothwick

unread,
May 4, 2009, 10:00:14 AM5/4/09
to
On Mon, 4 May 2009 12:56:05 +0000, Marco wrote:

> I am new to gentoo and so far I really like it. But now, I am running
> out of disk space on my root partition (10 GB), although I have a
> rather small system with fluxbox (no KDE, GNOME,...). Thought gentoo
> would not waste my resources that much. Now I am thinking about how to
> resize my ext3 partitions.

I'd look to see what is filling up the root partition, 10GB should be more
than enough.


--
Neil Bothwick

Puritanism: The haunting fear that someone, somewhere may be happy.

signature.asc

Platoali

unread,
May 4, 2009, 10:10:19 AM5/4/09
to
On Do shanbe 14 Ordibehesht 1388 18:22:19 Neil Bothwick wrote:
> On Mon, 4 May 2009 12:56:05 +0000, Marco wrote:
> > I am new to gentoo and so far I really like it. But now, I am running
> > out of disk space on my root partition (10 GB), although I have a
> > rather small system with fluxbox (no KDE, GNOME,...). Thought gentoo
> > would not waste my resources that much. Now I am thinking about how to
> > resize my ext3 partitions.
>
> I'd look to see what is filling up the root partition, 10GB should be more
> than enough.


Try to remount route on another directory and check which directory is using
so much. I had a similar problem asked this a couple of month before on this
mailing list. They gave this commands:

#mount -o bind / /mnt/root
#du -max-dep=1

bests

Marco

unread,
May 4, 2009, 10:30:26 AM5/4/09
to
On Mon, May 4, 2009 at 1:44 PM, Andrew MacKenzie <amac...@edespot.com> wrote:
> +++ Marco [gentoo-user] [Mon, May 04, 2009 at 12:56:05PM +0000]:
[...]

> Just to be sure you checked - Gentoo keeps temporary files in
> /var/tmp/portage/ (build temp location, sometimes things get left here) and
> /usr/portage/distfiles/ (download location).
>
> /usr/portage/distfiles can get pretty large over time.

I cleaned this directory frequently, but still running low on disk space...

--
Regards,
Marco

Arttu V.

unread,
May 4, 2009, 10:50:10 AM5/4/09
to

I may have missed something of your configuration or partitions (did
you have a separate /usr?), but check old and useless kernel sources
from under /usr/src (and under /lib/modules if you've compiled and
installed modules).

Clean out old and unused ones. Compiled kernel sources directories can
be over 800 MB *each*. For example for my current /usr/src/linux
(which points to ./linux-2.6.28-gentoo-r5) du says 818MB. You don't
need too many of these to fill up a 10GB partition.

--
Arttu V.

Marco

unread,
May 4, 2009, 11:00:17 AM5/4/09
to
On Mon, May 4, 2009 at 1:52 PM, Neil Bothwick <ne...@digimed.co.uk> wrote:
> On Mon, 4 May 2009 12:56:05 +0000, Marco wrote:

[..]

> I'd look to see what is filling up the root partition, 10GB should be more
> than enough.

Good tip! cd /usr/src/linux and make clean gave me back 2 GB.

Paul Hartman

unread,
May 4, 2009, 11:00:26 AM5/4/09
to

Also unmerge old unneeded kernels and remove leftovers from old
kernels found in /usr/src and /lib/modules (or /lib64/modules)

Alan McKinnon

unread,
May 4, 2009, 11:10:32 AM5/4/09
to

You'd be amazed how much junk collects in /var/log/portage over time

--
alan dot mckinnon at gmail dot com

Philipp Riegger

unread,
May 4, 2009, 11:20:05 AM5/4/09
to

On Mon, 2009-05-04 at 17:02 +0200, Alan McKinnon wrote:
> > >> I'd look to see what is filling up the root partition, 10GB should be
> > >> more than enough.
> > >
> > > Good tip! cd /usr/src/linux and make clean gave me back 2 GB.
> >
> > Also unmerge old unneeded kernels and remove leftovers from old
> > kernels found in /usr/src and /lib/modules (or /lib64/modules)
>
> You'd be amazed how much junk collects in /var/log/portage over time

Or in /var/log. Logrotate helps there and /var/log/portage can be
cleaned up by a script that compresses everything older than 1 day (the
test helps not to "disturb" a running portage or get ugly split logs).

Philipp

John covici

unread,
May 4, 2009, 12:00:25 PM5/4/09
to
on Monday 05/04/2009 Philipp Riegger(li...@anderedomain.de) wrote

What I would really like to do is get rid of everything except the
most recent compile of each program in /var/log/portage -- anyone have a script to do that?
--
Your life is like a penny. You're going to lose it. The question is:
How do
you spend it?

John Covici
cov...@ccs.covici.com

Dirk Heinrichs

unread,
May 4, 2009, 12:40:14 PM5/4/09
to
Am Montag, 4. Mai 2009 16:02:39 schrieb Platoali:

> Try to remount route on another directory and check which directory is
> using so much. I had a similar problem asked this a couple of month before
> on this mailing list. They gave this commands:
>
> #mount -o bind / /mnt/root
> #du -max-dep=1

Or just forget about the useless bind-mount and add "-x" to the "du" command.

Bye...

Dirk

signature.asc

John covici

unread,
May 4, 2009, 12:40:17 PM5/4/09
to
on Monday 05/04/2009 Mick(michael...@gmail.com) wrote

> On Monday 04 May 2009, John covici wrote:
> > on Monday 05/04/2009 Philipp Riegger(li...@anderedomain.de) wrote
>
> > > > You'd be amazed how much junk collects in /var/log/portage over time
> > >
> > > Or in /var/log. Logrotate helps there and /var/log/portage can be
> > > cleaned up by a script that compresses everything older than 1 day (the
> > > test helps not to "disturb" a running portage or get ugly split logs).
> >
> > What I would really like to do is get rid of everything except the
> > most recent compile of each program in /var/log/portage -- anyone have a
> > script to do that?
>
> Check man emerge and read (carefully) --clean --depclean and --prune options.
> Use any of these judiciously because you can easily hose your box (if you get
> rid of your compiler for example).
> --
> Regards,
> Mick

I was only talking about getting rid of log files in /var/log/portage
where it keeps a record of each build of every program. Seems to me
only the most recent one is significant.

Mick

unread,
May 4, 2009, 12:40:19 PM5/4/09
to
On Monday 04 May 2009, John covici wrote:
> on Monday 05/04/2009 Philipp Riegger(li...@anderedomain.de) wrote

> > > You'd be amazed how much junk collects in /var/log/portage over time


> >
> > Or in /var/log. Logrotate helps there and /var/log/portage can be
> > cleaned up by a script that compresses everything older than 1 day (the
> > test helps not to "disturb" a running portage or get ugly split logs).
>
> What I would really like to do is get rid of everything except the
> most recent compile of each program in /var/log/portage -- anyone have a
> script to do that?

Check man emerge and read (carefully) --clean --depclean and --prune options.

signature.asc

Neil Bothwick

unread,
May 4, 2009, 1:50:17 PM5/4/09
to
On Mon, 4 May 2009 18:31:06 +0200, Dirk Heinrichs wrote:

> > #mount -o bind / /mnt/root
> > #du -max-dep=1
>
> Or just forget about the useless bind-mount and add "-x" to the "du"
> command.

That won't pick up space wasted by files occupying space in directories
that are used as mount points.


--
Neil Bothwick

Idaho - It's not the end of the world, but you can see it from there.

signature.asc

Neil Bothwick

unread,
May 4, 2009, 2:00:10 PM5/4/09
to
On Mon, 4 May 2009 11:54:18 -0400, John covici wrote:

> What I would really like to do is get rid of everything except the
> most recent compile of each program in /var/log/portage -- anyone have
> a script to do that?

Why not delete everything over a week or two old? Once the package is
installed and working, you don't need the elog any more.


--
Neil Bothwick

Make it idiot proof and someone will make a better idiot.

signature.asc

Dirk Heinrichs

unread,
May 4, 2009, 4:20:06 PM5/4/09
to
Am Montag, 4. Mai 2009 19:47:45 schrieb Neil Bothwick:
> On Mon, 4 May 2009 18:31:06 +0200, Dirk Heinrichs wrote:
> > > #mount -o bind / /mnt/root
> > > #du -max-dep=1
> >
> > Or just forget about the useless bind-mount and add "-x" to the "du"
> > command.
>
> That won't pick up space wasted by files occupying space in directories
> that are used as mount points.

How often does that happen?

Bye...

Dirk

signature.asc

Neil Bothwick

unread,
May 4, 2009, 6:40:07 PM5/4/09
to
On Mon, 4 May 2009 22:12:17 +0200, Dirk Heinrichs wrote:

> > That won't pick up space wasted by files occupying space in
> > directories that are used as mount points.
>
> How often does that happen?

Not very often, but it happens in a significant proportion of the times
the root partition fills up, particularly hen running a small root. All
it needs is for an NFS mount to fail unnoticed when you boot.


--
Neil Bothwick

If such a program has not crashed yet, it is waiting for a critical moment
before it crashes.
-- Murphy's Computer Laws n°6

signature.asc
0 new messages