<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>193586</bug_id>
          
          <creation_ts>2007-09-24 00:29 0000</creation_ts>
          <short_desc>sys-fs/udev - make tmpfs_inodes configurable in udev.conf</short_desc>
          <delta_ts>2007-09-24 23:39:13 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Applications</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          <bug_file_loc>http://amiga.nvg.org/moro/udev-start.sh_diff</bug_file_loc>
          
          
          <priority>P2</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>gentoo@kolla.no</reporter>
          <assigned_to>udev-bugs@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>gentoo@kolla.no</who>
            <bug_when>2007-09-24 00:29:22 0000</bug_when>
            <thetext>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 &quot;no space left on device&quot; 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=&quot;256k&quot; and tmpfs_inodes=&quot;3k&quot;


Reproducible: Always</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2007-09-24 05:59:40 0000</bug_when>
            <thetext>Don&apos;t refer to external links for patches, please. We have attachments feature for this.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>zzam@gentoo.org</who>
            <bug_when>2007-09-24 09:13:21 0000</bug_when>
            <thetext>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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>zzam@gentoo.org</who>
            <bug_when>2007-09-24 19:55:46 0000</bug_when>
            <thetext>This is now implemented in udev-115-r6</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>gentooperson@yahoo.com</who>
            <bug_when>2007-09-24 20:16:29 0000</bug_when>
            <thetext>Created an attachment (id=131799)
The file from the URL

Here&apos;s the patch, as an attachment.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>gentoo@kolla.no</who>
            <bug_when>2007-09-24 21:53:38 0000</bug_when>
            <thetext>(In reply to comment #2)
&gt; From /usr/src/linux/Documentation/filesystems/tmpfs.txt:
&gt; nr_inodes: The maximum number of inodes for this instance. The default
&gt;            is half of the number of your physical RAM pages, or (on a
&gt;            machine with highmem) the number of lowmem RAM pages,
&gt;            whichever is the lower.
&gt; 
&gt; On my system the tmpfs has 128738 inodes.
&gt; # df -i /dev/
&gt; Filesystem            Inodes   IUsed   IFree IUse% Mounted on
&gt; udev                  128738    3394  125344    3% /dev
&gt; 
&gt; So for systems with low number of physical RAM pages this could be too low.
&gt; 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&apos;s so annoying when I forgot about it :)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>gentoo@kolla.no</who>
            <bug_when>2007-09-24 23:39:13 0000</bug_when>
            <thetext>(In reply to comment #3)
&gt; This is now implemented in udev-115-r6

Great, works fine! Thanks, excellent support :)
</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>131799</attachid>
            <date>2007-09-24 20:16 0000</date>
            <desc>The file from the URL</desc>
            <filename>udev-start.sh_diff</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIHVkZXYtc3RhcnQuc2hfb3JpZwkyMDA3LTA5LTI0IDAxOjQ3OjU4LjAwMDAwMDAwMCArMDIw
MAorKysgdWRldi1zdGFydC5zaAkyMDA3LTA5LTI0IDAxOjUxOjU1LjAwMDAwMDAwMCArMDIwMApA
QCAtNCwxICs0LDIgQEAKIHRtcGZzX3NpemU9IjEwTSIKK3RtcGZzX2lub2Rlcz0iMjU2ayIKQEAg
LTU2LDEgKzU3LDEgQEAKLQkJbW50b3B0cz0iZXhlYyxub3N1aWQsbW9kZT0wNzU1LHNpemU9JHt0
bXBmc19zaXplfSIKKwkJbW50b3B0cz0iZXhlYyxub3N1aWQsbW9kZT0wNzU1LHNpemU9JHt0bXBm
c19zaXplfSxucl9pbm9kZXM9JHt0bXBmc19pbm9kZXN9Igo=
</data>        

          </attachment>
    </bug>

</bugzilla>