mmcrnsd command

Creates Network Shared Disks (NSDs) used by GPFS™.

Synopsis

mmcrnsd -F StanzaFile [-v {yes | no}]

Availability

Available on all IBM Spectrum Scale™ editions.

Description

The mmcrnsd command is used to create cluster-wide names for NSDs used by GPFS.

This is the first GPFS step in preparing disks for use by a GPFS file system. The input to this command consists of a file containing NSD stanzas describing the properties of the disks to be created. This file can be updated as necessary by the mmcrnsd command and can be supplied as input to the mmcrfs, mmadddisk, or mmrpldisk command.

The names that are created by the mmcrnsd command are necessary since disks connected to multiple nodes might have different disk device names on each node. The NSD names uniquely identify each disk. This command must be run for all disks that are to be used in GPFS file systems. The mmcrnsd command is also used to assign each disk an NSD server list that can be used for I/O operations on behalf of nodes that do not have direct access to the disk.

To identify that a disk has been processed by the mmcrnsd command, a unique NSD volume ID is written to the disk. All of the NSD commands (mmcrnsd, mmlsnsd, and mmdelnsd) use this unique NSD volume ID to identify and process NSDs.

After the NSDs are created, the GPFS cluster data is updated and they are available for use by GPFS.

Note: It is customary to use whole LUNs as NSDs. This generally provides the best performance and fault isolation. When SCSI-3 PR is in use, whole LUN use is required. In other deployment scenarios, it is possible to use disk partitions rather than whole LUNs, as long as care is taken to ensure that sharing of the same LUN through multiple partitions does not have an undesirable performance impact.

On Windows, GPFS will only create NSDs from empty disk drives. mmcrnsd accepts Windows Basic disks or Unknown/Not Initialized disks. It always re-initializes these disks so that they become Basic GPT Disks with a single GPFS partition. NSD data is stored in GPFS partitions. This allows other operating system components to recognize the disks are used. mmdelnsd deletes the partition tables that are created by mmcrnsd.

Results

Upon successful completion of the mmcrnsd command, these tasks are completed:
  • NSDs are created.
  • The StanzaFile contains NSD names to be used as input to the mmcrfs, mmadddisk, or the mmrpldisk commands.
  • A unique NSD volume ID to identify each disk as an NSD has been written to the disk.
  • An entry for each new disk is created in the GPFS cluster data.

Parameters

-F StanzaFile
Specifies the file containing the NSD stanzas for the disks to be created. NSD stanzas have this format:
%nsd: device=DiskName
  nsd=NsdName
  servers=ServerList
  usage={dataOnly | metadataOnly | dataAndMetadata | descOnly | localCache}
  failureGroup=FailureGroup
  pool=StoragePool

where:

device=DiskName
On UNIX, specifies the block device name that appears in /dev for the disk that you want to define as an NSD. Examples of disks that are accessible through a block device are SAN-attached disks.
Important: Start of changeIf a server node is specified, DiskName must be the /dev name for the disk device of the first listed NSD server node. If no server node is specified, DiskName must be the name of the disk device for the node from which the mmcrnsd command is issued.End of change
On Windows, the disk number (for example, 3) of the disk you want to define as an NSD. Disk numbers appear in Windows Disk Management console and the DISKPART command line utility.
Important: Start of changeIf a server node is specified, DiskName must be the disk number from the first NSD server node that is defined in the server list. If no server node is specified, DiskName must be the name of the disk device for the node from which the mmcrnsd command is issued.End of change

For the latest supported disk types, see the IBM Spectrum Scale FAQ in IBM® Knowledge Center (www.ibm.com/support/knowledgecenter/STXKQY/gpfsclustersfaq.html).

This clause is mandatory for the mmcrnsd command.

nsd=NsdName
Specifies the name of the NSD to be created. This name must not already be used as another GPFS disk name, and it must not begin with the reserved string 'gpfs'.
Note: This name can contain only the following characters: 'A' through 'Z', 'a' through 'z', '0' through '9', or '_' (the underscore). All other characters are not valid.
If you do not specify this clause, GPFS generates a unique name for the disk and adds the appropriate nsd=NsdName clause to the stanza file. The NSD is assigned a name according to the convention:
gpfsNNnsd
where NN is a unique nonnegative integer that is not used in any prior NSD.
servers=ServerList
Specifies a comma-separated list of NSD server nodes. You can specify up to eight NSD servers in this list. The defined NSD preferentially uses the first server on the list. If the first server is not available, the NSD uses the next available server on the list.

When you specify server nodes for your NSDs, the output of the mmlscluster command lists the host name and IP address combinations that are recognized by GPFS. The utilization of aliased host names that are not listed in the mmlscluster command output might produce undesired results.

There are two cases where a server list either must be omitted or is optional:
  • For IBM Spectrum Scale RAID, a server list is not allowed. The servers are determined from the underlying vdisk definition. For more information about IBM Spectrum Scale RAID, see the IBM Spectrum Scale RAID: Administration and Programming Reference (SA23-1354).
  • For SAN configurations where the disks are SAN-attached to all nodes in the cluster, a server list is optional. However, 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 server list.
usage={dataOnly | metadataOnly | dataAndMetadata | descOnly | localCache}
Specifies the type of data to be stored on the disk:
dataAndMetadata
Indicates that the disk contains both data and metadata. This is the default for disks in the system pool.
dataOnly
Indicates that the disk contains data and does not contain metadata. This is the default for disks in storage pools other than the system pool.
metadataOnly
Indicates that the disk contains metadata and does not contain data.
descOnly
Indicates that the disk contains no data and no file metadata. Such a disk is used solely to keep a copy of the file system descriptor, and can be used as a third failure group in certain disaster recovery configurations. For more information, see the help topic "Synchronous mirroring utilizing GPFS replication" in IBM Spectrum Scale: Administration Guide.
localCache
Indicates that the disk is to be used as a local read-only cache device.

This clause is ignored by the mmcrnsd command and is passed unchanged to the output file produced by the mmcrnsd command.

failureGroup=FailureGroup
Identifies the failure group to which the disk belongs. A failure group identifier can be a simple integer or a topology vector that consists of up to three comma-separated integers. The default is -1, which indicates that the disk has no point of failure in common with any other disk.

GPFS uses this information during data and metadata placement to ensure that no two replicas of the same block can become unavailable due to a single failure. All disks that are attached to the same NSD server or adapter must be placed in the same failure group.

If the file system is configured with data replication, all storage pools must have two failure groups to maintain proper protection of the data. Similarly, if metadata replication is in effect, the system storage pool must have two failure groups.

Disks that belong to storage pools in which write affinity is enabled can use topology vectors to identify failure domains in a shared-nothing cluster. Disks that belong to traditional storage pools must use simple integers to specify the failure group.

This clause is ignored by the mmcrnsd command, and is passed unchanged to the output file produced by the mmcrnsd command.
pool=StoragePool
Specifies the name of the storage pool to which the NSD is assigned. This clause is ignored by the mmcrnsd command and is passed unchanged to the output file produced by the mmcrnsd command.

The default value for pool is system.

-v {yes | no}
Verify that the disks are not already formatted as an NSD.
A value of -v yes specifies that the NSDs are to be created only if each disk has not been formatted by a previous invocation of the mmcrnsd command, as indicated by the NSD volume ID on the disk. A value of -v no specifies that the disks are to be created irrespective of their previous state. The default is -v yes.
Important: Using -v no when a disk already belongs to a file system can corrupt that file system by making that physical disk undiscoverable by that file system. This will not be noticed until the next time that file system is mounted.
Upon successful completion of the mmcrnsd command, the StanzaFile file is rewritten to reflect changes made by the command, as follows:
  • If an NSD stanza is found to be in error, the stanza is commented out.
  • If an nsd=NsdName clause is not specified, and an NSD name is generated by GPFS, an nsd= clause will be inserted in the corresponding stanza.
You must have write access to the directory where the StanzaFile file is located in order to rewrite the created NSD information.

The disk usage, failure group, and storage pool specifications are preserved only if you use the rewritten file produced by the mmcrnsd command. If you do not use this file, you must either accept the default values or specify new values when creating NSD stanzas for other commands.

Prior to GPFS 3.5, the disk information was specified in the form of disk descriptors defined as:
DiskName:ServerList::DiskUsage:FailureGroup:DesiredName:StoragePool

For backward compatibility, the mmcrnsd command will still accept the traditional disk descriptors, but their use is discouraged. For additional information about GPFS stanzas, see the help topic "Stanza files" in the IBM Spectrum Scale: Administration Guide.

Exit status

0
Successful completion.
nonzero
A failure has occurred.

Security

You must have root authority to run the mmcrnsd 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 create two new NSDs from the stanza file /tmp/newNSDstanza containing:
%nsd: device=/dev/sdav1
  servers=k145n05,k145n06
  failureGroup=4

%nsd:
  device=/dev/sdav2
  nsd=sd2pA
  servers=k145n06,k145n05
  usage=dataOnly
  failureGroup=5
  pool=poolA
Issue this command:
mmcrnsd -F /tmp/newNSDstanza
The output is similar to this:
mmcrnsd: Processing disk sdav1
mmcrnsd: Processing disk sdav2
mmcrnsd: 6027-1371 Propagating the cluster configuration data to all
  affected nodes.  This is an asynchronous process.

As a result, two NSDs are created. The first one is assigned a name by the system, for example, gpfs1023nsd. The second disk is assigned the name sd2pA (as indicated by the nsd= clause in the stanza).

The newNSDstanza file is rewritten and looks like this (note the addition of an nsd= clause in the first stanza):
%nsd: nsd=gpfs1023nsd  device=/dev/sdav1
  servers=k145n05,k145n06
  failureGroup=4

%nsd:
  device=/dev/sdav2
  nsd=sd2pA
  servers=k145n06,k145n05
  usage=dataOnly
  failureGroup=5
  pool=poolA

Location

/usr/lpp/mmfs/bin