FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 07-11-2008, 11:16 AM
Miernik
 
Default how does Gentoo's mke2fs determine how many inodes to create?

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 ~ #

I ran out of inodes! Now it cries that the disk ran out of space when I
try to compile anything. I did already get rid of /usr/share/doc/ as
there are many small files there, and purged /var/tmp/ too, but again
emerge quickly fills all possible inodes, and fails.

Why did he did so little inodes? On another machine, which is Debian and
about 5 GB disk, I have 752192 inodes and even on a 3.2 GB one 376096
inodes, so here why did I get so little by default?

What can I do now, besides starting the installation over again from the
beggining, which would be 2 days of work lost!

Any other places besides /usr/share/doc and /var/tmp/ I can look to
recover a lot of inodes? Can someone fix mke2fs so it doesn't do that to
anyone again in the future?

--
Miernik
http://miernik.name/

--
gentoo-user@lists.gentoo.org mailing list
 
Old 07-11-2008, 12:15 PM
Daniel Iliev
 
Default how does Gentoo's mke2fs determine how many inodes to create?

On Fri, 11 Jul 2008 13:16:53 +0200
Miernik <public@public.miernik.name> 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 ~ #
>
> I ran out of inodes! Now it cries that the disk ran out of space when
> I try to compile anything. I did already get rid of /usr/share/doc/ as
> there are many small files there, and purged /var/tmp/ too, but again
> emerge quickly fills all possible inodes, and fails.
>
> Why did he did so little inodes? On another machine, which is Debian
> and about 5 GB disk, I have 752192 inodes and even on a 3.2 GB one
> 376096 inodes, so here why did I get so little by default?
>
> What can I do now, besides starting the installation over again from
> the beggining, which would be 2 days of work lost!
>
> Any other places besides /usr/share/doc and /var/tmp/ I can look to
> recover a lot of inodes? Can someone fix mke2fs so it doesn't do that
> to anyone again in the future?
>


/etc/mke2fs.conf - this file contains the default options plus several
presets.

The number of inodes can be specified at creation time with the "-N"
parameter. AFAIK it cannot be changed afterwards.



--
Best regards,
Daniel
--
gentoo-user@lists.gentoo.org mailing list
 
Old 07-11-2008, 12:35 PM
Anthony Metcalf
 
Default how does Gentoo's mke2fs determine how many inodes to create?

Daniel Iliev wrote:

On Fri, 11 Jul 2008 13:16:53 +0200
Miernik <public@public.miernik.name> wrote:


/etc/mke2fs.conf - this file contains the default options plus several

presets.

The number of inodes can be specified at creation time with the "-N"
parameter. AFAIK it cannot be changed afterwards.



You can though, dd the partition to another drive, re-format, and dd it
back....


Anthony
--
gentoo-user@lists.gentoo.org mailing list
 
Old 07-11-2008, 12:39 PM
Dirk Heinrichs
 
Default how does Gentoo's mke2fs determine how many inodes to create?

Am Freitag, 11. Juli 2008 schrieb ext Anthony Metcalf:
> Daniel Iliev wrote:
> > The number of inodes can be specified at creation time with the "-N"
> > parameter. AFAIK it cannot be changed afterwards.
>
> You can though, dd the partition to another drive, re-format, and dd it
> back....

ROTFL :-)

Bye...

Dirk
--
Dirk Heinrichs | Tel: +49 (0)162 234 3408
Configuration Manager | Fax: +49 (0)211 47068 111
Capgemini Deutschland | Mail: dirk.heinrichs@capgemini.com
Wanheimerstraße 68 | Web: http://www.capgemini.com
D-40468 Düsseldorf | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: wwwkeys.pgp.net
 
Old 07-11-2008, 01:03 PM
Daniel Iliev
 
Default how does Gentoo's mke2fs determine how many inodes to create?

On Fri, 11 Jul 2008 13:35:02 +0100
Anthony Metcalf <Anthony.Metcalf@anferny.ath.cx> wrote:

> Daniel Iliev wrote:
> > On Fri, 11 Jul 2008 13:16:53 +0200
> > Miernik <public@public.miernik.name> wrote:
> >
> >
> > /etc/mke2fs.conf - this file contains the default options plus
> > several presets.
> >
> > The number of inodes can be specified at creation time with the "-N"
> > parameter. AFAIK it cannot be changed afterwards.
> >
> >
> >
> You can though, dd the partition to another drive, re-format, and dd
> it back....
>
> Anthony


No, not really. "dd" is not good for this case because it works on
lower level and will copy and restore the file system also. A normal
archive program like GNU Tar should do the trick.

--
Best regards,
Daniel
--
gentoo-user@lists.gentoo.org mailing list
 
Old 07-11-2008, 01:10 PM
Dirk Heinrichs
 
Default how does Gentoo's mke2fs determine how many inodes to create?

Am Freitag, 11. Juli 2008 schrieb ext Daniel Iliev:

> > You can though, dd the partition to another drive, re-format, and dd
> > it back....
>
> No, not really. "dd" is not good for this case because it works on
> lower level and will copy and restore the file system also. A normal
> archive program like GNU Tar should do the trick.

Hmm, thought he was in ironic mode ;-)

Bye...

Dirk
--
Dirk Heinrichs | Tel: +49 (0)162 234 3408
Configuration Manager | Fax: +49 (0)211 47068 111
Capgemini Deutschland | Mail: dirk.heinrichs@capgemini.com
Wanheimerstraße 68 | Web: http://www.capgemini.com
D-40468 Düsseldorf | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: wwwkeys.pgp.net
 
Old 07-11-2008, 01:34 PM
Anthony Metcalf
 
Default how does Gentoo's mke2fs determine how many inodes to create?

Dirk Heinrichs wrote:

Am Freitag, 11. Juli 2008 schrieb ext Daniel Iliev:



You can though, dd the partition to another drive, re-format, and dd
it back....


No, not really. "dd" is not good for this case because it works on
lower level and will copy and restore the file system also. A normal
archive program like GNU Tar should do the trick.



Hmm, thought he was in ironic mode ;-)

Bye...

Dirk


Yes, that was it. honest guv. Ahem.
--
gentoo-user@lists.gentoo.org mailing list
 
Old 07-11-2008, 03:45 PM
Alan McKinnon
 
Default how does Gentoo's mke2fs determine how many inodes to create?

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.



--
Alan McKinnon
alan dot mckinnon at gmail dot com

--
gentoo-user@lists.gentoo.org mailing list
 
Old 07-11-2008, 05:51 PM
Robert Bridge
 
Default how does Gentoo's mke2fs determine how many inodes to create?

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
 

Thread Tools




All times are GMT. The time now is 04:27 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org