public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Robert Bridge <robert@robbieab.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user]  how does Gentoo's mke2fs determine how many inodes to create?
Date: Fri, 11 Jul 2008 18:51:38 +0100	[thread overview]
Message-ID: <20080711185138.30e50a78@pheonix> (raw)
In-Reply-To: <200807111745.59115.alan.mckinnon@gmail.com>

On Fri, 11 Jul 2008 17:45:58 +0200
Alan McKinnon <alan.mckinnon@gmail.com> wrote:

> On Friday 11 July 2008, Miernik wrote:
> > I installed Gentoo using the handbook, and the root partition has
> > 4094951424 bytes (a 4 GB USB pendrive), and "mke2fs -j /dev/sda2" as
> > on
> > http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1&chap=
> >4#doc_chap4 created me a partition with only 249984 inodes. That was
> > REALLY SILLY of him, because:
> >
> > przehyba ~ # df -i /dev/sda2
> > Filesystem            Inodes   IUsed   IFree IUse% Mounted on
> > /dev/sda2             249984  249739     245  100% /
> > przehyba ~ #
> 
> Actually it's really silly of you to have done that for a gentoo root 
> partition. You have 16k per inode on average, much more than enough
> for normal purposes so it's a sane default for ext2/ext3.
> 
> I'll bet your problem is this:
> 
> alan@develop ~ $ find /var/portage/ | wc
>  143970  143970 7612245
> 
> That 65% of your inodes consumed right there in a required directory 
> structure. If so, easiest way out is to boot off a LiveCD, get access 
> to the pendrive and reduce it by about 350M or so. Create a new 
> filesystem in that space, mount it to $PORTDIR and move your portage 
> tree to it.
> 
> Someone else will need to confirm how big PORTDIR is on ext2/ext3, as 
> mine isn't. Also make sure distfiles is also a separate filesystem.

My experience when I was playing with Gentoo on a 2GB USB stick was
that fragmenting the device was a BAD idea, a much more efficient trick
is reducing the block size to 1k. This reduces the portage tree size
massively, and increases the number of inodes a lot, as inodes are
allocated proportional to the number of blocks.

YMMV,
Rob.
-- 
gentoo-user@lists.gentoo.org mailing list



      reply	other threads:[~2008-07-11 17:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-11 11:16 [gentoo-user] how does Gentoo's mke2fs determine how many inodes to create? Miernik
2008-07-11 12:15 ` Daniel Iliev
2008-07-11 12:35   ` Anthony Metcalf
2008-07-11 12:39     ` Dirk Heinrichs
2008-07-11 13:03     ` Daniel Iliev
2008-07-11 13:10       ` Dirk Heinrichs
2008-07-11 13:34         ` Anthony Metcalf
2008-07-11 15:45 ` Alan McKinnon
2008-07-11 17:51   ` Robert Bridge [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080711185138.30e50a78@pheonix \
    --to=robert@robbieab.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox