From: Paul Hartman <paul.hartman+gentoo@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Setting size of /dev/shm or cleaning up ancient /etc/fstab
Date: Wed, 8 May 2013 09:43:16 -0500 [thread overview]
Message-ID: <CAEH5T2MazERFj=PSrxMAb7y_hsPr5TXm+fAJaYKdh6PdWrmWgQ@mail.gmail.com> (raw)
In-Reply-To: <20130508055540.GA4420@waltdnes.org>
On Wed, May 8, 2013 at 12:55 AM, Walter Dnes <waltdnes@waltdnes.org> wrote:
> I'm running mdev, so that may be related. Here's my story... a script
> I run to automatically process digital photos started blowing up on me.
> After much bashing of head against brick wall, I determined that
> /dev/shm now has an absolute max size of 10 megabytes! Any larger files
> could not be written to it. Here's all the uncommented stuff in /etc/fstab
>
>
> /dev/sda5 / ext2 noatime,nodiratime,async 0 1
> /dev/sda7 /home reiserfs noatime,nodiratime,async,notail 0 1
> /home/bindmounts/opt /opt auto bind 0 0
> /home/bindmounts/var /var auto bind 0 0
> /home/bindmounts/usr /usr auto bind 0 0
> /home/bindmounts/tmp /tmp auto bind 0 0
> /dev/sda6 none swap sw 0 0
> /dev/cdrom /mnt/cdrom iso9660 noauto,users,ro 0 0
> /dev/sr0 /mnt/dvd auto noauto,users,ro 0 0
> devpts /dev/pts devpts defaults 0 0
> none /dev/shm tmpfs rw,noatime,noexec,nosuid,nodev 0 0
>
> Meanwhile, my netbook, with the /dev/shm line commented out, runs just
> fine and handles large files in /dev/shm. I followed the example at
> http://wiki.gentoo.org/wiki/Complete_Handbook/Configuring_the_system
> with slightly more paranoid settings, e.g. noexec. What gives?
You can forcefully specify the size of /dev/shm like this:
none /dev/shm tmpfs defaults,size=10G 0 0
But it should default to 50% of your system RAM... weird... do you
have any local scripts that are remounting it, maybe?
There's a lot more information in the kernel documentation:
/usr/src/linux//Documentation/filesystems/tmpfs.txt
The default fstab from latest baselayout does not contain /dev/shm at all:
# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed); notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#
# <fs> <mountpoint> <type> <opts>
<dump/pass>
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/BOOT /boot ext2 noauto,noatime 1 2
/dev/ROOT / ext3 noatime 0 1
/dev/SWAP none swap sw 0 0
/dev/cdrom /mnt/cdrom auto noauto,ro 0 0
/dev/fd0 /mnt/floppy auto noauto 0 0
prev parent reply other threads:[~2013-05-08 14:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-08 5:55 [gentoo-user] Setting size of /dev/shm or cleaning up ancient /etc/fstab Walter Dnes
2013-05-08 6:43 ` Alan McKinnon
2013-05-09 20:49 ` [gentoo-user] [SOLVED] " Walter Dnes
2013-05-08 14:43 ` Paul Hartman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAEH5T2MazERFj=PSrxMAb7y_hsPr5TXm+fAJaYKdh6PdWrmWgQ@mail.gmail.com' \
--to=paul.hartman+gentoo@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox