Product SiteDocumentation Site

3.8.2. GFS File Attribute

The gfs_tool command can be used to assign (set) a direct I/O attribute flag, directio, to a GFS file. The directio flag can also be cleared.
You can use the gfs_tool stat filename to check what flags have been set for a GFS file. The output for this command includes a Flags: at the end of the display followed by a listing of the flags that are set for the indicated file.

Usage

Setting the directio Flag
gfs_tool setflag directio File
Clearing the directio Flag
gfs_tool clearflag directio File
File
Specifies the file where the directio flag is assigned.

Example

In this example, the command sets the directio flag on the file named datafile in directory /mnt/gfs.
gfs_tool setflag directio /mnt/gfs/datafile
The following command checks whether the directio flag is set for /mnt/gfs/datafile. The output has been elided to show only the relevant information.
[root@tng3-1 gfs]# gfs_tool stat /mnt/gfs/datafile
  mh_magic = 0x01161970
...

Flags:
  directio