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
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

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 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