Red Hat Training
A Red Hat training course is available for Red Hat Enterprise Linux
1.2.2. GFS 與 GFS2 的其他不同之處
This section summarizes the additional differences in GFS and GFS2 administration that are not described in 節 1.2.1, “GFS2 指令名稱”.
1.2.2.1. 本文相關的路徑名稱
GFS2 file systems do not provide support for context-dependent path names, which allow you to create symbolic links that point to variable destination files or directories. For this functionality in GFS2, you can use the
bind
option of the mount
command. For information on managing pathnames in GFS2, see 節 3.12, “Bind 掛載與本文相關的路徑名稱”.
1.2.2.2. gfs2.ko 模組
GFS 檔案系統的核心模組是
gfs.ko
。GFS2 檔案系統的核心模組是 gfs2.ko
。
1.2.2.3. 啟用 GFS2 的強化配額功能
In GFS2 file systems, quota enforcement is disabled by default and must be explicitly enabled. To enable and disable quotas for GFS2 file systems, you use the
quota=on|off|account
option for the mount
command. For information on enabling and disabling quota enforcement, see 節 3.5.4, “啟用/停用磁碟配額執行”.
1.2.2.4. 資料日誌
GFS2 file systems support the use of the
chattr
command to set and clear the j
flag on a file or directory. Setting the +j
flag on a file enables data journaling on that file. Setting the +j
flag on a directory means "inherit jdata", which indicates that all files and directories subsequently created in that directory are journaled. Using the chattr
command is the preferred way to enable and disable data journaling on a file.
1.2.2.5. 動態新增日誌
In GFS file systems, journals are embedded metadata that exists outside of the file system, making it necessary to extend the size of the logical volume that contains the file system before adding journals. In GFS2 file systems, journals are plain (though hidden) files. This means that for GFS2 file systems, journals can be dynamically added as additional servers mount a filesystem, as long as space remains on the file system for the additional journals. For information on adding journals to a GFS2 file system, see 節 3.7, “新增日誌至檔案系統”.
1.2.2.6. 移除 atime_quantum 參數
GFS2 檔案系統並不支援
atime_quantum
這調整選項。GFS 檔案系統中的這個選項是用來決定 atime
更新多久會發生一次。GFS2 支援的是 relatime
與 noatime
掛載選項,前者可以用來達成 GFS atime_quantum
參數類似的功能。
1.2.2.7. 掛載指令的「data=」選項
掛載 GFS2 檔案系統時,您可以指定
mount
指令的 data=ordered
或 data=writeback
選項。當 data=ordered
被設置了之後,經過一項交易所被修改的用戶資料會在該交易被載入磁碟中之前被 flush 至磁碟中。這可避免用戶在當機後在檔案中看見未初始化區塊。當設為 data=writeback
模式後,任何時候只要用戶資料被標示不完整(dirty)的話,該用戶資料便會被寫入磁碟中;這無法提供和 ordered
模式相同的一致性保證,不過它對於某些工作來說速度會較快。預設值為 ordered
模式。
1.2.2.8. gfs2_tool 指令
GFS2 的
gfs2_tool
指令支援的多種選項,與 GFS 的 gfs_tool
指令不同:
gfs2_tool
指令支援journals
參數,它會印出關於目前設定的日誌之資訊,包括檔案系統包含多少日誌。gfs2_tool
指令並不支援counters
旗標,這旗標是gfs_tool
指令用來顯示 GFS 統計資料用的。- The
gfs2_tool
command does not support theinherit_jdata
flag. To flag a directory as "inherit jdata", you can set thejdata
flag on the directory or you can use thechattr
command to set the+j
flag on the directory. Using thechattr
command is the preferred way to enable and disable data journaling on a file.
1.2.2.9. gfs2_edit 指令
gfs2_edit
指令支援多種 GFS2 的選項,多於 GFS 的gfs_edit
指令。