Mount tmpfs inside jail ?

bryn1u said:
I need to mount tmpfs(5) inside jail, how can I do that?
Mount it from the host. You can use /etc/fstab.<jailname> for it, then it'll be mounted and unmounted when the jail starts and stops.
 
SirDice said:
bryn1u said:
I need to mount tmpfs(5) inside jail, how can I do that?
Mount it from the host. You can use /etc/fstab.<jailname> for it, then it'll be mounted and unmounted when the jail starts and stops.

F... me. It was my fault. You're right.

My /etc/fstab.games
Code:
linproc /jails/Games/compat/linux/proc linprocfs rw 0 0
tmpfs /jails/Games/dev/shm tmpfs rw 0 0

Works like a charm.
Thanks,
 
Hello.
And how do I specify the volume for tmpfs?
Code:
/usr/jails/basejail /usr/jails/place_ru/basejail nullfs ro 0 0
tmpfs /usr/jails/place_ru/tmp tmpfs rw 0
 
What do you mean by volume? The size?

tmpfs(5):
Code:
     size    Specifies the total file system size in bytes.  If zero (the
             default) or a value larger than SIZE_MAX - PAGE_SIZE is given,
             the available amount of memory (including main memory and swap
             space) will be used.

But it's more common to use tmpfs(5) dynamically. For a set sized RAM disk mdmfs(8) might be more appropriate.
 
Back
Top