1 '\" te
   2 .\"  Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
   3 .\" 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.
   4 .\" 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.
   5 .\" 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]
   6 .TH MOUNT_CACHEFS 1M "Mar 18, 2004"
   7 .SH NAME
   8 mount_cachefs \- mount CacheFS file systems
   9 .SH SYNOPSIS
  10 .LP
  11 .nf
  12 \fBmount\fR \fB-F\fR cachefs [\fIgeneric_options\fR] \fB-o\fR backfstype=\fIfile_system_type\fR
  13      [\fIspecific_options\fR]
  14      [\fB-O\fR] \fIspecial\fR \fImount_point\fR
  15 .fi
  16 
  17 .SH DESCRIPTION
  18 .sp
  19 .LP
  20 The CacheFS-specific version of the \fBmount\fR command mounts a cached file
  21 system; if necessary, it NFS-mounts its back file system. It also provides a
  22 number of CacheFS-specific options for controlling the caching process. For
  23 more information regarding back file systems, refer to the \fI\fR.
  24 .sp
  25 .LP
  26 \fBmount_cachefs\fR cannot be used with replicated NFS mounts.
  27 \fBmount_cachefs\fR creates a pass through when used with an NFS version 4
  28 mount. No caching is performed.
  29 .SH OPTIONS
  30 .sp
  31 .LP
  32 To mount a CacheFS file system, use the generic \fBmount\fR command with the
  33 \fB-F\fR option followed by the argument \fBcachefs\fR.
  34 .sp
  35 .LP
  36 See \fBmount\fR(1M) for a list of supported \fIgeneric_options\fR.
  37 .sp
  38 .ne 2
  39 .na
  40 \fB\fB\fR\fB-o\fR\fB \fR\fIspecific_options\fR\fR
  41 .ad
  42 .RS 23n
  43 Specify CacheFS file system specific options in a comma-separated list with no
  44 intervening spaces.
  45 .sp
  46 .ne 2
  47 .na
  48 \fB\fBacdirmax=\fR\fIn\fR\fR
  49 .ad
  50 .sp .6
  51 .RS 4n
  52 Specifies that cached attributes are held for no more than \fIn\fR seconds
  53 after directory update. After \fIn\fR seconds, all directory information is
  54 purged from the cache. The default value is \fB30\fR seconds.
  55 .RE
  56 
  57 .sp
  58 .ne 2
  59 .na
  60 \fB\fBacdirmin=\fR\fIn\fR\fR
  61 .ad
  62 .sp .6
  63 .RS 4n
  64 Specifies that cached attributes are held for at least \fIn\fR seconds after
  65 directory update. After \fIn\fR seconds, CacheFS checks to see if the directory
  66 modification time on the back file system has changed. If it has, all
  67 information about the directory is purged from the cache and new data is
  68 retrieved from the back file system. The default value is \fB30\fR seconds.
  69 .RE
  70 
  71 .sp
  72 .ne 2
  73 .na
  74 \fB\fBacregmax=\fR\fIn\fR\fR
  75 .ad
  76 .sp .6
  77 .RS 4n
  78 Specifies that cached attributes are held for no more than \fIn\fR seconds
  79 after file modification. After \fIn\fR seconds, all file information is purged
  80 from the cache. The default value is \fB30\fR seconds.
  81 .RE
  82 
  83 .sp
  84 .ne 2
  85 .na
  86 \fB\fBacregmin=\fR\fIn\fR\fR
  87 .ad
  88 .sp .6
  89 .RS 4n
  90 Specifies that cached attributes are held for at least \fIn\fR seconds after
  91 file modification. After \fIn\fR seconds, CacheFS checks to see if the file
  92 modification time on the back file system has changed. If it has, all
  93 information about the file is purged from the cache and new data is retrieved
  94 from the back file system. The default value is \fB30\fR seconds.
  95 .RE
  96 
  97 .sp
  98 .ne 2
  99 .na
 100 \fB\fBactimeo=\fR\fIn\fR\fR
 101 .ad
 102 .sp .6
 103 .RS 4n
 104 Sets \fBacregmin\fR, \fBacregmax\fR, \fBacdirmin\fR, and \fBacdirmax\fR to
 105 \fIn\fR.
 106 .RE
 107 
 108 .sp
 109 .ne 2
 110 .na
 111 \fB\fBbackfstype=\fR\fIfile_system_type\fR\fR
 112 .ad
 113 .sp .6
 114 .RS 4n
 115 The file system type of the back file system (can be \fBnfs\fR or \fBhsfs\fR).
 116 .RE
 117 
 118 .sp
 119 .ne 2
 120 .na
 121 \fB\fBbackpath=\fR\fIpath\fR\fR
 122 .ad
 123 .sp .6
 124 .RS 4n
 125 Specifies where the back file system is already mounted. If this argument is
 126 not supplied, CacheFS determines a mount point for the back file system. The
 127 back file system must be read-only.
 128 .RE
 129 
 130 .sp
 131 .ne 2
 132 .na
 133 \fB\fBcachedir=\fR\fIdirectory\fR\fR
 134 .ad
 135 .sp .6
 136 .RS 4n
 137 The name of the cache directory.
 138 .RE
 139 
 140 .sp
 141 .ne 2
 142 .na
 143 \fB\fBcacheid=\fR\fIID\fR\fR
 144 .ad
 145 .sp .6
 146 .RS 4n
 147 \fIID\fR is a string specifying a particular instance of a cache. If you do not
 148 specify a cache ID, CacheFS will construct one.
 149 .RE
 150 
 151 .sp
 152 .ne 2
 153 .na
 154 \fB\fBdemandconst\fR\fR
 155 .ad
 156 .sp .6
 157 .RS 4n
 158 Verifies cache consistency only when explicitly requested, rather than the
 159 periodic checking that is done by default. A consistency check is requested by
 160 using the \fB-s\fR option of the \fBcfsadmin\fR(1M) command. This option is
 161 useful for back file systems that change infrequently, for example,
 162 \fB/usr/openwin\fR. \fBdemandconst\fR and \fBnoconst\fR are mutually exclusive.
 163 .RE
 164 
 165 .sp
 166 .ne 2
 167 .na
 168 \fB\fBlocal-access\fR\fR
 169 .ad
 170 .sp .6
 171 .RS 4n
 172 Causes the front file system to interpret the mode bits used for access
 173 checking instead of having the back file system verify access permissions. Do
 174 not use this argument with secure \fBNFS\fR.
 175 .RE
 176 
 177 .sp
 178 .ne 2
 179 .na
 180 \fB\fBnoconst\fR\fR
 181 .ad
 182 .sp .6
 183 .RS 4n
 184 Disables cache consistency checking. By default, periodic consistency checking
 185 is enabled. Specify \fBnoconst\fR only when you know that the back file system
 186 will not be modified. Trying to perform cache consistency check using
 187 \fBcfsadmin\fR \fB-s\fR will result in error. \fBdemandconst\fR and
 188 \fBnoconst\fR are mutually exclusive.
 189 .RE
 190 
 191 .sp
 192 .ne 2
 193 .na
 194 \fB\fBwrite-around\fR | \fBnon-shared\fR\fR
 195 .ad
 196 .sp .6
 197 .RS 4n
 198 Write modes for CacheFS. The \fBwrite-around\fR mode (the default) handles
 199 writes the same as \fBNFS\fR does; that is, writes are made to the back file
 200 system, and the affected file is purged from the cache. You can use the
 201 \fBnon-shared\fR mode when you are sure that no one else will be writing to the
 202 cached file system. In this mode, all writes are made to both the front and the
 203 back file system, and the file remains in the cache.
 204 .RE
 205 
 206 .RE
 207 
 208 .sp
 209 .ne 2
 210 .na
 211 \fB\fB-O\fR\fR
 212 .ad
 213 .RS 23n
 214 Overlay mount. Allows the filesystem to be mounted over an existing mount
 215 point, making the underlying filesystem inaccessible. If a mount is attempted
 216 on a pre-existing mount point without setting this flag, mount will fail with
 217 the error: \fBmount \fR\fB-F\fR\fB cachefs: mount failed Device busy\fR.
 218 .RE
 219 
 220 .SH EXAMPLES
 221 .LP
 222 \fBExample 1 \fRCacheFS-mounting a File System
 223 .sp
 224 .LP
 225 The following example CacheFS-mounts the file system \fBserver1:/user2\fR,
 226 which is already NFS-mounted on \fB/usr/abc\fR as \fB/xyz\fR.
 227 
 228 .sp
 229 .in +2
 230 .nf
 231 example# mount -F cachefs -o backfstype=nfs,backpath=/usr/abc,
 232      cachedir=/cache1 server1:/user2 /xyz
 233 .fi
 234 .in -2
 235 .sp
 236 
 237 .sp
 238 .LP
 239 The lines similar to the following appear in the \fB/etc/mnttab\fR file after
 240 the \fBmount\fR command is executed:
 241 
 242 .sp
 243 .in +2
 244 .nf
 245 server1:/user2   /usr/abc        nfs
 246 /usr/abc         /cache1/xyz    cachefs     backfstype=nfs
 247 .fi
 248 .in -2
 249 .sp
 250 
 251 .SH SEE ALSO
 252 .sp
 253 .LP
 254 \fBcfsadmin\fR(1M), \fBfsck_cachefs\fR(1M), \fBmount\fR(1M),
 255 \fBattributes\fR(5) \fI\fR
 256 .SH BUGS
 257 .sp
 258 .LP
 259 The output for the \fIgeneric_option\fR \fB-p\fR output is incorrect for
 260 \fBcachefs\fR.