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