Nsds

The Nsds object is a collection of NSD objects.

Description

class arcapix.fs.gpfs.nsds.Nsds

A collection of Nsd objects

freeDisks()

Convenience method to return only those NSD’s which are not allocated to a filesystem.

Return type:dict of NSD objects
unassignedDisks()

Convenience method to return only those NSD’s which are not allocated to a filesystem.

Synonym for freeDisks

directDisks()

Convenience method to return only those NSD’s which are ‘directly attached’.

Return type:dict of NSD objects
cacheDisks()

Convenience method to return only those NSD’s which are ‘local cache’ disks.

Return type:dict of NSD objects
vDisks()

Convenience method to return only those NSD’s which are “vdisk” (i.e. ECE edition) disks

Examples

Count the number of NSDs in the cluster

>>> from arcapix.fs.gpfs import Nsds
>>>
>>> # create a Nsds object
... ns = Nsds()
>>>
>>> # check the size of the collection
... print(len(ns))
9

Check for any free disks

   >>> from __future__ import print_function
   >>> from arcapix.fs.gpfs import Nsds
   >>>
   >>> # create a Nsds object
   ... ns = Nsds()
   >>>
   >>> # check for free disks
   ... len(ns.freeDisks())
   0
   >>>
   >>> # look-up which filesystems the NSDs belong to
   ... for n in ns.values():
   ...    print(n.id, n.filesystemName)
   ...
   md3200_001_L000 mmfs1
   md3200_001_L001 mmfs1
   md3200_001_L002 mmfs1
   md3200_001_L003 mmfs1
   md3200_001_L004 mmfs1
   md3200_002_L000 mmfs2
   md3200_002_L001 mmfs2
   md3200_002_L002 mmfs2
   md3200_003_L000 mmfs3

List nodeclasses used by ECE vdisks in the system
-------------------------------------------------
>>> from __future__ import print_function
>>> from arcapix.fs.gpfs import Nsds
>>>
>>> # create a Nsds object
... ns = Nsds()
>>>
>>> # Set to hold the output values
    ... ncs = set()
>>> for n in ns.vDisks().values():
...         ncs.add(n.vdiskNodeClass.name)
>>> print(",".join(ncs))
...
...
nc1,nc2