Red Hat Training

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

附錄 A. 將​​​​​​​ GFS 檔​​​​​​​案​​​​​​​系​​​​​​​統​​​​​​​轉​​​​​​​換​​​​​​​至​​​​​​​ GFS2

要​​​​​​​將​​​​​​​ GFS 檔​​​​​​​案​​​​​​​系​​​​​​​統​​​​​​​轉​​​​​​​換​​​​​​​至​​​​​​​ GFS2,請​​​​​​​使​​​​​​​用​​​​​​​ gfs2_convert 指​​​​​​​令​​​​​​​。​​​​​​​
  1. 將​​​​​​​叢​​​​​​​集​​​​​​​中​​​​​​​所​​​​​​​有​​​​​​​節​​​​​​​點​​​​​​​的​​​​​​​ GFS 檔​​​​​​​案​​​​​​​系​​​​​​​統​​​​​​​卸​​​​​​​載​​​​​​​。​​​​​​​
  2. 在​​​​​​​ GFS 檔​​​​​​​案​​​​​​​系​​​​​​​統​​​​​​​上​​​​​​​執​​​​​​​行​​​​​​​ gfs_fsck 指​​​​​​​令​​​​​​​,確​​​​​​​保​​​​​​​檔​​​​​​​案​​​​​​​系​​​​​​​統​​​​​​​沒​​​​​​​有​​​​​​​損​​​​​​​毀​​​​​​​。​​​​​​​
  3. 重​​​​​​​新​​​​​​​掛​​​​​​​載​​​​​​​並​​​​​​​備​​​​​​​份​​​​​​​現​​​​​​​有​​​​​​​的​​​​​​​ GFS 檔​​​​​​​案​​​​​​​系​​​​​​​統​​​​​​​。​​​​​​​
  4. 卸​​​​​​​載​​​​​​​檔​​​​​​​案​​​​​​​系​​​​​​​統​​​​​​​,執​​​​​​​行​​​​​​​ 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 ~]#