Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mkfs.gfs2(8) [debian man page]

mkfs.gfs2(8)						      System Manager's Manual						      mkfs.gfs2(8)

NAME
mkfs.gfs2 - Make a GFS2 filesystem SYNOPSIS
mkfs.gfs2 [OPTION]... DEVICE [ block-count ] DESCRIPTION
mkfs.gfs2 is used to create a Global File System. OPTIONS
-b BlockSize Set the filesystem block size to BlockSize (must be a power of two). The minimum block size is 512. The FS block size cannot exceed the machine's memory page size. On the most architectures (i386, x86_64, s390, s390x), the memory page size is 4096 bytes. On other architectures it may be bigger. The default block size is 4096 bytes. In general, GFS2 filesystems should not deviate from the default value. -c MegaBytes Initial size of each journal's quota change file -D Enable debugging output. -h Print out a help message describing available options, then exit. -J MegaBytes The size of the journals in Megabytes. The default journal size is 128 megabytes. The minimum size is 8 megabytes. -j Number The number of journals for gfs2_mkfs to create. You need at least one journal per machine that will mount the filesystem. If this option is not specified, one journal will be created. -O This option prevents gfs2_mkfs from asking for confirmation before writing the filesystem. -p LockProtoName LockProtoName is the name of the locking protocol to use. Acceptable locking protocols are lock_dlm (for shared storage) or if you are using GFS2 as a local filesystem (1 node only), you can specify the lock_nolock protocol. If this option is not specified, lock_dlm protocol will be assumed. -q Be quiet. Don't print anything. -r MegaBytes gfs2_mkfs will try to make Resource Groups about this big. Minimum RG size is 32 MB. Maximum RG size is 2048 MB. A large RG size may increase performance on very large file systems. If not specified, mkfs.gfs2 will choose the RG size based on the size of the file system: average size file systems will have 256 MB RGs, and bigger file systems will have bigger RGs for better performance. -t LockTableName The lock table field appropriate to the lock module you're using. It is clustername:fsname. Clustername must match that in clus- ter.conf; only members of this cluster are permitted to use this file system. Fsname is a unique file system name used to distin- guish this GFS2 file system from others created (1 to 16 characters). Lock_nolock doesn't use this field. -u MegaBytes Initial size of each journal's unlinked tag file -V Print program version information, then exit. [ block-count ] Make the file system this many blocks in size. If not specified, the entire length of the specified device is used. EXAMPLE
gfs2_mkfs -t mycluster:mygfs2 -p lock_dlm -j 2 /dev/vg0/mygfs2 This will make a Global File System on the block device "/dev/vg0/mygfs2". It will belong to "mycluster" and register itself as wanting locking for "mygfs2". It will use DLM for locking and make two journals. gfs2_mkfs -t mycluster:mygfs2 -p lock_nolock -j 3 /dev/vg0/mygfs2 This will make a Global File System on the block device "/dev/vg0/mygfs2". It will belong to "mycluster" and but have no cluster locking. It will have three journals. mkfs.gfs2(8)

Check Out this Related Man Page

fsck.gfs2(8)						      System Manager's Manual						      fsck.gfs2(8)

NAME
fsck.gfs2 - Offline GFS and GFS2 file system checker SYNOPSIS
fsck.gfs2 [OPTION]... DEVICE WARNING
All computers must have the filesystem unmounted before running fsck.gfs2. Failure to unmount from all nodes in a cluster will likely result in filesystem corruption. DESCRIPTION
fsck.gfs2 will check that the GFS or GFS2 file system on a device is structurally valid. It should not be run on a mounted file system. If file system corruption is detected, it will attempt to repair the file system. There is a limit to what fsck.gfs2 can do. If important file system structures are destroyed, such that the checker cannot determine what the repairs should be, reparations could fail. GFS2 is a journaled file system, and as such should be able to repair damage to the file system on its own. However, faulty hardware has the ability to write incomplete blocks to a file system thereby causing corruption that GFS2 cannot fix. The first step to ensuring a healthy file system is the selection of reliable hardware (i.e. storage systems that will write complete blocks - even in the event of power failure). Note: Most file system checkers will not check the file system if it is "clean" (i.e. unmounted since the last use). The fsck.gfs program behaves differently because the storage may be shared among several nodes in a cluster, and therefore problems may have been introduced on a different computer. Therefore, fsck.gfs2 will always check the file system unless the -p (preen) option is used, in which case it fol- lows special rules (see below). OPTIONS
-a Same as the -p (preen) option. -f Force checking even if the file system seems clean. -h Help. This prints out the proper command line usage syntax. -q Quiet. -n No to all questions. By specifying this option, fsck.gfs2 will only show the changes that would be made, but not make any changes to the filesystem. -p Preen (same as -a: automatically repair the file system if it is dirty, and safe to do so, otherwise exit.) Note: If the file system has locking protocol lock_nolock, the file system is considered a non-shared storage device and the fsck is deemed safe. However, fsck.gfs2 does not know whether it was called automatically from the init process, due to options in the /etc/fstab file. Therefore, if the locking protocol is lock_dlm and -a or -p was specified, fsck.gfs2 cannot determine whether the disk is mounted by other nodes in the cluster. Therefore, the fsck is deemed to be unsafe and a warning is given if any damage or dirty journals are found. In that case, the file system should be unmounted from all nodes in the cluster and fsck.gfs2 should be run manually without the -a or -p options. -V Version. Print out the program version information. -v Verbose operation. Print more information while running. -y Yes to all questions. By specifying this option, fsck.gfs2 will not prompt before making changes. fsck.gfs2(8)
Man Page