Its a two Node cluster without any fencing device. I am trying to show you here the basic commands which we can use to check the status of cluster these commands are also helpful from interview prospective.
How to check the version of cluster ?
[root@Node2 ~]# cman_tool -V
cman_tool 18.104.22.168 (built May 8 2012 12:22:25)
Copyright (C) Red Hat, Inc. 2004-2010 All rights reserved.
How to list the gfs2 file system present on server ?
GFS file system can be mounted simultaneously on multiple nodes. To check on how many nodes it is mounted.
[root@Node2 ~]# gfs2_control ls
flags 0x00000008 mounted
change member 2 joined 1 remove 0 failed 0 seq 1,1
members 1 2
How to list the fence device support for the cluster nodes?
Fencing device is used in cluster to make sure that cluster nodes which are separated from cluster will not try to write on shared device at same time.
[root@Node2 ~]# ccs_tool lsfence
ccs_tool: Can’t find “fencedevices” in /etc/cluster/cluster.conf
How to see any node is fenced from cluster?
How to see any node in cluster is fenced or not. Here I am not having fencing device as mentioned earlier.
[root@Node2 ~]# fence_tool ls
member count 2
victim count 0
victim now 0
master nodeid 1
wait state none
members 1 2
How to list the journals of file system?
Journals are help to contain metadata. These help to achieve better performance in file system. Journal count at minimum should be equal to node count.
[root@Node2 ~]# gfs2_tool journals /dev/mapper/cluster_vg-cluster_lv
journal2 – 128MB
journal1 – 128MB
journal0 – 128MB
3 journal(s) found.
How to list the tuning parameters for cluster?
We can use this parameter to improve the performance of file system.
[root@Node2 ~]# gfs2_tool gettune /dev/mapper/cluster_vg-cluster_lv
incore_log_blocks = 1024
log_flush_secs = 60
quota_warn_period = 10
quota_quantum = 60
max_readahead = 262144
complain_secs = 10
statfs_slow = 0
quota_simul_sync = 64
statfs_quantum = 30
quota_scale = 1.0000 (1, 1)
new_files_jdata = 0
How to list the superblock of GFS2 file system?
Superblock contains the information related to whole file system Use the below command to retrieve the superblock information of GFS file system.
[root@Node2 ~]# gfs2_tool sb /dev/mapper/cluster_vg-cluster_lv all
mh_magic = 0x01161970
mh_type = 1
mh_format = 100
sb_fs_format = 1801
sb_multihost_format = 1900
sb_bsize = 4096
sb_bsize_shift = 12
no_formal_ino = 2
no_addr = 23
no_formal_ino = 1
no_addr = 22
sb_lockproto = lock_dlm
sb_locktable = MysqlCluster:gfs2
uuid = f5a6304d-d176-a83d-75db-b3c9f8739ed3