GFS2 学习

一 mount选项使用noatime与nodiratime

这样会更快。

2.5.1. Mount Options: noatime and nodiratime
It is generally recommended to mount GFS2 file systems with the noatime and nodiratime arguments. This allows GFS2 to spend less time updating disk inodes for every access. For more information on the effect of these arguments on GFS2 file system performance, see Section 2.9, “GFS2 Node Locking”.
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/global_file_system_2/s1-usage-gfs2#s2-recommendedmount-gfs2

二 NFS的相关考虑

(1) 只支持active/passive模式
2.5.4. Setting Up NFS Over GFS2
Red Hat supports only Red Hat High Availability Add-On configurations using NFSv3 with locking in an active/passive configuration with the following characteristics:

(2) 只能从集群的单一节点访问,或者说只支持单虚拟IP。即使是多虚拟IP, 这些IP也只能在一个节点上。
An NFSv3 server is defined as a service exporting the entire GFS2 file system from a single cluster node at a time.

The NFS server can fail over from one cluster node to another (active/passive configuration).

三 不支持NFS/Samba混合使用,也不支持对GFS2的本地操作。所以需要把CTDB, Pacemaker的共享文件放在独立的GFS2上,而不是放在Nas共享的GFS2上。
No access to the GFS2 file system is allowed except through the NFS server. This includes both local GFS2 file system access as well as access through Samba or Clustered Samba.

四 不支持NFS quota
There is no NFS quota support on the system.

五 NFS的导出中需要加入fsid=NFS
The fsid= NFS option is mandatory for NFS exports of GFS2.

六 Samba支持active/active模式,但对samba共享的数据禁止samba之外的方式接入。
2.5.5. Samba (SMB or Windows) File Serving Over GFS2
You can use Samba (SMB or Windows) file serving from a GFS2 file system with CTDB, which allows active/active configurations.

Simultaneous access to the data in the Samba share from outside of Samba is not supported.

七 如果使用reboot来重启机器而没有umount GFS2文件系统,会导致机器挂起。如果使用pacemaker管理GFS2的mount,在重启时,pacemaker会自动umount掉GFS2。如果是手动mount GFS2,重启前务必umount GFS2,否则reboot不起作用,只能硬重启。
GFS2 file systems that have been mounted manually rather than automatically through Pacemaker will not be known to the system when file systems are unmounted at system shutdown. As a result, the GFS2 script will not unmount the GFS2 file system. After the GFS2 shutdown script is run, the standard shutdown process kills off all remaining user processes, including the cluster infrastructure, and tries to unmount the file system. This unmount will fail without the cluster infrastructure and the system will hang.
 To prevent the system from hanging when the GFS2 file systems are unmounted, you should do one of the following:

    Always use Pacemaker to manage the GFS2 file system. For information on configuring a GFS2 file system in a Pacemaker cluster, see Chapter 5, Configuring a GFS2 File System in a Cluster.
    If a GFS2 file system has been mounted manually with the mount command, be sure to unmount the file system manually with the umount command before rebooting or shutting down the system.

If your file system hangs while it is being unmounted during system shutdown under these circumstances, perform a hardware reboot. It is unlikely that any data will be lost since the file system is synced earlier in the shutdown process.

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/global_file_system_2/s1-mount-considerations

猜你喜欢

转载自www.cnblogs.com/longchang/p/11093036.html
GFS