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
Created attachment 131799 [details, diff] The file from the URL Here's the patch, as an attachment.
(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 :)