Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 538532 - /etc/init.d/mdev script sometimes sets /dev and /dev/shm to 10 megabytes max
Summary: /etc/init.d/mdev script sometimes sets /dev and /dev/shm to 10 megabytes max
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-02 13:55 UTC by Walter Dnes
Modified: 2015-02-06 10:20 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Walter Dnes 2015-02-02 13:55:27 UTC
In response to Bug #92921, script /etc/init.d/mdev function mount_it() contains the line...

mount -n -t tmpfs -o "exec,nosuid,mode=0755,size=10M" mdev /dev

Since /dev/shm is mounted on /dev, that restricts /dev/shm to 10 megabytes whenever this line is invoked. 10 megabytes is insufficient for today's programs. This is in 1.23.0-r1, but I suspect also in all versions.

Reproducible: Sometimes

Steps to Reproduce:
1. reboot
2. try to copy an 11 megabyte file to /dev/shm
3.
Actual Results:  
Fails due to insufficient space

Expected Results:  
Copy should work

As a temporary workaround, I've changed the line in question to

mount -n -t tmpfs -o "exec,nosuid,mode=0755,size=50%" mdev /dev

i.e. allow up to 50% of ram for /dev/shm, which is the usual default. Does this consume more ram than "mount -n /dev" when /dev/shm is empty?
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2015-02-02 14:31:15 UTC
1) Please post your `emerge -vpq /etc/init.d/mdev' output in a comment.
2) Please post your `emerge --info' output in a comment.