APIs in Category: disk
API version 1.3

 
disk-fail
disk-list-info
disk-remove
disk-sanown-assign
disk-sanown-list-info
disk-sanown-reassign
disk-unfail

NetApp Manage ONTAP
 
disk-fail [top]

Fail a file system disk. Removes the specified file system disk from the RAID configuration, spinning the disk down when removal is complete. disk fail is used to remove a file system disk that may be logging excessive errors and requires replacement. Note that when a file system disk has been removed in this manner, the RAID group to which the disk belongs will enter degraded mode (meaning a disk is missing from the RAID group). If a spare disk at least as large as the disk being removed is available, the contents of the disk being removed will be reconstructed onto that spare disk. The disk being removed is marked as ``broken'', so that if it remains in the disk shelf, it will not be used by the filer as a spare disk. If the disk is moved to another filer, that filer will use it as a spare. This is not a recommended course of action, as the reason that the disk was failed may have been because it needed to be replaced.
Input Name Range Type Description
disk string
Name of the disk to fail, e.g. "v0.1".
 Errno  Description
 EINTERNALERROR
 EDISKNOTFOUND

 
disk-list-info [top]
Get disk status information from RAID.
Input Name Range Type Description
disk string
optional
Get status for given disk, if not supplied, get status for all disks.
 
Output Name Range Type Description
disk-details disk-detail-info[]
List of disks and their status.
 Errno  Description
 EINTERNALERROR
 EDISKNOTFOUND

 
disk-remove [top]
Remove a spare disk. Removes the specified spare disk from the RAID configuration, spinning the disk down when removal is complete. You can use disk remove to remove a spare disk so that it can be used by another filer (as a replacement for a failed disk or to expand file system space).
Input Name Range Type Description
disk string
Disk to remove.
 Errno  Description
 EINTERNALERROR
 EDISKNOTFOUND

 
disk-sanown-assign [top]
Changes ownership on a disk. The normal usage is when there is no current owner or to assign a disk to a pool.
Input Name Range Type Description
disk string
Name of disk to assign.
force boolean
optional
Force flag need to be set to 'true' if assigning disks which are already owned a Filer. However, if that Filer is up and has put a reservation on the disk, even the force option won't work.
owner string
optional
Assign disk to specific owner.
owner-id integer
optional
Assign disk to specific owner ID (NVRAM ID or serial number). Range : [0..2^32-1].
pool integer
optional
Assign disk to specific pool, e.g. '0' or '1'.
 Errno  Description
 EINTERNALERROR
 EDISKNOTFOUND

 
disk-sanown-list-info [top]
Get sanown disk information.
Input Name Range Type Description
disk string
optional
Get ownership status for given disk, if not supplied, get ownership for all disks or if onership-type is supplied, get ownership info for disks of specific type.
ownership-type string
optional
Possible values are 'all' which will list all disks. 'unowned' which will list all disks without owners. 'owned' which will list all disks with owners. 'unknown' which will list all disks with unknown owners. 'local' which will list all disks belonging to the local filer. Default is 'all'. If specific disk is specified, ownership-type will be ignored.
 
Output Name Range Type Description
disk-sanown-details disk-sanown-detail-info[]
List of disks and their sanown information.
 Errno  Description
 EINTERNALERROR
 EDISKNOTFOUND

 
disk-sanown-reassign [top]
Changes ownership on disks already belonging to an owner.
Input Name Range Type Description
force boolean
optional
Force flag need to be set to 'true' if reassigning disks which are owned by another Filer. However, if that Filer is up and has put a reservation on the disk, even the force option won't work. In this case reassign will need to be run on the Filer which owns the disks.
new-owner string
optional
Name of new owner. This form will assign all the disks belonging to the old owner to the specific owner.
new-owner-id integer
optional
ID of new owner. This form will assign all the disks belonging to the old owner to the specific owner ID. Either new-owner or new-owner-id (or both) must be specified. Range : [0..2^32-1].
old-owner string
optional
Name of old owner. This form takes all disks currently belonging to the specific old owner, and reassigns them to a new owner.
old-owner-id integer
optional
ID of old owner. This form takes all disks currently belonging to the specific old owner ID, and reassign them to a new owner. Either old-owner or old-owner-id must be specified, but not both. Range : [0..2^32-1].
 Errno  Description
 EINTERNALERROR

 
disk-unfail [top]
Make a failed disk a spare again.
Input Name Range Type Description
disk string
Name of the disk, e.g. "v0.1".
 Errno  Description
 EINTERNALERROR
 EDISKNOTFOUND

 
Element definition: disk-detail-info [top]
Disk status information.
Name Range Type Description
bay integer
Disk bay, starting from 0. Range : [0..2^31-1].
broken-details string
optional
Reason for the disk failure, if raid-state is 'broken'. Possible values are 'unknown', 'failed', 'admin failed', 'labeled broken', 'init failed', 'admin removed', 'not responding', 'pulled', 'bad label', 'bypassed', and 'not failed'. If raid-state is not 'broken', broken-details will be omitted in the ouput.
bytes-per-sector integer
Bytes per sector. Range : [0..2^31-1].
checksum-compatibility string
Checksum compatibility based on BPS. Valid values are "zoned", "zoned/block", or "none".
firmware-revision string
Firmware revision of disk. The format of the firmware revision will vary depending on the type of disk and its vendor.
host-adapter string
Host adapter.
id integer
internal Id of disk. Range : [-2^31..2^31-1].
is-zeroed boolean
optional
True if the disk is a spare and has already been zeroed, false otherwise. If disk is not a spare or if it is currently being zeroed, this element will not be included with the output.
name string
Name of the disk, e.g. v1.1
physical-blocks integer
Number of physical blocks on disk. Range : [0..2^64-1].
physical-space integer
Physical disk size in bytes. Range : [0..2^64-1].
plex string
optional
Plex the disk belongs. Not returned if disk doesn't belong to any plex. Example : plex0.
pool string
optional
Pool the disk is in. Example : pool0.
port string
Port of disk, e.g. A.
port-name string
The port name of the disk object, e.g. FC:A.
raid-group string
optional
Raid group disk belongs. Not returned if disk doesn't belong to any raid group.
raid-state string
Raid state. Possible values are : partner, broken, zeroing, spare, pending, reconstructing, and present.
raid-type string
Raid type. Possible values are : pending, parity, data.
secondary-name string
Secondary name.
secondary-port string
Secondary port.
serial-number string
Disk serial number. Maximum leng of 129 characters.
shelf integer
Disk shelf. Range : [0..2^31-1].
used-blocks integer
Number of blocks used. Range : [0..2^64-1].
used-space integer
Used space in bytes. Range : [0..2^64-1].
vendor-id string
Vendor of this disk.
volume string
optional
Volume the disks is used in. Not returned if disk isn't used in any volume or if the disk belongs to a partner.
zeroing-percent integer
optional
Zeroing percentage done, if disk is being zeroed. Element is not returned if disk is not being zeroed. Range : [0..100].

 
Element definition: disk-sanown-detail-info [top]
Disk sanown information.
Name Range Type Description
is-failed boolean
'true' if the disk is failed, 'false' otherwise.
name string
Name of the disk, e.g. v1.1
owner string
optional
Owner of the disk. If disk has no owner, this will not be returned.
owner-id integer
optional
ID (NVRAM ID) of owner if there is one. Range : [0..2^32-1].
pool integer
optional
Pool the disk belongs to, if it has a owner.