To create a GFS Shared File System, use sfcmkfs(8). Create the GFS Shared File System on any one of the file system shared nodes.
See
For details on sfcmkfs(8), see sfcmkfs(8).
Specifies a value of parameter along use of the file system that decided beforehand as had described in "Chapter 4 File System Design."
The defaults of parameters used by sfcmkfs(8) are as follows:
Parameter | Default |
---|---|
Always 8192 bytes | |
10% of the file data area | |
One in an 8192-byte disk area | |
1% of the file system size | |
About 10% of the file system size |
Note
The use ratio of the meta-data area decreases by growing of the file system size when the meta-data area size is not specified.
Examples of creating a typical GFS Shared File System are given below.
Single partition configuration
To create a GFS Shared File System with a single partition, specify the partition configuring the file system. In this case, areas for all types of data (meta-data area, update log area, and file data area) are created in the representative partition.
The following is an example of using sfcmkfs(8) to create a file system with a single partition.
# sfcmkfs -o node=mikan,karin /dev/sfdsk/gfs01/dsk/volume01 <Enter> Representative partition (meta-data, log, and data): /dev/sfdsk/gfs01/dsk/volume01 Shared hosts : mikan, karin Primary MDS : mikan Secondary MDS : karin |
Multiple partitions configuration (Multiple file data partitions configuration)
To specify multiple partitions in the data area, specify a representative partition and file data partitions. In this case, a meta-data area, update log area, and data area are created in the representative partition.
The following is an example of using sfcmkfs(8) to create a file system with multiple file data partitions.
# sfcmkfs -o data=/dev/sfdsk/gfs01/dsk/volume02,data=/dev/sfdsk/gfs01/dsk/volume03,node=mikan,karin /dev/sfdsk/gfs01/dsk/volume01 <Enter> Representative partition (meta-data, log, and data): /dev/sfdsk/gfs01/dsk/volume01 Data partition: /dev/sfdsk/gfs01/dsk/volume02, /dev/sfdsk/gfs01/dsk/volume03 Shared hosts: mikan,karin Primary MDS: mikan Secondary MDS: karin |
Multiple partitions configuration (Separating the data area)
If multi-partition of the file data area is specified with the "-o dataopt=y" option, representative partitions will not contain the file data area.
The following example shows how to create a file system where the file data area is not included in multiple file data partitions or representative partitions with sfcmkfs(8).
# sfcmkfs -o dataopt=y,data=/dev/sfdsk/gfs01/dsk/volume02,data=/dev/sfdsk/gfs01/dsk/volume03,node=mikan,karin /dev/sfdsk/gfs01/dsk/volume01 <Enter> Representative partition (meta-data and log): /dev/sfdsk/gfs01/dsk/volume01 Data partition: /dev/sfdsk/gfs01/dsk/volume02, /dev/sfdsk/gfs01/dsk/volume03 Shared hosts: mikan, karin Primary MDS: mikan Secondary MDS: karin |
Parameters for customizing a file system are provided by sfcmkfs(8), which is used to create a GFS Shared File Systems. Typical parameters are described below.
Update log area size (-o logsz=n)
Specify the size of the update log area with a value from 5 to 100 megabytes. The default size of an update log area is of 1% of the file system size. If, however, 1% of the file system is less than 5 megabytes, 5 megabytes is set. Also, if the value is greater than 50 megabytes, 50 megabytes is set.
Meta-data area size (-o metasz=n)
Specifies the size of the meta-data area. The default is about 10% of the file system size. However, when the file system size is larger, the ratio of the meta-data area becomes smaller.
The minimum value that can be specified is same as default. The maximum value is minimum requirement size for managing 1-mega V-data. (The total number of V-data of the file system can be confirmed by executing sfcdf(8).) However, larger value than the size of the representative partition cannot be specified.
Maximum data area size (-o maxdsz=n)
Specify the maximum total size of the file data area when adding a file data partition as an expansion to a GFS Shared File System. If a file data partition that exceeds the maximum data space, area management information might be insufficient. If this occurs, part of free file data space might not be used. You can add a file data partition using sfcadd(8).
The maximum size is less than 1048576 megabytes (1 terabyte).
Maximum number of partitions (-o maxvol=n)
Specify the maximum number of partitions that may ever comprise this GFS Shared File System. The types of partitions configuring the GFS Shared File System are the representative partition, update log partition, and file data partition. The value specified here is the total of the partitions of all types. The default value is 16. Specifiable values are 1 to 32.
The following shows an example of creating a typical GFS Shared File System with MDS operational information specified to improve availability:
Priority settings for MDS placement
Specify the priority of placing the primary MDS and secondary MDS using the shared host name in the -o node option of the sfcmkfs(8) command. The primary MDS and secondary MDS candidates are selected in the order the shared host names are specified. The primary MDS is ultimately determined based on operation status of actual shared nodes when starting the file system operation.
The following shows an example of creating a file system using sfcmkfs(8) specifying mikan as the primary MDS candidate and karin as the secondary MDS candidate.
# sfcmkfs -o node=mikan,karin /dev/sfdsk/gfs01/dsk/volume01 <Enter> Representative partition (meta-data,log and data): /dev/sfdsk/gfs01/dsk/volume01 Shared hosts: mikan, karin Primary MDS: mikan Secondary MDS: karin |