Product SiteDocumentation Site

Converting a File System from GFS to GFS2

Use the gfs2_convert command. To convert a GFS file system to a GFS2 file system.
  1. Unmount the GFS file system from all nodes in the cluster.
  2. Execute the gfs_fsck command on the GFS file system to ensure there is no file system corruption.
  3. Remount and make a backup of your existing GFS file system.
  4. Unmount the file system and execute gfs2_convert gfsfilesystem. The system will display warnings and confirmation questions before converting gfsfilesystem to GFS2.
The following example converts a GFS filesystem on block device /dev/testvg/testlv to a GFS2 filesystem.
[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 ~]#