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 Spectrum 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 the file systems being imported were created on nodes that do not belong to the current GPFS cluster, the mmimportfs command assumes that all disks have been properly moved, and are online and available to the appropriate nodes in the current cluster.

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 Spectrum Scale RAID-based file system, then all affected IBM Spectrum 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 Spectrum Scale RAID, see IBM Spectrum 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:
DiskName:ServerList:
For backward compatibility, the mmimportfs command will still accept the traditional disk descriptors, but their use is discouraged.
Disk stanzas have the following format:
%nsd:
  nsd=NsdName
  servers=ServerList
  usage=DiskUsage
  failureGroup=FailureGroup
  pool=StoragePool
  device=DiskName
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.
Recovery group stanzas have the following format:
%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.
Notes:
  1. 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.
  2. 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.
  3. Use the mmchrecoverygroup command to activate recovery groups that do not have stanzas in ChangeSpecFile. The mmchrecoverygroup command is documented in IBM Spectrum Scale RAID: Administration.

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

To import all file systems in the current cluster, issue this command:
mmimportfs all -i /u/admin/exportfile
The output is similar to this:
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.

Location

/usr/lpp/mmfs/bin