PRIMECLUSTER Global File Services Configuration and Administration Guide 4.2 (Solaris(TM) Operating Environment) |
Contents Index |
Part 3 Global File Services Shared File System | > Chapter 22 File System Operations (Command) | > 22.2 Flow from file system creation to mount/unmount |
To create a GFS Shared File System, use sfcnewfs(1M).
For details on sfcnewfs(1M), see Appendix F.2.14, "sfcnewfs(1M)."
When the following error message is displayed, the sfcnewfs(1M) command was unable to create a file system. sfcnewfs(1M) was unable to obtain sufficient meta-data area which is approximately 10% of the file system size.
mkfs_sfcfs: ERROR: Master partition is small, meta area not enough
In such a case, create a file system after reducing the size of the specified file data partition or add meta-data partitions by executing the sfcadd(1M) command.
For details on partition addition, see "22.5 Change (partition configuration)." For details on the sfcadd(1M) command, see Appendix F.2.1 "sfcadd(1M)."
The defaults of parameters used by sfcnewfs(1M) are as follows:
Parameter |
Default |
---|---|
Data block size |
Always 8192 bytes |
Minimum free space (-f free) |
10% |
Optimization type (-o space|time) |
time |
Number of i-nodes (-i nbpi) |
One per data block (8192 bytes) |
Update log area size (-g logsize) |
1% of the file system size However, the size must be at least 5 megabytes but not more than 50 megabytes. |
Meta-data area size (-a metasz) |
About 10% of the file system size |
Maximum number of partitions (-l maxvol) |
16 |
Number of MDS place in nodes (-S all|num) |
2 |
When building a file system, the file system should be configured to operate MDS on all nodes.
Examples of creating a typical GFS Shared File System are given below.
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 sfcnewfs(1M) to create a file system with a single partition.
# sfcnewfs -H mikan,karin,mango -S all /dev/sfdsk/gfs/rdsk/volume1Representative partition (meta-date, log, and data) : /dev/sfdsk/gfs/rdsk/volume1 Shared hosts : mikan, karin, and mango Primary MDS : mikan Secondary MDS : karin MDS operational nodes : mikan, karin, and mango
To separate the update log area as another partition, specify both a representative partition and an update log partition. In the representative partition, a meta-data area and data area are created.
The following is an example of using sfcnewfs(1M) to create a file system in which the update log area is separated as another partition.
# sfcnewfs -H mikan,karin,mango -S all -L /dev/sfdsk/gfs/rdsk/volume2 /dev/sfdsk/gfs/rdsk/volume1Representative partition (meta-data, and data) : /dev/sfdsk/gfs/rdsk/volume1 Log partition : /dev/sfdsk/gfs/rdsk/volume2 Shared hosts : mikan, karin, and mango Primary MDS : mikan Secondary MDS : karin MDS operational nodes : mikan, karin, and mango
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 sfcnewfs(1M) to create a file system with multiple file data partitions.
# sfcnewfs -H mikan,karin,mango -S all -D /dev/sfdsk/gfs/rdsk/volume2,/dev/sfdsk/gfs/rdsk/volume3 /dev/sfdsk/gfs/rdsk/volume1Representative partition (meta-data, log, and data) : /dev/sfdsk/gfs/rdsk/volume1 Data partition : /dev/sfdsk/gfs/rdsk/volume2, /dev/sfdsk/gfs/rdsk/volume3 Shared hosts : mikan, karin, and mango Primary MDS : mikan Secondary MDS : karin MDS operational nodes : mikan, karin, and mango
To separate the update log area as another partition and specify multiple partitions in the area, use the specification below.
The following is an example of using sfcnewfs(1M) to create a file system in which an update log partition and multiple file data partitions are specified.
# sfcnewfs -H mikan,karin,mango -S all -L /dev/sfdsk/gfs/rdsk/volume2 -D /dev/sfdsk/gfs/rdsk/volume3,/dev/sfdsk/gfs/rdsk/volume4 /dev/sfdsk/gfs/rdsk/volume1Representative partition (meta-data and data) : /dev/sfdsk/gfs/rdsk/volume1 Log partition : /dev/sfdsk/gfs/rdsk/volume2 Data partition : /dev/sfdsk/gfs/rdsk/volume3, /dev/sfdsk/gfs/rdsk/volume4 Shared hosts : mikan, karin, and mango Primary MDS : mikan Secondary MDS : karin MDS operational nodes : mikan, karin, and mango
If multiple partitions in a data area are specified with the -A option, the data area is not included in the representative partition.
The following is an example of using sfcnewfs(1M) to create a file system in which multiple partitions are specified and the data area is not included in the representative partition.
# sfcnewfs -A -H mikan,karin,mango -S all -D /dev/sfdsk/gfs/rdsk/volume2,/dev/sfdsk/gfs/rdsk/volume3 /dev/sfdsk/gfs/rdsk/volume1Representative partition (meta-data and log) : /dev/sfdsk/gfs/rdsk/volume1 Data partition : /dev/sfdsk/gfs/rdsk/volume2, /dev/sfdsk/gfs/rdsk/volume3 Shared hosts : mikan, karin, and mango Primary MDS : mikan Secondary MDS : karin MDS operational nodes : mikan, karin, and mango
If a data area is not included in the representative partition by specifying the -A option, the meta-data area, update log area, and data area can be configured on separate partitions. This is done by specifying a separate update log area.
The following is an example of using sfcnewfs(1M) to create a file system in which multiple file data partitions and an update log partition are specified and the data area is not included in the representative partition.
# sfcnewfs -A -H mikan,karin,mango -S all -L /dev/sfdsk/gfs/rdsk/volume2 -D /dev/sfdsk/gfs/rdsk/volume3,/dev/sfdsk/gfs/rdsk/volume4 /dev/sfdsk/gfs/rdsk/volume1Representative partition (meta-data) : /dev/sfdsk/gfs/rdsk/volume1 Log partition: /dev/sfdsk/gfs/rdsk/volume2 Data partition: /dev/sfdsk/gfs/rdsk/volume3, /dev/sfdsk/gfs/rdsk/volume4 Shared hosts: mikan, karin, and mango Primary MDS: mikan Secondary MDS: karin MDS operational nodes: mikan, karin, and mango
The file system access performance may be affected when the initialization processing of a meta-data area is done after MDS has been started. However, access is not affected if you specify the -c option for the sfcnewfs(1M) command to complete the initialization processing of the meta-data area.
Parameters for customizing a file system are provided by sfcnewfs(1M), which is used to create a GFS Shared File Systems. Typical parameters are described below.
Update log area size (-g logsz)
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 (-a metasz)
Specify the size of the meta-data area in the representative partition. The default value is about 10% of the file system size. If the maximum file data area size is specified, about 10% of the maximum data area size is set.
Maximum data area size (-d maxdsz)
Specify the maximum total size of the data area when adding a file data partition as an expansion to a GFS Shared File System. To add a file data partition, use sfcadd(1M). If the user is planning to add a file data partition, specify this parameter. Up to 32 terabyte can be specified.
Maximum number of partitions (-l maxvol)
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 quota function can be enabled immediately after file system creation. In this case, consistency processing is executed for the quota information when the first file system service starts without files. An advantage of this method is that completion of the consistency processing requires a minimal amount of time.
For details on enabling the quota function, see Section 22.3.2, "Enabling the quota function."
When validating quota function, a metadata area is needs to be initialization. Therefore, please specifies -c option of sfcnewfs(1M) when create a file system.
The following shows an example of creating a typical GFS Shared File System with MDS operation information specified to improve availability:
Specify the priority of placing the primary MDS and secondary MDS using the shared host name in the -H option of the sfcnewfs(1M) 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 the MDS placement range (described below) and operation status of actual shared nodes when starting the file system operation.
The following shows an example of creating a file system using sfcnewfs(1M) specifying mikan as the primary MDS candidate and karin as the secondary MDS candidate.
# sfcnewfs -H mikan,karin,mango,akebi /dev/sfdsk/gfs/rdsk/volume1Representative partition (meta-data,log and data) : /dev/sfdsk/gfs/rdsk/volume1 Shared hosts : mikan, karin, mango and akebi Primary MDS : mikan Secondary MDS : karin
To enable MDS placement on all nodes, use the -S option of the sfcnewfs command.
The following shows an example of creating a file system using sfcnewfs(1M) when MDS is placed on all nodes:
# sfcnewfs -S all -H mikan,karin,mango,akebi /dev/sfdsk/gfs/rdsk/volume1Representative partition (meta-data,log and data) : /dev/sfdsk/gfs/rdsk/volume1 Shared hosts : mikan, karin, mango and akebi Primary MDS : mikan Secondary MDS : karin Host on which MDS can be placed: mikan, karin, mango and akebi
To restrict the MDS placement range to specific shared hosts, use the -S option of the sfcnewfs command to specify the number of nodes.
The following shows an example of creating a file system using sfcnewfs(1M) with the placement range of MDS restricted to three nodes:
# sfcnewfs -S 3 -H mikan,karin,mango,akebi /dev/sfdsk/gfs/rdsk/volume1Representative partition (meta-data,log and data) : /dev/sfdsk/gfs/rdsk/volume1 Shared hosts : mikan, karin, mango and akebi Primary MDS : mikan Secondary MDS : karin Host on which MDS can be placed: mikan, karin, and mango
Contents Index |