Bug 193586 - sys-fs/udev - make tmpfs_inodes configurable in udev.conf
|
Bug#:
193586
|
Product: Gentoo Linux
|
Version: unspecified
|
Platform: All
|
|
OS/Version: Linux
|
Status: RESOLVED
|
Severity: enhancement
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: udev-bugs@gentoo.org
|
Reported By: gentoo@kolla.no
|
|
Component: Applications
|
|
|
URL:
http://amiga.nvg.org/moro/udev-start.sh_diff
|
|
Summary: sys-fs/udev - make tmpfs_inodes configurable in udev.conf
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2007-09-24 00:29 0000
|
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
Don't refer to external links for patches, please. We have attachments feature
for this.
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.
This is now implemented in udev-115-r6
(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 :)
(In reply to comment #3)
> This is now implemented in udev-115-r6
Great, works fine! Thanks, excellent support :)