On Thursday 09 May 2013 16:08:16 Walter Dnes wrote:
>   That was almost, but not quite, the correct answer.  More spelunking
> shows that there is no built-in limit for /dev/shm per se.  However,
> /dev/shm is mounted on top of /dev.
> And /etc/mtab showed...

you really should consult /proc/mounts instead of /etc/mtab if you want the 
authoritative answer

>   On a physical disk, you can't allocate a 1 gig mount on a 10 megabyte
> partition.

erm, you can allocate huge sparse files just fine ...

you can also use a FS that does inline compression ;)

> Similarly, you can't mount allocate a 1 gig /dev/shm on top
> of a 10 meg /dev.

pretty sure that's not true.  the settings of mounts don't care about the 
settings of the mount where they get mounted over top of.

this example shows it works perfectly fine:

# cd /mnt
# mkdir tmp
# mount -t tmpfs -o size=100k test tmp
# mkdir tmp/d
# dd if=/dev/zero of=tmp/f
dd: writing to ‘tmp/f’: No space left on device
201+0 records in
200+0 records out
102400 bytes (102 kB) copied, 0.0010411 s, 98.4 MB/s

# mount -t tmpfs -o size=1M test tmp/d
# dd if=/dev/zero of=tmp/d/f
dd: writing to ‘tmp/d/f’: No space left on device
2049+0 records in
2048+0 records out
1048576 bytes (1.0 MB) copied, 0.00388022 s, 270 MB/s

# ls -lR tmp
tmp:
total 100
drwxrwxrwt 2 root root     60 May  9 16:27 d
-rw-r--r-- 1 root root 102400 May  9 16:27 f

tmp/d:
total 1024
-rw-r--r-- 1 root root 1048576 May  9 16:27 f

>   I think I've finally found the root of the problem, in /etc/init.d/mdev
> in Gentoo...
> 
> mount_it()
> {
>         if fstabinfo --quiet /dev ; then
>                 mount -n /dev
>         else
>                 # Some devices require exec, Bug #92921
>                 mount -n -t tmpfs -o "exec,nosuid,mode=0755,size=10M" mdev
> /dev fi
> }
> 
>   I may have to file a bug at bugs.gentoo.org

not a bug
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to