Red Hat Training
A Red Hat training course is available for Red Hat Enterprise Linux
附錄 A. 將 GFS 檔案系統轉換至 GFS2
要將 GFS 檔案系統轉換至 GFS2,請使用
gfs2_convert
指令。
- 將叢集中所有節點的 GFS 檔案系統卸載。
- 在 GFS 檔案系統上執行
gfs_fsck
指令,確保檔案系統沒有損毀。 - 重新掛載並備份現有的 GFS 檔案系統。
- 卸載檔案系統,執行
gfs2_convert
。將gfsfilesystem
gfsfilesystem
轉換至 GFS2 之前,系統會顯示警告與確認提示。
以下範例將區塊裝置
/dev/testvg/testlv
上的 GFS 檔案系統轉換至 GFS2 檔案系統。
[root@dash-01 ~]#gfs2_convert /dev/testvg/testlv
gfs2_convert version 2 (built Sep 25 2007 12:41:29) Copyright (C) Red Hat, Inc. 2004-2006 All rights reserved. This program will convert a gfs1 filesystem to a gfs2 filesystem. WARNING: This can't be undone. It is strongly advised that you: 1. Back up your entire filesystem first. 2. Run gfs_fsck first to ensure filesystem integrity. 3. Make sure the filesystem is NOT mounted from any node. 4. Make sure you have the latest software versions. Convert /dev/testvg/testlv from GFS1 to GFS2? (y/n)y
Converting resource groups. Converting inodes. 6 inodes converted. Fixing file and directory information. 1 directories, 2 dirents fixed. Converting journals. Converting journal space to rg space. Building system structures. Removing obsolete gfs1 structures. Committing changes to disk. /dev/gfs2testvg/gfs2testlv: filesystem converted successfully to gfs2. [root@dash-01 ~]#