public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user]  how does Gentoo's mke2fs determine how many inodes to create?
@ 2008-07-11 11:16 Miernik
  2008-07-11 12:15 ` Daniel Iliev
  2008-07-11 15:45 ` Alan McKinnon
  0 siblings, 2 replies; 9+ messages in thread
From: Miernik @ 2008-07-11 11:16 UTC (permalink / raw
  To: gentoo-user

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



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user]  how does Gentoo's mke2fs determine how many inodes to create?
  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 15:45 ` Alan McKinnon
  1 sibling, 1 reply; 9+ messages in thread
From: Daniel Iliev @ 2008-07-11 12:15 UTC (permalink / raw
  To: gentoo-user

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



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user]  how does Gentoo's mke2fs determine how many inodes to create?
  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
  0 siblings, 2 replies; 9+ messages in thread
From: Anthony Metcalf @ 2008-07-11 12:35 UTC (permalink / raw
  To: gentoo-user

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



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user]  how does Gentoo's mke2fs determine how many inodes to create?
  2008-07-11 12:35   ` Anthony Metcalf
@ 2008-07-11 12:39     ` Dirk Heinrichs
  2008-07-11 13:03     ` Daniel Iliev
  1 sibling, 0 replies; 9+ messages in thread
From: Dirk Heinrichs @ 2008-07-11 12:39 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 661 bytes --]

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

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user]  how does Gentoo's mke2fs determine how many inodes  to create?
  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
  1 sibling, 1 reply; 9+ messages in thread
From: Daniel Iliev @ 2008-07-11 13:03 UTC (permalink / raw
  To: gentoo-user

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



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user]  how does Gentoo's mke2fs determine how many inodes  to create?
  2008-07-11 13:03     ` Daniel Iliev
@ 2008-07-11 13:10       ` Dirk Heinrichs
  2008-07-11 13:34         ` Anthony Metcalf
  0 siblings, 1 reply; 9+ messages in thread
From: Dirk Heinrichs @ 2008-07-11 13:10 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 736 bytes --]

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

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user]  how does Gentoo's mke2fs determine how many inodes to create?
  2008-07-11 13:10       ` Dirk Heinrichs
@ 2008-07-11 13:34         ` Anthony Metcalf
  0 siblings, 0 replies; 9+ messages in thread
From: Anthony Metcalf @ 2008-07-11 13:34 UTC (permalink / raw
  To: gentoo-user

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



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user]  how does Gentoo's mke2fs determine how many inodes to create?
  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 15:45 ` Alan McKinnon
  2008-07-11 17:51   ` Robert Bridge
  1 sibling, 1 reply; 9+ messages in thread
From: Alan McKinnon @ 2008-07-11 15:45 UTC (permalink / raw
  To: gentoo-user

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



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user]  how does Gentoo's mke2fs determine how many inodes to create?
  2008-07-11 15:45 ` Alan McKinnon
@ 2008-07-11 17:51   ` Robert Bridge
  0 siblings, 0 replies; 9+ messages in thread
From: Robert Bridge @ 2008-07-11 17:51 UTC (permalink / raw
  To: gentoo-user

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



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-07-11 17:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox