mmimportfs command
Imports into the cluster one or more file systems that were created in another GPFS cluster.
Synopsis
mmimportfs {Device | all} -i ImportfsFile [-S ChangeSpecFile]
Availability
Available on all IBM Storage Scale editions.
Description
The mmimportfs command, in conjunction with the mmexportfs command, can be used to move into the current GPFS cluster one or more file systems that were created in another GPFS cluster. The mmimportfs command extracts all relevant file system and disk information from the ExportFilesysData file specified with the -i parameter. This file must have been created by the mmexportfs command.
When all is specified in place of a file system name, any disks that are not associated with a file system will be imported as well.
If any node in the cluster, including the node on which you are running the mmimportfs command, does not have access to one or more disks, use the -S option to assign NSD servers to those disks.
The mmimportfs command attempts to preserve any NSD server assignments that were in effect when the file system was exported.
After the mmimportfs command completes, use mmlsnsd to display the NSD server names that are assigned to each of the disks in the imported file system. Use mmchnsd to change the current NSD server assignments as needed.
After the mmimportfs command completes, use mmlsdisk to display the failure groups to which each disk belongs. Use mmchdisk to make adjustments if necessary.
If you are importing file systems into a cluster that already contains GPFS file systems, it is possible to encounter name conflicts. You must resolve such conflicts before the mmimportfs command can succeed. You can use the mmchfs command to change the device name and mount point of an existing file system. If there are disk name conflicts, use the mmcrnsd command to define new disks and specify unique names (rather than let the command generate names). Then replace the conflicting disks using mmrpldisk and remove them from the cluster using mmdelnsd.
Results
Upon successful completion of the mmimportfs command, all configuration information pertaining to the file systems being imported is added to configuration data of the current GPFS cluster.
Parameters
- Device | all
- The device name of the file system to be imported. File system names need not be
fully-qualified.
fs0
is as acceptable as/dev/fs0
. Specify all to import all GPFS file systems, as well as all disks that do not currently belong to a file system.If the specified file system device is an IBM Storage Scale RAID-based file system, then all affected IBM Storage Scale RAID objects will be imported as well. This includes recovery groups, declustered arrays, vdisks, and any other file systems that are based on these objects. For more information about IBM Storage Scale RAID, see IBM Storage Scale RAID: Administration.
This must be the first parameter.
- -i ImportfsFile
- The path name of the file containing the file system information. This file must have previously been created with the mmexportfs command.
- -S ChangeSpecFile
- The path name of an optional file containing disk stanzas or recovery group stanzas, or both,
specifying the changes that are to be made to the file systems during the import step.Prior to GPFS 3.5, the disk information was specified in the form of disk descriptors defined as:
For backward compatibility, the mmimportfs command will still accept the traditional disk descriptors, but their use is discouraged.DiskName:ServerList:
Disk stanzas have the following format:%nsd: nsd=NsdName servers=ServerList usage=DiskUsage failureGroup=FailureGroup pool=StoragePool device=DiskName thinDiskType={no | nvme | scsi | auto}
where:- nsd=DiskName
- Is the name of a disk from the file system being imported. This clause is mandatory for the mmimportfs command.
- servers=ServerList
- Is a comma-separated list of NSD server nodes. You can specify up to eight NSD servers in this
list. The defined NSD will preferentially use the first server on the list. If the first server is
not available, the NSD will use the next available server on the list.
When specifying server nodes for your NSDs, the output of the mmlscluster command lists the host name and IP address combinations recognized by GPFS. The utilization of aliased host names not listed in the mmlscluster command output may produce undesired results.
If you do not define a ServerList, GPFS assumes that the disk is SAN-attached to all nodes in the cluster. If all nodes in the cluster do not have access to the disk, or if the file system to which the disk belongs is to be accessed by other GPFS clusters, you must specify a ServerList.
To remove the NSD server list, do not specify a value for ServerList (remove or comment out the servers=ServerList clause of the NSD stanza).
- usage=DiskUsage
- Specifies the type of data to be stored on the disk. If this clause is specified, the value must match the type of usage already in effect for the disk; mmimportfs cannot be used to change this value.
- failureGroup=FailureGroup
- Identifies the failure group to which the disk belongs. If this clause is specified, the value must match the failure group already in effect for the disk; mmimportfs cannot be used to change this value.
- pool=StoragePool
- Specifies the storage pool to which the disk is to be assigned. If this clause is specified, the value must match the storage pool already in effect for the disk; mmimportfs cannot be used to change this value.
- device=DiskName
- The block device name of the underlying disk device. This clause is ignored by the mmimportfs command.
- thinDiskType={no | nvme | scsi | auto}
- Specifies the space reclaim disk type:
- no
- The disk does not support space reclaim. This value is the default.
- nvme
- The disk is a TRIM capable NVMe device that supports the mmreclaimspace command.
- scsi
- The disk is a thin provisioned SCSI disk that supports the mmreclaimspace command.
- auto
- The type of the disk is either nvme or scsi. IBM Storage Scale will try to detect the actual disk type automatically. To avoid problems, you should replace auto with the correct disk type, nvme or scsi, as soon as you can.
Note: The space reclaim auto-detection is enhanced in IBM Storage Scale 5.0.5. Use the auto keyword after you upgrade the cluster to IBM Storage Scale 5.0.5 or later.For more information, see IBM Storage Scale with data reduction storage devices.
Recovery group stanzas have the following format depending on the type of the recovery group being imported:
For paired recovery groups:%rg: rgName=RecoveryGroupName servers=Primary[,Backup]
where:- RecoveryGroupName
- Specifies the name of the recovery group being imported.
- Primary[,Backup]
- Specifies the primary server and, optionally, a backup server to be associated with the recovery group.
For shared recovery groups:
%rg: rgName=RecoveryGroupName servers=Server1, Server2 nodeclass=NodeClassName
where:
- RecoveryGroupName
- Specifies the name of the recovery group being imported.
- Server1,Server2
- Specifies the servers associated with the recovery group.
- NodeClassName
- Specifies the node class name associated with the servers and recovery group.
For scale-out recovery groups:
%rg: rgName=RecoveryGroupName servers=[Server list] nodeclass=NodeClassName
where:
- RecoveryGroupName
- Specifies the name of the recovery group being imported.
- Server list
- Specifies the servers associated with the recovery group.
- NodeClassName
- Specifies the node class name associated with the servers and recovery group.
Notes:- You cannot change the name of a disk. You cannot change the disk usage or failure group assignment with the mmimportfs command. Use the mmchdisk command for this purpose.
- All disks that do not have stanzas in ChangeSpecFile are assigned the NSD servers that they had at the time the file system was exported. All disks with NSD servers that are not valid are assumed to be SAN-attached to all nodes in the cluster. Use the mmchnsd command to assign new or change existing NSD server nodes.
For the paired recovery groups, use the mmchrecoverygroup command to activate recovery groups that do not have stanzas in ChangeSpecFile. The mmchrecoverygroup command is documented in IBM Storage Scale RAID: Administration.
For mmvdisk shared and scale-out recovery groups, use the mmvdisk rg change --rg rgName --lg root --active Server command to activate recovery groups if they were not activated automatically.
While importing a scale-out recovery group, an automated pdisk validation and update process gets triggered. This process ensures that the imported drives placement is consistent with the nodes they are installed on. If the pdisks are found to be inconsistent, they are automatically renamed to match the corresponding node to eliminate any system error.
Exit status
- 0
- Successful completion.
- nonzero
- A failure has occurred.
Security
You must have root authority to run the mmimportfs command.
The node on which the command is issued must be able to execute remote shell commands on any other node in the cluster without the use of a password and without producing any extraneous messages.For more information, see Requirements for administering a GPFS file system.
Examples
# mmimportfs all -i /u/admin/exportfile
A sample output is as
follows:
mmimportfs: Processing file system fs1 ...
mmimportfs: Processing disk gpfs2nsd
mmimportfs: Processing disk gpfs3nsd
mmimportfs: Processing disk gpfs4nsd
mmimportfs: Processing file system fs2 ...
mmimportfs: Processing disk gpfs1nsd1
mmimportfs: Processing disk gpfs5nsd
mmimportfs: Processing disks that do not belong to any file system ...
mmimportfs: Processing disk gpfs6nsd
mmimportfs: Processing disk gpfs1001nsd
mmimportfs: Committing the changes ...
mmimportfs: The following file systems were successfully imported:
fs1
fs2
mmimportfs: 6027-1371 Propagating the cluster configuration data to all
affected nodes. This is an asynchronous process.
See also
Location
/usr/lpp/mmfs/bin