Disk

The Disk object represents an NSD that has been added to a Filesystem

Description

class arcapix.fs.gpfs.disk.Disk(name, filesystemName=None)

An object representing an NSD that has been added to a filesystem

Parameters:
  • name (str) – Name of the disk
  • filesystemName – Name of the Filesystem to which the disk has been added
suspend()

Exclude the disk from all subsequent operations on the filesystem

To be used only in a disaster recovery environment after a disaster has occurred, and only after ensuring that the disk has been physically disconnected.

Otherwise, unexpected results may occur.

resume()

Informs GPFS that the previously excluded disk has become operational again.

Writes the up-to-date version of the disk descriptor to the disk and restores the initial quorum configuration.

id

Returns the disk’s id

Synonym for name

Return type:str
name

Returns the disk’s name

Return type:str
filesystemName

Returns the name of the filesystem the disk is associated with

Return type:str
nsd

Returns the NSD associated with the disk

Return type:Nsd
driverType

Returns the disk’s driver type (typically ‘nsd’)

Return type:str
sectorSize

Returns the disk’s sector size

Return type:int
failureGroup

Returns the disk’s failure group

Return type:int
metadata

Returns whether the disk holds metadata

Return type:bool
data

Returns whether the disk holds data

Return type:bool
descriptor

Returns whether the disk is ‘descOnly’

(holding the filesystem descriptor, rather than data or metadata)

Return type:bool
status

Returns the status of the disk

One of (ready, suspended, to be emptied, being emptied, emptied, replacing, replacement)

Return type:str
availability

Returns the availability of the disk

One of (up, down, recovering, recovered)

Return type:str
diskId

Returns the numeric id of the disk

Return type:int
storagepoolName

Returns the name of the storage pool to which the disk belongs

Return type:str
poolName

Returns the name of the storage pool to which the disk belongs

Synonym for storagepoolName

Return type:str
remarks

Returns any remarks, such as

‘desc’ for disks assigned as the filesystem descriptor holders

‘excl’ for all excluded disks

Return type:str
diskSize

Returns the disk size (in kb)

Return type:int
volumeId

Returns the disk’s alphanumeric volume ID

Return type:str
ioNode

Returns a Node object corresponding to the node on which IO operations for this disk are performed

Return type:Node
device

Returns the path of the block device that makes up the NSD

(typically “/dev/…”)

Return type:str

Examples

Checks a disk’s status and availability

>>> from arcapix.fs.gpfs import Disk
>>>
>>> # create a disk object
... d = Disk("md3200_001_L000", "mmfs1")
>>>
>>> # check status
... print d.status
ready
>>>
>>> # check availability
... print d.availability
up

Look-up which storage pools the disks on a Filesystem belong to

>>> from arcapix.fs.gpfs import Filesystem
>>>
>>> # create a Filesystem object
... fs = Filesystem('mmfs1')
>>>
>>> # loop over the disks
... for d in fs.disks.values():
...    print d.id, d.storagepoolName
...
md3200_001_L000 system
md3200_001_L001 system
md3200_001_L002 sas1
md3200_001_L003 sata1
md3200_001_L004 sata2