xref: /illumos-gate/usr/src/man/man8/mount_tmpfs.8 (revision b8052df9f609edb713f6828c9eecc3d7be19dfb3)
te
Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved
Copyright 2015 Joyent, Inc.
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
MOUNT_TMPFS 8 "Mar 18, 2015"
NAME
mount_tmpfs - mount tmpfs file systems
SYNOPSIS

mount [-F tmpfs] [-o specific_options] [-O] special mount_point
DESCRIPTION

tmpfs is a memory based file system which uses kernel resources relating to the VM system and page cache as a file system.

mount attaches a tmpfs file system to the file system hierarchy at the pathname location mount_point, which must already exist. If mount_point has any contents prior to the mount operation, these remain hidden until the file system is once again unmounted. The attributes (mode, owner, and group) of the root of the tmpfs filesystem are inherited from the underlying mount_point, provided that those attributes are determinable. If not, the root's attributes are set to their default values. The mode may also be overridden by the mode mount option, which takes precedence if set.

The special argument is usually specified as swap but is in fact disregarded and assumed to be the virtual memory resources within the system.

OPTIONS
-o specific_options

Specify tmpfs file system specific options in a comma-separated list with no intervening spaces. If invalid options are specified, a warning message is printed and the invalid options are ignored. The following options are available: remount

Remounts a file system with a new size. A size not explicitly set with remount reverts to no limit.

mode=octalmode

The mode argument controls the permissions of the tmpfs mount point. The argument must be an octal number, of the form passed to chmod(1). Only the access mode, setuid, setgid, and sticky bits (a mask of 07777) may be set. If this option is not provided then the default mode behaviour, as described above, applies.

size=sz

The sz argument controls the size of this particular tmpfs file system. If the argument is has a `k' suffix, the number will be interpreted as a number of kilobytes. An `m' suffix will be interpreted as a number of megabytes. A `g' suffix will be interpreted as a number of gigabytes. A `%' suffix will be interpreted as a percentage of the swap space available to the zone. No suffix is interpreted as bytes. In all cases, the actual size of the file system is the number of bytes specified, rounded up to the physical pagesize of the system.

xattr | noxattr

Allow or disallow the creation and manipulation of extended attributes. The default is xattr. See fsattr(7) for a description of extended attributes.

-O

Overlay mount. Allow the file system to be mounted over an existing mount point, making the underlying file system inaccessible. If a mount is attempted on a pre-existing mount point without setting this flag, the mount will fail, producing the error: device busy.

FILES
/etc/mnttab

Table of mounted file systems

SEE ALSO

mkdir (2), mount (2), open (2), umount (2), tmpfs (4FS), mnttab (5), attributes (7), fsattr (7), mount (8)

NOTES

If the directory on which a file system is to be mounted is a symbolic link, the file system is mounted on the directory to which the symbolic link refers, rather than on top of the symbolic link itself.