Print this page
    
OS-4060 need tmpfs size support in percent
OS-4043 tmpfs should support gigabyte sizes
OS-4044 tmpfs should support "mode" option
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
    
      
        | Split | 
	Close | 
      
      | Expand all | 
      | Collapse all | 
    
    
          --- old/usr/src/man/man1m/mount_tmpfs.1m
          +++ new/usr/src/man/man1m/mount_tmpfs.1m
   1    1  '\" te
   2    2  .\"  Copyright (c) 2003, Sun Microsystems, Inc.  All Rights Reserved
   3      -.\"  Copyright (c) 2011, Joyent, Inc.  All Rights Reserved
        3 +.\"  Copyright 2015 Joyent, Inc.
   4    4  .\" 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.
   5    5  .\" 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.
   6    6  .\" 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]
   7      -.TH MOUNT_TMPFS 1M "Dec 2, 2011"
        7 +.TH MOUNT_TMPFS 1M "Mar 18, 2015"
   8    8  .SH NAME
   9    9  mount_tmpfs \- mount tmpfs file systems
  10   10  .SH SYNOPSIS
  11   11  .LP
  12   12  .nf
  13   13  \fBmount\fR [\fB-F\fR tmpfs] [\fB-o\fR \fIspecific_options\fR] [\fB-O\fR] \fIspecial\fR \fImount_point\fR
  14   14  .fi
  15   15  
  16   16  .SH DESCRIPTION
  17   17  .LP
  18   18  \fBtmpfs\fR is a memory based file system which uses kernel resources relating
  
    | 
      ↓ open down ↓ | 
    1 lines elided | 
    
      ↑ open up ↑ | 
  
  19   19  to the \fBVM\fR system and page cache as a file system.
  20   20  .sp
  21   21  .LP
  22   22  \fBmount\fR attaches a \fBtmpfs\fR file system to the file system hierarchy at
  23   23  the pathname location \fImount_point\fR, which must already exist. If
  24   24  \fImount_point\fR has any contents prior to the \fBmount\fR operation, these
  25   25  remain hidden until the file system is once again unmounted. The attributes
  26   26  (mode, owner, and group) of the root of the \fBtmpfs\fR filesystem are
  27   27  inherited from the underlying \fImount_point\fR, provided that those attributes
  28   28  are determinable. If not, the root's attributes are set to their default
  29      -values.
       29 +values. The mode may also be overriden by the \fBmode\fR mount option, which
       30 +takes precedence if set.
  30   31  .sp
  31   32  .LP
  32   33  The \fIspecial\fR argument is usually specified as \fBswap\fR but is in fact
  33   34  disregarded and assumed to be the virtual memory resources within the system.
  34   35  .SH OPTIONS
  35   36  .ne 2
  36   37  .na
  37   38  \fB\fB-o\fR \fIspecific_options\fR\fR
  38   39  .ad
  39   40  .RS 23n
  40   41  Specify \fBtmpfs\fR file system specific options in a comma-separated list with
  41   42  no intervening spaces. If invalid options are specified, a warning  message is
  42   43  printed and the invalid options are ignored. The following options are
  43   44  available:
  44   45  .sp
  45   46  .ne 2
  46   47  .na
  47   48  \fB\fBremount\fR\fR
  
    | 
      ↓ open down ↓ | 
    8 lines elided | 
    
      ↑ open up ↑ | 
  
  48   49  .ad
  49   50  .sp .6
  50   51  .RS 19n
  51   52  Remounts a file system with a new size. A size not explicitly
  52   53  set with \fBremount\fR reverts to no limit.
  53   54  .RE
  54   55  
  55   56  .sp
  56   57  .ne 2
  57   58  .na
       59 +\fBmode=\fIoctalmode\fR\fR
       60 +.ad
       61 +.RS 19n
       62 +The \fImode\fR argument controls the permissions of the \fBtmpfs\fR mount
       63 +point.  The argument must be an octal number, of the form passed to
       64 +\fBchmod\fR(1).  Only the access mode, setuid, setgid, and sticky bits (a mask
       65 +of \fB07777\fR) may be set.  If this option is not provided then the default
       66 +mode behaviour, as described above, applies.
       67 +.RE
       68 +
       69 +.sp
       70 +.sp
       71 +.ne 2
       72 +.na
  58   73  \fBsize=\fIsz\fR\fR
  59   74  .ad
  60   75  .RS 19n
  61   76  The \fIsz\fR argument controls the size of this particular \fBtmpfs\fR file
  62   77  system. If the argument is has a `k' suffix, the number will be interpreted as
  63   78  a number of kilobytes. An `m' suffix will be interpreted as a number of
  64      -megabytes. No suffix is interpreted as bytes. In all cases, the actual size of
       79 +megabytes. A `g' suffix will be interpreted as a number of gigabytes. A `%'
       80 +suffix will be interpreted as a percentage of the swap space available to the
       81 +zone. No suffix is interpreted as bytes. In all cases, the actual size of
  65   82  the file system is the number of bytes specified, rounded up to the physical
  66   83  pagesize of the system.
  67   84  .RE
  68   85  
  69   86  .sp
  70   87  .ne 2
  71   88  .na
  72   89  \fB\fBxattr\fR | \fBnoxattr\fR\fR
  73   90  .ad
  74   91  .RS 19n
  75   92  Allow or disallow the creation and manipulation of extended attributes. The
  76   93  default is \fBxattr\fR. See \fBfsattr\fR(5) for a description of extended
  77   94  attributes.
  78   95  .RE
  79   96  
  80   97  .RE
  81   98  
  82   99  .sp
  83  100  .ne 2
  84  101  .na
  85  102  \fB\fB-O\fR\fR
  86  103  .ad
  87  104  .RS 23n
  88  105  Overlay  mount. Allow the file system to be mounted over an existing mount
  89  106  point, making the underlying file system inaccessible. If a mount is attempted
  90  107  on a pre-existing mount point without setting this flag, the mount will fail,
  91  108  producing the error\f(CWdevice busy\fR.
  92  109  .RE
  93  110  
  94  111  .SH FILES
  95  112  .ne 2
  96  113  .na
  97  114  \fB\fB/etc/mnttab\fR\fR
  98  115  .ad
  99  116  .RS 15n
 100  117  Table of mounted file systems
 101  118  .RE
 102  119  
 103  120  .SH SEE ALSO
 104  121  .LP
 105  122  \fBmount\fR(1M), \fBmkdir\fR(2), \fBmount\fR(2), \fBopen\fR(2),
 106  123  \fBumount\fR(2), \fBmnttab\fR(4), \fBattributes\fR(5), \fBfsattr\fR(5),
 107  124  \fBtmpfs\fR(7FS)
 108  125  .SH NOTES
 109  126  .LP
 110  127  If the directory on which a file system is to be mounted is a symbolic link,
 111  128  the file system is mounted on the directory to which the symbolic link refers,
 112  129  rather than on top of the symbolic link itself.
  
    | 
      ↓ open down ↓ | 
    38 lines elided | 
    
      ↑ open up ↑ | 
  
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX