0% found this document useful (0 votes)
291 views3 pages

IBM Spectrum Scale Wiki - Device Naming and Discovery in GPFS

GPFS may assign different device types to the same LUN on different hosts depending on how the device is detected by each host's operating system. The nsddevices user exit can be used to customize device name and type mappings so that all hosts see the same device type for a given LUN, ensuring consistent access. For example, a script could map Linux RDAC driver /dev/sd* names to the "dmm" type used by Linux multipath drivers to allow access from both types of hosts.

Uploaded by

daniel_vp21
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
291 views3 pages

IBM Spectrum Scale Wiki - Device Naming and Discovery in GPFS

GPFS may assign different device types to the same LUN on different hosts depending on how the device is detected by each host's operating system. The nsddevices user exit can be used to customize device name and type mappings so that all hosts see the same device type for a given LUN, ensuring consistent access. For example, a script could map Linux RDAC driver /dev/sd* names to the "dmm" type used by Linux multipath drivers to allow access from both types of hosts.

Uploaded by

daniel_vp21
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Device Naming and Discovery in GPFS

  | Updated August 15, 2017 by ScottGPFS | Tags: None

Page Actions 

Spectrum Scale runs on multiple operating systems and  
types of storage. Each operating system block device
name used to access a LUN is different and can even be
different from host to host running the same operating
system. Spectrum Scale supports concurrent access to
devices on multiple platforms by being able to use different
block device names on different hosts for the same device.

When creating an NSD on Linux, the device name must
exist in /proc/partitions. So you can use the
/dev/mapper/* name of the device for day to day
operation, but the mmcrnsd command looks for the device
in /proc/partitions, to confirm existence. So whatever
device name you use to create an NSD must match an
entry in /proc/partitions.

Once an NSD is created Spectrum Scale automatically
detects standard block devices, such as /dev/sd* Linux
and /dev/hdisk* on AIX. If there is a Spectrum Scale
Network Shared Disk (NSD) already defined on a device,
Spectrum Scale reads the NSD header and determines the
identity of the device. When NSDs are created, a device
type is assigned to each LUN. The device type assigned at
NSD creation time is based on the device name used by
the OS. For example on Linux a multipath device name of
/dev/dm­ is assigned a device type of dmm. A list of
known device names and associated device types is shown
in the "Devices Known to GPFS" section of this article. In
most cases all of the hosts accessing the LUNS are using
the same multipath driver and GPFS assigns the same
device types on all nodes. In this case everything works
fine. In some cases when nodes are of different operating
systems (AIX and Linux) or the nodes are running different
multipath software, cases can exist where two nodes
detect different device names and thus assign different
GPFS device types. In this case you need to use the
nsddevices User Exit to control how GPFS runs device
discovery.

In a cluster where hosts use different block device names,
it is critical to make sure that all hosts are using the same
GPFS device type for each NSD. Hosts may use different
block device names (/dev/dm­1 vs. /dev/sda) but all hosts
must have the same GPFS device type (example dmm) for
the same LUN (assigned at NSD creation).

Let's look at an example of modifying GPFS device
discovery to concurrently access storage where two
different device types are detected by default. In this
example if you have a mix of Linux nodes running the IBM
RDAC software and others running Linux multipath
accessing a common set of LUNS.

Note: This is not a statement that this is a supported
configuration; double check your storage documentation
before mixing multipath technologies.

The Linux multipath driver creates device names with the
format_/dev/dm­*. When GPFS detects these devices it
assigns a device type of _dmm (See the section "Devices
Known to GPFS" for details on types). For example, when
an NSD is created on a Linux node using Linux Native
multipath software (DM­MP), GPFS assigns the device
typedmm to that NSD. That is fine, and you can now
create a file system and proceed. However, when a node
running the IBM RDAC driver is accessing the same LUN,
GPFS detects the LUN as a different device type (generic).
This is due to the fact that the IBM RDAC driver assigns
the standard naming convention of /dev/sd* to the
multipath device. When GPFS starts on this RDAC node it
detects the LUN /dev/sddas a GPFS device type of generic.
This type does not match the type set when the NSD was
created so the node running IBM RDAC is not be able to
access the LUN locally. To see the disk type assigned by
GPFS use themmlsnsdcommand. On a node that can
access the NSD run the mmlsnsd ­Xcommand.

# mmlsnsd ­X 
 
 Disk name    NSD volume ID      Device         Devtype  Node name            
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
 mynsd1         090B6E524D5D829D   /dev/dm­1       dmm      node02.ibm.com

  In this case the NSD named "mynsd1" has a device type  
(Devtype) of dmm. To enable the node running IBM RDAC
to access the device you need to customize the GPFS
configuration on that node.

GPFS allows you to customize the device names and types
you want to use when you have a configuration where the
storage multipath driver does not use a common device
name, /dev/newdisk0, for example or there is a mix of
detected device types as in the example above. In this
case you use the nsddevices User Exit to allow GPFS to use
these devices. The nsddevicesfile is an executable script
that generates a list of devices that GPFS can use. The
following kshell script allows GPFS on the RDAC node to
access the devices created on the Linux node running the
Multipath driver (/dev/dm­). To do this it needs to
generate a list of the devices /dev/sd* and assign a device
type of dmm. When list generation is complete the script
exits (exit 0). This indicates to GPFS not to do any further
device detection.

#/bin/ksh 

# This script assigns a GPFS device type of dmm 
# to /dev/sd* devices 

# The output format is: 
#    device_name device_type 

for dev in $( cat /proc/partitions | grep sd | awk '{print $4}' ) 
do 
    echo $dev dmm 
done 
 
# skip GPFS device discovery 
exit 0

  To get GPFS to use this script name the  
scriptnsddevicesand place it in the /var/mmfs/etc directory
with root execute permission on the node running IBM
RDAC (in this example). When the GPFS daemon is
restarted it uses the output of the nsddevices User Exit
and allows access to the LUNS. For more information on
the nsddevices User Exit you can look at the sample
nsddevices script that is included in
/usr/lpp/mmfs/samples/nsddevices.sample.

The nsddevices User Exit can be used when configuring a
GPFS cluster with Hosts of multiple operating systems, on
nodes using different device names, or if your operating
system assigns device names that are not automatically
detected through GPFS device discovery.

To review
  GPFS may associate a different device type on  
different hosts for the same LUN depending on how
the device is detected.
There are some bock device names that GPFS does
not detect without the use of the nsddevices User
Exit. An example of this is the RedHat DM­MP
device names in /dev/mapper/mpath*.
Different hosts may use different block device
names and therefore different GPFS device types.
For example, a GPFS cluster containing Linux and
AIX hosts would have different block device names
for the same
LUN, /dev/sdx and /dev/hdiskwrespectfully,
accessing the same LUN. Hosts with different
multipath drivers may also have different block
device names

Devices Known to GPFS
  As of GPFS 3.4.0.3 the devices known to GPFS are

For AIX

Device Name GPFS Device Type Description


Vpath Vpath IBM virtual path disk
Hdisk hdisk AIX hard disk
Hdiskpower powerdisk EMC power path disk
Dlmfdrv dlmfdrv Hitachi dlm  

For Linux

Device GPFS Device
Description
Name Type
dm­ dmm Device­Mapper Multipath (DMM)
vpath vpath IBM virtual path disk
Device having no unique failover or multipathing characteristic
Sd/hd Generic
(predominantly Linux devices).
emcpower powerdisk EMC power path disk  

For Windows

Windows Server is included here for completeness though Windows Server nodes cannot share direct access to
LUNS with any other operating system.

Device Name GPFS Device Type Description


A Number 0­n gpt GPFS partition on Windows disk

You might also like