I ran into a problem when having a lot of small files in a memory disk filesystem /tmp, which is now turned on by default through /etc/defaults/rc.conf and /etc/rc.d/tmp . This caused /tmp to quickly run out of inodes. In this case it was a cvs update over ssh that triggered the problem. One way to solve this is to increase the size of /tmp (this was also required to solve my problem, since at least 130M was required for cvs update to complete). But increasing the size of /tmp to 512M was not enough to get a sufficient number of inodes. Therefore I suggest a change to /etc/rc.d/tmp and /etc/defaults/rc.conf to let bytes-per-inode be a configureable option through /etc/rc.conf The diff I have attached to this message is what I've used for a few days now. It seems to work for me. I don't know how many people who actually need such an option, since this is relatively easy to work around by other means. from (log) messages: Jul 24 11:34:02 endeavour kernel: pid 15026 (cvs), uid 1001 inumber 1407 on /tmp: out of inodes Index: etc/defaults/rc.conf =================================================================== RCS file: /usr/ncvs/src/etc/defaults/rc.conf,v retrieving revision 1.211 diff -u -r1.211 rc.conf --- etc/defaults/rc.conf 18 Jul 2004 18:01:47 -0000 1.211 +++ etc/defaults/rc.conf 24 Jul 2004 10:35:47 -0000 _at__at_ -40,6 +40,7 _at__at_ removable_interfaces="" # Removable network interfaces for /etc/pccard_ether. tmpmfs="AUTO" # Set to YES to always create an mfs /tmp, NO to never tmpsize="20m" # Size of mfs /tmp if created +tmpbpi="DEFAULT" # Bytes-per-inode of mfs /tmp if created varmfs="AUTO" # Set to YES to always create an mfs /var, NO to never varsize="32m" # Size of mfs /var if created populate_var="AUTO" # Set to YES to always (re)populate /var, NO to never Index: etc/rc.d/tmp =================================================================== RCS file: /usr/ncvs/src/etc/rc.d/tmp,v retrieving revision 1.32 diff -u -r1.32 tmp --- etc/rc.d/tmp 23 Mar 2004 23:22:35 -0000 1.32 +++ etc/rc.d/tmp 24 Jul 2004 11:06:45 -0000 _at__at_ -35,15 +35,27 _at__at_ name="tmp" +md_bpi="" + load_rc_config $name +if [ -n "$tmpbpi" ]; then + case "$tmpbpi" in + [Dd][Ee][Ff][Aa][Uu][Ll][Tt]) + ;; + *) + md_bpi="$tmpbpi" + ;; + esac +fi + # If we do not have a writable /tmp, create a memory # filesystem for /tmp. If /tmp is a symlink (e.g. to /var/tmp, # then it should already be writable). # case "${tmpmfs}" in [Yy][Ee][Ss]) - mount_md ${tmpsize} /tmp + mount_md ${tmpsize} /tmp ${md_bpi} chmod 01777 /tmp ;; [Nn][Oo]) _at__at_ -57,7 +69,7 _at__at_ echo "dropping into shell, ^D to continue anyway." /bin/sh else - mount_md ${tmpsize} /tmp + mount_md ${tmpsize} /tmp ${md_bpi} chmod 01777 /tmp fi fi
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:03 UTC