Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 193586 - sys-fs/udev - make tmpfs_inodes configurable in udev.conf
Summary: sys-fs/udev - make tmpfs_inodes configurable in udev.conf
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: udev maintainers
URL: http://amiga.nvg.org/moro/udev-start....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-24 00:29 UTC by Kolbjørn Barmen
Modified: 2007-09-24 23:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
The file from the URL (udev-start.sh_diff,320 bytes, patch)
2007-09-24 20:16 UTC, DrChandra the Gentoo Person
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kolbjørn Barmen 2007-09-24 00:29:22 UTC
I have a GameCube that I run Gentoo Linux on.

Since quite a while I have been patching /lib/rcscripts/addons/udev-start.sh to use my specified mount option for number of inodes. Without it, I get "no space left on device" errors on boot-up when udev tries to create nodes on /dev. I dont know what the default nr_inodes is, or how it is calculated.

My patch is in the URL.
In /etc/udev/udev.conf I set tmpfs_size="256k" and tmpfs_inodes="3k"


Reproducible: Always
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-09-24 05:59:40 UTC
Don't refer to external links for patches, please. We have attachments feature for this.
Comment 2 Matthias Schwarzott gentoo-dev 2007-09-24 09:13:21 UTC
From /usr/src/linux/Documentation/filesystems/tmpfs.txt:
nr_inodes: The maximum number of inodes for this instance. The default
           is half of the number of your physical RAM pages, or (on a
           machine with highmem) the number of lowmem RAM pages,
           whichever is the lower.

On my system the tmpfs has 128738 inodes.
# df -i /dev/
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
udev                  128738    3394  125344    3% /dev

So for systems with low number of physical RAM pages this could be too low.
Can please give info about how low this is for you.
Comment 3 Matthias Schwarzott gentoo-dev 2007-09-24 19:55:46 UTC
This is now implemented in udev-115-r6
Comment 4 DrChandra the Gentoo Person 2007-09-24 20:16:29 UTC
Created attachment 131799 [details, diff]
The file from the URL

Here's the patch, as an attachment.
Comment 5 Kolbjørn Barmen 2007-09-24 21:53:38 UTC
(In reply to comment #2)
> From /usr/src/linux/Documentation/filesystems/tmpfs.txt:
> nr_inodes: The maximum number of inodes for this instance. The default
>            is half of the number of your physical RAM pages, or (on a
>            machine with highmem) the number of lowmem RAM pages,
>            whichever is the lower.
> 
> On my system the tmpfs has 128738 inodes.
> # df -i /dev/
> Filesystem            Inodes   IUsed   IFree IUse% Mounted on
> udev                  128738    3394  125344    3% /dev
> 
> So for systems with low number of physical RAM pages this could be too low.
> Can please give info about how low this is for you.

Istead of messing up my /dev, I made a new filesystem for the test using the default values.

cubesmurf ~ # free
             total       used       free     shared    buffers     cached
Mem:         20036      18576       1460          0          4      10676
-/+ buffers/cache:       7896      12140
Swap:        16376          0      16376
cubesmurf ~ # mkdir /bla
cubesmurf ~ # mount -t tmpfs none /bla -o exec,nosuid,mode=0755,size=10M
cubesmurf ~ # df -i /bla
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
none                    2504       1    2503    1% /bla


The problem is ofcourse:

cubesmurf ~ # find /dev/ | wc -l
2753

so my /dev is now mounted with size=256k,nr_inodes=3k and hence looks like:

cubesmurf ~ # df -i /dev
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
udev                    3072    2752     320   90% /dev

Thanks for fixing this, I wa hoping that I can avoid the patch in the future, it's so annoying when I forgot about it :)
Comment 6 Kolbjørn Barmen 2007-09-24 23:39:13 UTC
(In reply to comment #3)
> This is now implemented in udev-115-r6

Great, works fine! Thanks, excellent support :)