1 |
1275 |
phoenix |
|
2 |
|
|
The SGI XFS Filesystem
|
3 |
|
|
======================
|
4 |
|
|
|
5 |
|
|
XFS is a high performance journaling filesystem which originated
|
6 |
|
|
on the SGI IRIX platform. It is completely multi-threaded, can
|
7 |
|
|
support large files and large filesystems, extended attributes,
|
8 |
|
|
variable block sizes, is extent based, and makes extensive use of
|
9 |
|
|
Btrees (directories, extents, free space) to aid both performance
|
10 |
|
|
and scalability.
|
11 |
|
|
|
12 |
|
|
Refer to the documentation at http://oss.sgi.com/projects/xfs/
|
13 |
|
|
for further details. This implementation is on-disk compatible
|
14 |
|
|
with the IRIX version of XFS.
|
15 |
|
|
|
16 |
|
|
|
17 |
|
|
Mount Options
|
18 |
|
|
=============
|
19 |
|
|
|
20 |
|
|
When mounting an XFS filesystem, the following options are accepted.
|
21 |
|
|
|
22 |
|
|
biosize=size
|
23 |
|
|
Sets the preferred buffered I/O size (default size is 64K).
|
24 |
|
|
"size" must be expressed as the logarithm (base2) of the
|
25 |
|
|
desired I/O size.
|
26 |
|
|
Valid values for this option are 14 through 16, inclusive
|
27 |
|
|
(i.e. 16K, 32K, and 64K bytes). On machines with a 4K
|
28 |
|
|
pagesize, 13 (8K bytes) is also a valid size.
|
29 |
|
|
The preferred buffered I/O size can also be altered on an
|
30 |
|
|
individual file basis using the ioctl(2) system call.
|
31 |
|
|
|
32 |
|
|
ikeep/noikeep
|
33 |
|
|
When inode clusters are emptied of inodes, keep them around
|
34 |
|
|
on the disk (ikeep) - this is the traditional XFS behaviour
|
35 |
|
|
and is still the default for now. Using the noikeep option,
|
36 |
|
|
inode clusters are returned to the free space pool.
|
37 |
|
|
|
38 |
|
|
logbufs=value
|
39 |
|
|
Set the number of in-memory log buffers. Valid numbers range
|
40 |
|
|
from 2-8 inclusive.
|
41 |
|
|
The default value is 8 buffers for filesystems with a
|
42 |
|
|
blocksize of 64K, 4 buffers for filesystems with a blocksize
|
43 |
|
|
of 32K, 3 buffers for filesystems with a blocksize of 16K
|
44 |
|
|
and 2 buffers for all other configurations. Increasing the
|
45 |
|
|
number of buffers may increase performance on some workloads
|
46 |
|
|
at the cost of the memory used for the additional log buffers
|
47 |
|
|
and their associated control structures.
|
48 |
|
|
|
49 |
|
|
logbsize=value
|
50 |
|
|
Set the size of each in-memory log buffer.
|
51 |
|
|
Size may be specified in bytes, or in kilobytes with a "k" suffix.
|
52 |
|
|
Valid sizes for version 1 and version 2 logs are 16384 (16k) and
|
53 |
|
|
32768 (32k). Valid sizes for version 2 logs also include
|
54 |
|
|
65536 (64k), 131072 (128k) and 262144 (256k).
|
55 |
|
|
The default value for machines with more than 32MB of memory
|
56 |
|
|
is 32768, machines with less memory use 16384 by default.
|
57 |
|
|
|
58 |
|
|
logdev=device and rtdev=device
|
59 |
|
|
Use an external log (metadata journal) and/or real-time device.
|
60 |
|
|
An XFS filesystem has up to three parts: a data section, a log
|
61 |
|
|
section, and a real-time section. The real-time section is
|
62 |
|
|
optional, and the log section can be separate from the data
|
63 |
|
|
section or contained within it.
|
64 |
|
|
|
65 |
|
|
noalign
|
66 |
|
|
Data allocations will not be aligned at stripe unit boundaries.
|
67 |
|
|
|
68 |
|
|
noatime
|
69 |
|
|
Access timestamps are not updated when a file is read.
|
70 |
|
|
|
71 |
|
|
norecovery
|
72 |
|
|
The filesystem will be mounted without running log recovery.
|
73 |
|
|
If the filesystem was not cleanly unmounted, it is likely to
|
74 |
|
|
be inconsistent when mounted in "norecovery" mode.
|
75 |
|
|
Some files or directories may not be accessible because of this.
|
76 |
|
|
Filesystems mounted "norecovery" must be mounted read-only or
|
77 |
|
|
the mount will fail.
|
78 |
|
|
|
79 |
|
|
nouuid
|
80 |
|
|
Don't check for double mounted file systems using the file system uuid.
|
81 |
|
|
This is useful to mount LVM snapshot volumes.
|
82 |
|
|
|
83 |
|
|
osyncisosync
|
84 |
|
|
Make O_SYNC writes implement true O_SYNC. WITHOUT this option,
|
85 |
|
|
Linux XFS behaves as if an "osyncisdsync" option is used,
|
86 |
|
|
which will make writes to files opened with the O_SYNC flag set
|
87 |
|
|
behave as if the O_DSYNC flag had been used instead.
|
88 |
|
|
This can result in better performance without compromising
|
89 |
|
|
data safety.
|
90 |
|
|
However if this option is not in effect, timestamp updates from
|
91 |
|
|
O_SYNC writes can be lost if the system crashes.
|
92 |
|
|
If timestamp updates are critical, use the osyncisosync option.
|
93 |
|
|
|
94 |
|
|
quota/usrquota/uqnoenforce
|
95 |
|
|
User disk quota accounting enabled, and limits (optionally)
|
96 |
|
|
enforced.
|
97 |
|
|
|
98 |
|
|
grpquota/gqnoenforce
|
99 |
|
|
Group disk quota accounting enabled and limits (optionally)
|
100 |
|
|
enforced.
|
101 |
|
|
|
102 |
|
|
sunit=value and swidth=value
|
103 |
|
|
Used to specify the stripe unit and width for a RAID device or
|
104 |
|
|
a stripe volume. "value" must be specified in 512-byte block
|
105 |
|
|
units.
|
106 |
|
|
If this option is not specified and the filesystem was made on
|
107 |
|
|
a stripe volume or the stripe width or unit were specified for
|
108 |
|
|
the RAID device at mkfs time, then the mount system call will
|
109 |
|
|
restore the value from the superblock. For filesystems that
|
110 |
|
|
are made directly on RAID devices, these options can be used
|
111 |
|
|
to override the information in the superblock if the underlying
|
112 |
|
|
disk layout changes after the filesystem has been created.
|
113 |
|
|
The "swidth" option is required if the "sunit" option has been
|
114 |
|
|
specified, and must be a multiple of the "sunit" value.
|
115 |
|
|
|
116 |
|
|
sysctls
|
117 |
|
|
=======
|
118 |
|
|
|
119 |
|
|
The following sysctls are available for the XFS filesystem:
|
120 |
|
|
|
121 |
|
|
fs.xfs.stats_clear (Min: 0 Default: 0 Max: 1)
|
122 |
|
|
Setting this to "1" clears accumulated XFS statistics
|
123 |
|
|
in /proc/fs/xfs/stat. It then immediately reset to "0".
|
124 |
|
|
|
125 |
|
|
fs.xfs.sync_interval (Min: HZ Default: 30*HZ Max: 60*HZ)
|
126 |
|
|
The interval at which the xfssyncd thread for xfs filesystems
|
127 |
|
|
flushes metadata out to disk. This thread will flush log
|
128 |
|
|
activity out, and do some processing on unlinked inodes
|
129 |
|
|
|
130 |
|
|
fs.xfs.error_level (Min: 0 Default: 3 Max: 11)
|
131 |
|
|
A volume knob for error reporting when internal errors occur.
|
132 |
|
|
This will generate detailed messages & backtraces for filesystem
|
133 |
|
|
shutdowns, for example. Current threshold values are:
|
134 |
|
|
|
135 |
|
|
XFS_ERRLEVEL_OFF: 0
|
136 |
|
|
XFS_ERRLEVEL_LOW: 1
|
137 |
|
|
XFS_ERRLEVEL_HIGH: 5
|
138 |
|
|
|
139 |
|
|
fs.xfs.panic_mask (Min: 0 Default: 0 Max: 127)
|
140 |
|
|
Causes certain error conditions to call BUG(). Value is a bitmask;
|
141 |
|
|
AND together the tags which represent errors which should cause panics:
|
142 |
|
|
|
143 |
|
|
XFS_NO_PTAG 0
|
144 |
|
|
XFS_PTAG_IFLUSH 0x00000001
|
145 |
|
|
XFS_PTAG_LOGRES 0x00000002
|
146 |
|
|
XFS_PTAG_AILDELETE 0x00000004
|
147 |
|
|
XFS_PTAG_ERROR_REPORT 0x00000008
|
148 |
|
|
XFS_PTAG_SHUTDOWN_CORRUPT 0x00000010
|
149 |
|
|
XFS_PTAG_SHUTDOWN_IOERROR 0x00000020
|
150 |
|
|
XFS_PTAG_SHUTDOWN_LOGERROR 0x00000040
|
151 |
|
|
|
152 |
|
|
This option is intended for debugging only.
|
153 |
|
|
|
154 |
|
|
fs.xfs.irix_symlink_mode (Min: 0 Default: 0 Max: 1)
|
155 |
|
|
Controls whether symlinks are created with mode 0777 (default)
|
156 |
|
|
or whether their mode is affected by the umask (irix mode).
|
157 |
|
|
|
158 |
|
|
fs.xfs.irix_sgid_inherit (Min: 0 Default: 0 Max: 1)
|
159 |
|
|
Controls files created in SGID directories.
|
160 |
|
|
If the group ID of the new file does not match the effective group
|
161 |
|
|
ID or one of the supplementary group IDs of the parent dir, the
|
162 |
|
|
ISGID bit is cleared if the irix_sgid_inherit compatibility sysctl
|
163 |
|
|
is set.
|
164 |
|
|
|
165 |
|
|
fs.xfs.restrict_chown (Min: 0 Default: 1 Max: 1)
|
166 |
|
|
Controls whether unprivileged users can use chown to "give away"
|
167 |
|
|
a file to another user.
|
168 |
|
|
|
169 |
|
|
fs.xfs.refcache_size (Min: 0 Default: 128 Max: 512)
|
170 |
|
|
Controls the size of the NFS refcache, which holds references
|
171 |
|
|
on files opened via NFS to improve performance. The value
|
172 |
|
|
is the maximum number of files which can be in the cache at
|
173 |
|
|
any one time.
|
174 |
|
|
|
175 |
|
|
fs.xfs.refcache_purge (Min: 0 Default: 32 Max: 512)
|
176 |
|
|
Controls the number of entries purged from the NFS refcache
|
177 |
|
|
every sync interval.
|
178 |
|
|
|
179 |
|
|
fs.xfs.inherit_sync (Min: 0 Default: 1 Max 1)
|
180 |
|
|
Setting this to "1" will cause the "sync" flag set
|
181 |
|
|
by the chattr(1) command on a directory to be
|
182 |
|
|
inherited by files in that directory.
|
183 |
|
|
|
184 |
|
|
fs.xfs.inherit_nodump (Min: 0 Default: 1 Max 1)
|
185 |
|
|
Setting this to "1" will cause the "nodump" flag set
|
186 |
|
|
by the chattr(1) command on a directory to be
|
187 |
|
|
inherited by files in that directory.
|
188 |
|
|
|
189 |
|
|
fs.xfs.inherit_noatime (Min: 0 Default: 1 Max 1)
|
190 |
|
|
Setting this to "1" will cause the "noatime" flag set
|
191 |
|
|
by the chattr(1) command on a directory to be
|
192 |
|
|
inherited by files in that directory.
|
193 |
|
|
|
194 |
|
|
vm.pagebuf.stats_clear (Min: 0 Default: 0 Max: 1)
|
195 |
|
|
Setting this to "1" clears accumulated pagebuf statistics
|
196 |
|
|
in /proc/fs/pagebuf/stat. It then immediately reset to "0".
|
197 |
|
|
|
198 |
|
|
vm.pagebuf.flush_age (Min: 1*HZ Default: 15*HZ Max: 300*HZ)
|
199 |
|
|
The age at which dirty metadata buffers are flushed to disk
|
200 |
|
|
|
201 |
|
|
vm.pagebuf.flush_int (Min: HZ/2 Default: HZ Max: 30*HZ)
|
202 |
|
|
The interval at which the list of dirty metadata buffers is
|
203 |
|
|
scanned.
|