linux/Documentation/filesystems/xfs.txt
<<
>>
Prefs
   1
   2The SGI XFS Filesystem
   3======================
   4
   5XFS is a high performance journaling filesystem which originated
   6on the SGI IRIX platform.  It is completely multi-threaded, can
   7support large files and large filesystems, extended attributes,
   8variable block sizes, is extent based, and makes extensive use of
   9Btrees (directories, extents, free space) to aid both performance
  10and scalability.
  11
  12Refer to the documentation at http://oss.sgi.com/projects/xfs/
  13for further details.  This implementation is on-disk compatible
  14with the IRIX version of XFS.
  15
  16
  17Mount Options
  18=============
  19
  20When mounting an XFS filesystem, the following options are accepted.
  21
  22  allocsize=size
  23        Sets the buffered I/O end-of-file preallocation size when
  24        doing delayed allocation writeout (default size is 64KiB).
  25        Valid values for this option are page size (typically 4KiB)
  26        through to 1GiB, inclusive, in power-of-2 increments.
  27
  28  attr2/noattr2
  29        The options enable/disable (default is disabled for backward
  30        compatibility on-disk) an "opportunistic" improvement to be
  31        made in the way inline extended attributes are stored on-disk.
  32        When the new form is used for the first time (by setting or
  33        removing extended attributes) the on-disk superblock feature
  34        bit field will be updated to reflect this format being in use.
  35
  36        CRC enabled filesystems always use the attr2 format, and so
  37        will reject the noattr2 mount option if it is set.
  38
  39  barrier
  40        Enables the use of block layer write barriers for writes into
  41        the journal and unwritten extent conversion.  This allows for
  42        drive level write caching to be enabled, for devices that
  43        support write barriers.
  44
  45  discard
  46        Issue command to let the block device reclaim space freed by the
  47        filesystem.  This is useful for SSD devices, thinly provisioned
  48        LUNs and virtual machine images, but may have a performance
  49        impact.
  50
  51  dmapi
  52        Enable the DMAPI (Data Management API) event callouts.
  53        Use with the "mtpt" option.
  54
  55  grpid/bsdgroups and nogrpid/sysvgroups
  56        These options define what group ID a newly created file gets.
  57        When grpid is set, it takes the group ID of the directory in
  58        which it is created; otherwise (the default) it takes the fsgid
  59        of the current process, unless the directory has the setgid bit
  60        set, in which case it takes the gid from the parent directory,
  61        and also gets the setgid bit set if it is a directory itself.
  62
  63  ihashsize=value
  64        In memory inode hashes have been removed, so this option has
  65        no function as of August 2007. Option is deprecated.
  66
  67  ikeep/noikeep
  68        When ikeep is specified, XFS does not delete empty inode clusters
  69        and keeps them around on disk. ikeep is the traditional XFS
  70        behaviour. When noikeep is specified, empty inode clusters
  71        are returned to the free space pool. The default is noikeep for
  72        non-DMAPI mounts, while ikeep is the default when DMAPI is in use.
  73
  74  inode64
  75        Indicates that XFS is allowed to create inodes at any location
  76        in the filesystem, including those which will result in inode
  77        numbers occupying more than 32 bits of significance.  This is
  78        the default allocation option. Applications which do not handle
  79        inode numbers bigger than 32 bits, should use inode32 option.
  80
  81  inode32
  82        Indicates that XFS is limited to create inodes at locations which
  83        will not result in inode numbers with more than 32 bits of
  84        significance. This is provided for backwards compatibility, since
  85        64 bits inode numbers might cause problems for some applications
  86        that cannot handle large inode numbers.
  87
  88  largeio/nolargeio
  89        If "nolargeio" is specified, the optimal I/O reported in
  90        st_blksize by stat(2) will be as small as possible to allow user
  91        applications to avoid inefficient read/modify/write I/O.
  92        If "largeio" specified, a filesystem that has a "swidth" specified
  93        will return the "swidth" value (in bytes) in st_blksize. If the
  94        filesystem does not have a "swidth" specified but does specify
  95        an "allocsize" then "allocsize" (in bytes) will be returned
  96        instead.
  97        If neither of these two options are specified, then filesystem
  98        will behave as if "nolargeio" was specified.
  99
 100  logbufs=value
 101        Set the number of in-memory log buffers.  Valid numbers range
 102        from 2-8 inclusive.
 103        The default value is 8 buffers for filesystems with a
 104        blocksize of 64KiB, 4 buffers for filesystems with a blocksize
 105        of 32KiB, 3 buffers for filesystems with a blocksize of 16KiB
 106        and 2 buffers for all other configurations.  Increasing the
 107        number of buffers may increase performance on some workloads
 108        at the cost of the memory used for the additional log buffers
 109        and their associated control structures.
 110
 111  logbsize=value
 112        Set the size of each in-memory log buffer.
 113        Size may be specified in bytes, or in kilobytes with a "k" suffix.
 114        Valid sizes for version 1 and version 2 logs are 16384 (16k) and
 115        32768 (32k).  Valid sizes for version 2 logs also include
 116        65536 (64k), 131072 (128k) and 262144 (256k).
 117        The default value for machines with more than 32MiB of memory
 118        is 32768, machines with less memory use 16384 by default.
 119
 120  logdev=device and rtdev=device
 121        Use an external log (metadata journal) and/or real-time device.
 122        An XFS filesystem has up to three parts: a data section, a log
 123        section, and a real-time section.  The real-time section is
 124        optional, and the log section can be separate from the data
 125        section or contained within it.
 126
 127  mtpt=mountpoint
 128        Use with the "dmapi" option.  The value specified here will be
 129        included in the DMAPI mount event, and should be the path of
 130        the actual mountpoint that is used.
 131
 132  noalign
 133        Data allocations will not be aligned at stripe unit boundaries.
 134
 135  noatime
 136        Access timestamps are not updated when a file is read.
 137
 138  norecovery
 139        The filesystem will be mounted without running log recovery.
 140        If the filesystem was not cleanly unmounted, it is likely to
 141        be inconsistent when mounted in "norecovery" mode.
 142        Some files or directories may not be accessible because of this.
 143        Filesystems mounted "norecovery" must be mounted read-only or
 144        the mount will fail.
 145
 146  nouuid
 147        Don't check for double mounted file systems using the file system uuid.
 148        This is useful to mount LVM snapshot volumes.
 149
 150  uquota/usrquota/uqnoenforce/quota
 151        User disk quota accounting enabled, and limits (optionally)
 152        enforced.  Refer to xfs_quota(8) for further details.
 153
 154  gquota/grpquota/gqnoenforce
 155        Group disk quota accounting enabled and limits (optionally)
 156        enforced.  Refer to xfs_quota(8) for further details.
 157
 158  pquota/prjquota/pqnoenforce
 159        Project disk quota accounting enabled and limits (optionally)
 160        enforced.  Refer to xfs_quota(8) for further details.
 161
 162  sunit=value and swidth=value
 163        Used to specify the stripe unit and width for a RAID device or
 164        a stripe volume.  "value" must be specified in 512-byte block
 165        units.
 166        If this option is not specified and the filesystem was made on
 167        a stripe volume or the stripe width or unit were specified for
 168        the RAID device at mkfs time, then the mount system call will
 169        restore the value from the superblock.  For filesystems that
 170        are made directly on RAID devices, these options can be used
 171        to override the information in the superblock if the underlying
 172        disk layout changes after the filesystem has been created.
 173        The "swidth" option is required if the "sunit" option has been
 174        specified, and must be a multiple of the "sunit" value.
 175
 176  swalloc
 177        Data allocations will be rounded up to stripe width boundaries
 178        when the current end of file is being extended and the file
 179        size is larger than the stripe width size.
 180
 181
 182sysctls
 183=======
 184
 185The following sysctls are available for the XFS filesystem:
 186
 187  fs.xfs.stats_clear            (Min: 0  Default: 0  Max: 1)
 188        Setting this to "1" clears accumulated XFS statistics
 189        in /proc/fs/xfs/stat.  It then immediately resets to "0".
 190
 191  fs.xfs.xfssyncd_centisecs     (Min: 100  Default: 3000  Max: 720000)
 192        The interval at which the xfssyncd thread flushes metadata
 193        out to disk.  This thread will flush log activity out, and
 194        do some processing on unlinked inodes.
 195
 196  fs.xfs.xfsbufd_centisecs      (Min: 50  Default: 100  Max: 3000)
 197        The interval at which xfsbufd scans the dirty metadata buffers list.
 198
 199  fs.xfs.age_buffer_centisecs   (Min: 100  Default: 1500  Max: 720000)
 200        The age at which xfsbufd flushes dirty metadata buffers to disk.
 201
 202  fs.xfs.error_level            (Min: 0  Default: 3  Max: 11)
 203        A volume knob for error reporting when internal errors occur.
 204        This will generate detailed messages & backtraces for filesystem
 205        shutdowns, for example.  Current threshold values are:
 206
 207                XFS_ERRLEVEL_OFF:       0
 208                XFS_ERRLEVEL_LOW:       1
 209                XFS_ERRLEVEL_HIGH:      5
 210
 211  fs.xfs.panic_mask             (Min: 0  Default: 0  Max: 127)
 212        Causes certain error conditions to call BUG(). Value is a bitmask;
 213        AND together the tags which represent errors which should cause panics:
 214
 215                XFS_NO_PTAG                     0
 216                XFS_PTAG_IFLUSH                 0x00000001
 217                XFS_PTAG_LOGRES                 0x00000002
 218                XFS_PTAG_AILDELETE              0x00000004
 219                XFS_PTAG_ERROR_REPORT           0x00000008
 220                XFS_PTAG_SHUTDOWN_CORRUPT       0x00000010
 221                XFS_PTAG_SHUTDOWN_IOERROR       0x00000020
 222                XFS_PTAG_SHUTDOWN_LOGERROR      0x00000040
 223
 224        This option is intended for debugging only.
 225
 226  fs.xfs.irix_symlink_mode      (Min: 0  Default: 0  Max: 1)
 227        Controls whether symlinks are created with mode 0777 (default)
 228        or whether their mode is affected by the umask (irix mode).
 229
 230  fs.xfs.irix_sgid_inherit      (Min: 0  Default: 0  Max: 1)
 231        Controls files created in SGID directories.
 232        If the group ID of the new file does not match the effective group
 233        ID or one of the supplementary group IDs of the parent dir, the
 234        ISGID bit is cleared if the irix_sgid_inherit compatibility sysctl
 235        is set.
 236
 237  fs.xfs.inherit_sync           (Min: 0  Default: 1  Max: 1)
 238        Setting this to "1" will cause the "sync" flag set
 239        by the xfs_io(8) chattr command on a directory to be
 240        inherited by files in that directory.
 241
 242  fs.xfs.inherit_nodump         (Min: 0  Default: 1  Max: 1)
 243        Setting this to "1" will cause the "nodump" flag set
 244        by the xfs_io(8) chattr command on a directory to be
 245        inherited by files in that directory.
 246
 247  fs.xfs.inherit_noatime        (Min: 0  Default: 1  Max: 1)
 248        Setting this to "1" will cause the "noatime" flag set
 249        by the xfs_io(8) chattr command on a directory to be
 250        inherited by files in that directory.
 251
 252  fs.xfs.inherit_nosymlinks     (Min: 0  Default: 1  Max: 1)
 253        Setting this to "1" will cause the "nosymlinks" flag set
 254        by the xfs_io(8) chattr command on a directory to be
 255        inherited by files in that directory.
 256
 257  fs.xfs.rotorstep              (Min: 1  Default: 1  Max: 256)
 258        In "inode32" allocation mode, this option determines how many
 259        files the allocator attempts to allocate in the same allocation
 260        group before moving to the next allocation group.  The intent
 261        is to control the rate at which the allocator moves between
 262        allocation groups when allocating extents for new files.
 263