Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mount_tmpfs(8) [netbsd man page]

MOUNT_TMPFS(8)						    BSD System Manager's Manual 					    MOUNT_TMPFS(8)

NAME
mount_tmpfs -- mount an efficient memory file system SYNOPSIS
mount_tmpfs [-g group] [-m mode] [-n nodes] [-o options] [-s size] [-u user] tmpfs mount_point DESCRIPTION
The mount_tmpfs command attaches an instance of the efficient memory file system to the global file system namespace. The tmpfs parameter only exists for compatibility with the other mount commands and is ignored. The directory specified by mount_point is converted to an abso- lute path before use and its attributes (owner, group and mode) are inherited unless explicitly overriden by the options described below. The following options are supported: -g group Specifies the group name or GID of the root inode of the file system. Defaults to the mount point's GID. -m mode Specifies the mode (in octal notation) of the root inode of the file system. Defaults to the mount point's mode. -n nodes Specifies the maximum number of nodes available to the file system. If not specified, the file system chooses a reasonable maxi- mum given its size at mount time, which can be limited with -s. -o options Options are specified with a -o flag followed by a comma-separated string of options. See the mount(8) man page for possible options and their meanings. -s size Specifies the total file system size in bytes. If zero is given (the default), the available amount of memory (including main memory and swap space) will be used. Note that four megabytes are always reserved for the system and cannot be assigned to the file system. -u user Specifies the user name or UID of the root inode of the file system. Defaults to the mount point's UID. Every option that accepts a numerical value as its argument can take a trailing 'b' to indicate bytes (the default), a trailing 'k' to indi- cate kilobytes, a trailing 'M' to indicate megabytes or a trailing 'G' to indicate gigabytes. Note that both lowercase and uppercase forms of these letters are allowed. EXAMPLES
The following command mounts a tmpfs instance over the /tmp directory, inheriting its owner, group and mode settings: mount -t tmpfs tmpfs /tmp The following command mounts a tmpfs instance over the /mnt directory, setting a 20 megabytes limit in space, owned by the 'joe' user and belonging to the 'users' group, with a restricted 0700 mode: mount -t tmpfs -o -s20M -o -ujoe -o -gusers -o -m0700 tmpfs /mnt See /usr/share/examples/fstab/fstab.ramdisk for some examples on how to add tmpfs entries to /etc/fstab. SEE ALSO
fstab(5), mount(8) HISTORY
The mount_tmpfs utility first appeared in NetBSD 4.0. BUGS
File system meta-data is not pageable. If there is not enough main memory to hold this information, the system may become unstable or very unresponsive because it will not be able to allocate required memory. A malicious user could trigger this condition if he could create lots of files inside a size-unbounded tmpfs file system. Limiting the number of nodes per file system (-n) will prevent this; the default value for this setting is also often adjusted to an adequate value to resolve this. BSD
February 13, 2008 BSD

Check Out this Related Man Page

mount_tmpfs(1M) 					  System Administration Commands					   mount_tmpfs(1M)

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 special argument is usually specified as swap but is in fact disregarded and assumed to be the virtual memory resources within the sys- tem. 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 avail- able: 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 inter- preted as a number of megabytes. 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(5) 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 errordevice busy. FILES
/etc/mnttab Table of mounted file systems ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
mount(1M), mkdir(2), mount(2), open(2), umount(2), mnttab(4), attributes(5), fsattr(5), tmpfs(7FS) 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 sym- bolic link refers, rather than on top of the symbolic link itself. SunOS 5.10 24 Nov 2003 mount_tmpfs(1M)
Man Page