Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

1.5. Replacement Functions for gfs2_tool in Red Hat Enterprise Linux 7

The gfs2_tool command is not supported in Red Hat Enterprise Linux 7. Table 1.2, “gfs2_tool Equivalent Functions in Red Hat Enterprise Linux 7” summarizes the equivalent functionality for the gfs2_tool command options in Red Hat Enterprise Linux 7.

Table 1.2. gfs2_tool Equivalent Functions in Red Hat Enterprise Linux 7

gfs2_tool optionReplacement Functionality
clearflag Flag File1 File2 ...
Clear an attribute flag on a file
Linux standard chattr command
freeze mountpoint
Freeze (quiesce) a GFS2 file system
Linux standard fsfreeze -f mountpoint command
gettune mountpoint
Print out current values of tuning parameters
For many cases, has been replaced by mount (get mount options). Other tuning parameters may be fetched from the respective sysfs files: /sys/fs/gfs2/dm-3/tune/*.
journals mountpoint
Print out information on the journals in a GFS2 file system
Information about journals can be fetched with gfs2_edit -p journals device. You can run this command when the file system is mounted.
# gfs2_edit -p journals /dev/clus_vg/lv1 
Block #Journal Status:       of 2620416 (0x27fc00) 
-------------------- Journal List --------------------
journal0: 0x14    128MB clean.
journal1: 0x805b  128MB clean.
------------------------------------------------------
lockdump mountpoint
Print out information about the locks this machine holds for a given file system
The GFS2 lock information may be obtained by mounting debugfs, then executing a command like such as the following:
# cat /sys/kernel/debug/gfs2/clustername:file_system_name/glocks
sb device proto [newvalue]
View (and possibly replace) the locking protocol
To fetch the current value of the locking protocol, you can use the following command:
# tunegfs2 -l device | grep protocol
To replace the current value of the locking protocol, you can use the following command:
# tunegfs2 -o lockproto=lock_dlm device
sb device table [newvalue]
View (and possibly replace) the name of the locking table
To fetch the current value of the name of the locking table, you can use the following command:
# tunegfs2 -l device | grep table
To replace the current value of the name of the locking table, you can use the following command:
# tunegfs2 -o locktable=file_system_name device
sb device ondisk [newvalue]
View (and possibly replace) the ondisk format number
Do not perform this task.
sb device multihost [newvalue]
View (and possibly replace) the multihost format number
Do not perform this task.
sb device uuid [newvalue]
View (and possibly replace) the uuid value
To fetch the current value of the uuid , you can use the following command:
# tunegfs2 -l device | grep UUID
To replace the current value of the uuid, you can use the following command:
# tunegfs2 -U uuid device
sb device all
Print out the GFS2 superblock
# tunegfs2 -l device
setflag Flag File1 File2 ...
Sets an attribute flag on a file
Linux standard chattr command
settune mountpoint parameter newvalue
Set the value of a tuning parameter
For many cases, has been replaced by mount (-o remount with options). Other tuning parameters may be set by the respective sysfs files: /sys/fs/gfs2/cluster_name:file_system_name/tune/*
unfreeze mountpoint
Unfreeze a GFS2 file system
Linux standard fsfreeze -unfreeze mountpoint command
version
Displays version of the gfs2_tool command
N/A
withdraw mountpoint
Cause GFS2 to abnormally shutdown a given file system
# echo 1 > /sys/fs/gfs2/cluster_name:file_system_name/tune/withdraw