Chapter 9. Managing GFS
97
9.7.1.
O_DIRECT
If an application uses the
O_DIRECT
flag on an
open()
system call, direct I/O is used for the opened
file.
To cause the
O_DIRECT
flag to be defined with recent glibc libraries, define
_GNU_SOURCE
at the
beginning of a source file before any includes, or define it on the
cc
line when compiling.
Note
Linux kernels from some distributions do not support use of the
O_DIRECT
flag.
9.7.2. GFS File Attribute
The
gfs_tool
command can be used to assign a direct I/O attribute flag,
directio
, to a regular
GFS file. The
directio
flag can also be cleared.
9.7.2.1. Usage
Set Direct I/O Attribute Flag
gfs_tool setflag
directio
File
Clear Direct I/O Attribute Flag
gfs_tool clearflag
directio
File
File
Specifies the file where the
directio
flag is assigned.
9.7.2.2. Example
In this example, the command sets the
directio
flag on the file named
datafile
in directory
/gfs1/
.
gfs_tool setflag directio /gfs1/datafile
9.7.3. GFS Directory Attribute
The
gfs_tool
command can be used to assign a direct I/O attribute flag,
inherit_directio
, to a
GFS directory. Enabling the
inherit_directio
flag on a directory causes all newly created regular
files in that directory to automatically inherit the
directio
flag. Also, the
inherit_directio
flag
is inherited by any new subdirectories created in the directory. The
inherit_directio
flag can also
be cleared.
Содержание GFS 5.2.1 -
Страница 1: ...Red Hat GFS 5 2 1 Administrator s Guide...
Страница 8: ......
Страница 14: ...vi Introduction...
Страница 24: ...10 Chapter 1 GFS Overview...
Страница 36: ...22 Chapter 4 Initial Configuration...
Страница 84: ...70 Chapter 6 Creating the Cluster Configuration System Files...
Страница 96: ...82 Chapter 8 Using Clustering and Locking Systems...
Страница 126: ...112 Chapter 10 Using the Fencing System...
Страница 132: ...118 Chapter 11 Using GNBD...
Страница 144: ...130 Appendix A Upgrading GFS...
Страница 184: ...170 Appendix B Basic GFS Examples...
Страница 190: ......
Страница 192: ...178...