APIs in Category: lun
API version 1.3

 
file-get-space-reservation-info
file-set-space-reservation-info
lun-clone-start
lun-clone-status-list-info
lun-clone-stop
lun-create-by-size
lun-create-from-file
lun-create-from-snapshot
lun-destroy
lun-get-attribute
lun-get-comment
lun-get-maxsize
lun-get-minsize
lun-get-serial-number
lun-get-space-reservation-info
lun-list-info
lun-map
lun-map-list-info
lun-move
lun-offline
lun-online
lun-reset-stats
lun-resize
lun-restore-status
lun-set-attribute
lun-set-comment
lun-set-serial-number
lun-set-share
lun-set-space-reservation-info
lun-snap-usage-list-info
lun-stats-list-info
lun-unmap
lun-unset-attribute

NetApp Manage ONTAP
 
file-get-space-reservation-info [top]

Queries the space reservation settings for the named file.
Input Name Range Type Description
path string
File to be queried.
 
Output Name Range Type Description
is-fill-enabled boolean
Whether or not the file is set with fill.
is-overwrite-enabled boolean
Whether or not the file is set with overwrite.
 Errno  Description
 EFILENOTFOUND
 EINTERNALERROR

 
file-set-space-reservation-info [top]
Sets the space reservation settings for the named file.
Input Name Range Type Description
is-fill-enabled string
optional
Whether or not to set the file with fill.
is-overwrite-enabled boolean
optional
Whether or not to set the file with overwrite.
path string
File to be queried.
 Errno  Description
 EFILENOTFOUND
 EINTERNALERROR
 EINVALIDINPUTERROR
 ESETSPCRESERROR
 ENOSPC
 EROFS
 EISVDISK

 
lun-clone-start [top]
Start the cloning of the given LUN.
Input Name Range Type Description
path string
Path of the LUN to clone.
 Errno  Description
 EINVALIDINPUTERROR
 EROFS
 ENOMEM
 VDISK_ERROR_NO_SUCH_VDISK
 VDISK_ERROR_CLONING_STARTED
 VDISK_ERROR_NO_SUCH_ATTRIBUTE

 
lun-clone-status-list-info [top]
Get the cloning status of LUN(s).
Input Name Range Type Description
path string
optional
Path of the LUN. If path is specified, only the status of that clone is retuned. If path is not specified, then all cloning status are returned.
 
Output Name Range Type Description
clone-status clone-status-info[]
List of cloning status.
 Errno  Description
 EINVALIDINPUTERROR
 EINTERNALERROR
 VDISK_ERROR_NO_SUCH_ATTRIBUTE

 
lun-clone-stop [top]
Stop the cloning of the given LUN.
Input Name Range Type Description
path string
Path of the LUN to stop cloning.
 Errno  Description
 EINVALIDINPUTERROR
 EROFS
 VDISK_ERROR_NO_SUCH_VDISK
 VDISK_ERROR_NO_SUCH_ATTRIBUTE

 
lun-create-by-size [top]
Create a new lun of given size, with initially zero contents. The lun is created at the lun_path given. No file should already exist at the given lun_path. The directory specified in the lun_path must be a qtree root directory. The size of the created lun could be larger than the size specified, in order to get an integral number of cylinders while reporting the geometry using SAN protocols.
Input Name Range Type Description
path string
Path of the LUN.
size integer
New size for the LUN in bytes.
space-reservation-enabled boolean
optional
By default, the lun is space-reserved. If it is desired to manage space usage manually instead, this can be set to "false" which will create a LUN without any space being reserved.
type string
optional
Type of LUN. Currently, supported types are "solaris" (the lun will be used to store a Solaris raw disk in a single-slice partition), "windows" (the lun will be used to store a raw disk device in a single-partition Windows disk), "hpux" (the lun will be used to store HP-UX data), "aix" (the lun will be used to store AIX data), "linux" (the lun will be used to store a Linux raw disk without any partition table), "image" (the default type, indicating that no assumptions can be made about the contents in the lun). If the type argument is properly specified to reflect the use to which the lun will be put, it will be possible to access the same data (raw disk data) over both SCSI and network file system protocols: NFS, CIFS, DAFS.
 
Output Name Range Type Description
actual-size integer
The actualy size of the LUN that was created, in bytes.
 Errno  Description
 EINVALIDINPUTERROR
 EOFFLINE
 EISDIR
 EEXIST
 ENAMETOOLONG
 ENOENT
 EFTYPE
 EINVAL
 ENOSPC
 VDISK_ERROR_NOT_QTREE_ROOT
 VDISK_ERROR_NO_SUCH_VOLUME
 VDISK_ERROR_NO_SUCH_DIRECTORY
 VDISK_ERROR_SOURCE_IS_VDISK
 VDISK_ERROR_FILE_IS_SPC_RESERVED
 VDISK_ERROR_INVALID_SNAPSHOT_PATH
 VDISK_ERROR_NOT_IN_SAME_VOLUME
 VDISK_ERROR_SIZE_TOO_SMALL
 VDISK_ERROR_SIZE_TOO_LARGE

 
lun-create-from-file [top]
Create a lun from an existing file. A new lun is created, at the given lun_path (which must be at a qtree root). A hard link is created to the existing file. The file contents are not copied or changed. The file can be resized to a larger size, rounding up to a cylinder boundary.
Input Name Range Type Description
file-name string
A fully qualified filer path to the file to create the LUN from. This must be in the same qtree as the LUN being created.
path string
Would be Path of the newly created LUN if successful. This Path must not exists already (i.e a file or dir with this same path).
space-reservation-enabled boolean
optional
By default, the lun is space-reserved. If it is desired to manage space usage manually instead, this can be set to "false" which will create a LUN without any space being reserved.
type string
optional
Type of LUN. Currently, supported types are "solaris" (the lun will be used to store a Solaris raw disk in a single-slice partition), "windows" (the lun will be used to store a raw disk device in a single-partition Windows disk), "hpux" (the lun will be used to store HP-UX data), "aix" (the lun will be used to store AIX data), "vld" (the lun contains a Snapmanager VLD), "linux" (the lun will be used to store a Linux raw disk without any partition table), "image" (the default type, indicating that no assumptions can be made about the contents in the lun). If the type argument is properly specified to reflect the use to which the lun will be put, it will be possible to access the same data (raw disk data) over both SCSI and network file system protocols: NFS, CIFS, DAFS.
 
Output Name Range Type Description
actual-size integer
The actualy size of the LUN that was created, in bytes.
 Errno  Description
 EINVALIDINPUTERROR
 EOFFLINE
 EISDIR
 EEXIST
 ENAMETOOLONG
 ENOENT
 EFTYPE
 EINVAL
 ENOSPC
 VDISK_ERROR_NOT_QTREE_ROOT
 VDISK_ERROR_NO_SUCH_VOLUME
 VDISK_ERROR_NO_SUCH_DIRECTORY
 VDISK_ERROR_SOURCE_IS_VDISK
 VDISK_ERROR_FILE_IS_SPC_RESERVED
 VDISK_ERROR_INVALID_SNAPSHOT_PATH
 VDISK_ERROR_NOT_IN_SAME_VOLUME
 VDISK_ERROR_SIZE_TOO_SMALL
 VDISK_ERROR_SIZE_TOO_LARGE

 
lun-create-from-snapshot [top]
Creates a LUN in the active file system. The lun has the same initial contents as the referenced snapshot copy of an existing lun. (Note that no copy of the data is made.) Future writes go into the new lun. Reads of unmodified data are satisfied from the snapshot location. Reads of modified data are satisfied by first attempting to find the required buffer in the new lun. If a buffer is not found (buffer corresponds to a hole), it is looked for in the snapshot copy instead.
Input Name Range Type Description
path string
Path of the LUN.
snapshot-lun-path string
LUN path in the snapshot to be created from.
space-reservation-enabled boolean
optional
By default, the lun is space-reserved. If it is desired to manage space usage manually instead, this can be set to "false" which will create a LUN without any space being reserved.
type string
optional
Type of LUN. Currently, supported types are "solaris" (the lun will be used to store a Solaris raw disk in a single-slice partition), "windows" (the lun will be used to store a raw disk device in a single-partition Windows disk), "hpux" (the lun will be used to store HP-UX data), "aix" (the lun will be used to store AIX data), "linux" (the lun will be used to store a Linux raw disk without any partition table), "image" (the default type, indicating that no assumptions can be made about the contents in the lun). If the type argument is properly specified to reflect the use to which the lun will be put, it will be possible to access the same data (raw disk data) over both SCSI and network file system protocols: NFS, CIFS, DAFS.
 
Output Name Range Type Description
actual-size integer
The actualy size of the LUN that was created, in bytes.
 Errno  Description
 EINVALIDINPUTERROR
 EOFFLINE
 EISDIR
 EEXIST
 ENAMETOOLONG
 ENOENT
 EFTYPE
 EINVAL
 ENOSPC
 VDISK_ERROR_NOT_QTREE_ROOT
 VDISK_ERROR_NO_SUCH_VOLUME
 VDISK_ERROR_NO_SUCH_DIRECTORY
 VDISK_ERROR_SOURCE_IS_VDISK
 VDISK_ERROR_FILE_IS_SPC_RESERVED
 VDISK_ERROR_INVALID_SNAPSHOT_PATH
 VDISK_ERROR_NOT_IN_SAME_VOLUME
 VDISK_ERROR_SIZE_TOO_SMALL
 VDISK_ERROR_SIZE_TOO_LARGE

 
lun-destroy [top]
Destroy the specified LUN. This operation will fail if the LUN is currently mapped and is online. The force option can be used to destroy it regardless of being online or mapped.
Input Name Range Type Description
force boolean
optional
Forcibly destroy the LUN regardless of it being online or mapped.
path string
Path of the LUN.
 Errno  Description
 EINVALIDINPUTERROR
 EROFS
 ENOENT
 VDISK_ERROR_NO_SUCH_VDISK
 VDISK_ERROR_VDISK_EXPORTED

 
lun-get-attribute [top]
Get a named attribute for a given LUN.
Input Name Range Type Description
name string
Attribute to set.
path string
Path of the LUN.
 
Output Name Range Type Description
value string
Value to set the attribute to.
 Errno  Description
 EINVALIDINPUTERROR
 VDISK_ERROR_NO_SUCH_VDISK

 
lun-get-comment [top]
Get the optional descriptive comment for a LUN.
Input Name Range Type Description
path string
Path of the LUN.
 
Output Name Range Type Description
comment string
Comment for given LUN.
 Errno  Description
 EINVALIDINPUTERROR
 ENOMEM
 VDISK_ERROR_NO_SUCH_VDISK
 VDISK_ERROR_NO_SUCH_ATTRIBUTE

 
lun-get-maxsize [top]
Returns the maximum possible size in bytes of a lun on a given volume or qtree. The user can pass the path to a volume or qtree in which the lun is to be created. This returns the maximum size for different types of luns and the possible maximum size with or without snapshot reserves.
Input Name Range Type Description
path string
Path of the volume or qtree.
type string
Maximum size of LUN for specified OS type. Current supported types are "solaris", "windows", "hpux", "aix", "vld", "linux", "image".
 
Output Name Range Type Description
with-snapshot-reserve integer
Maximum possible size for LUN with snapshot reserve.
without-snapshot-reserve integer
Maximum possible size for LUN without snapshot reserve.
 Errno  Description
 EINVALIDINPUTERROR
 EINVAL
 ENOENT

 
lun-get-minsize [top]
Returns the minimum possible size in bytes. This returns the minimum size for different types of luns (based on the specified OS type). Space reservation does not affect the minimum lun size, thus only a single minimum size is returned.
Input Name Range Type Description
type string
Minimum size of LUN for specified OS type. Type of LUN. Current supported types are "solaris", "windows", "hpux", "aix", "vld", "linux", "image".
 
Output Name Range Type Description
min-size integer
Minimum possible size for LUN.
 Errno  Description
 EINVALIDINPUTERROR

 
lun-get-serial-number [top]
Get the serial number for the specified LUN. The serial number is a 12-character string formed of upper and lower-case letters, numbers, and slash (/) and hyphen (-) characters.
Input Name Range Type Description
path string
Path of the LUN.
 
Output Name Range Type Description
serial-number string
Serial number for the LUN.
 Errno  Description
 EINVALIDINPUTERROR
 EINTERNALERROR
 EROFS
 VDISK_ERROR_NO_SUCH_VDISK

 
lun-get-space-reservation-info [top]
Queries the space reservation settings for the named LUN.
Input Name Range Type Description
path string
Name of the LUN to be queried.
 
Output Name Range Type Description
is-enabled boolean
Whether or not the LUN has space reservation enabled.
 Errno  Description
 EFILENOTFOUND
 EINTERNALERROR

 
lun-list-info [top]
Get the status (size, online/offline state, shared state, comment string, serial number, LUN mapping) of the given LUN, or all LUNs.
Input Name Range Type Description
path string
optional
Path of LUN. If specified, only the information of that LUN is returned. If not specified, then information of all LUNs are returned.
 
Output Name Range Type Description
luns lun-info[]
Information of a list of LUNs.
 Errno  Description
 EINTERNALERROR
 EINVALIDINPUTERROR
 VDISK_ERROR_NO_SUCH_VDISK
 ENOSYS

 
lun-map [top]
Maps the LUN to all the initiators in the specified. initiator group.
Input Name Range Type Description
initiator-group string
Initiator group to map to the given LUN.
lun-id integer
optional
If the lun-id is not specified, the smallest number that can be used for the various initiators in the group is automatically picked.
path string
Path of the LUN.
 
Output Name Range Type Description
lun-id-assigned integer
LUN ID assigned for this map. If lun-id is not supplied, this will be an auto-assigned LUN ID, otherwise it will be the same as the supplied LUN ID if map is successful.
 Errno  Description
 EINVALIDINPUTERROR
 EROFS
 VDISK_ERROR_INITGROUP_HAS_VDISK
 VDISK_ERROR_NO_SUCH_VDISK
 VDISK_ERROR_NO_EXPORTED_VDISK_SHARE_WRITE

 
lun-map-list-info [top]
Returns a list of initiator groups and their members (the initiators) mapped to the given LUN.
Input Name Range Type Description
path string
LUN for which the initiator group list is requested.
 
Output Name Range Type Description
initiator-groups initiator-group-info[]
List of initiator groups that are mapped to the given LUN.
 Errno  Description
 EFILENOTFOUND
 EINTERNALERROR
 EINVALIDINPUTERROR

 
lun-move [top]
Move (rename) a LUN.
Input Name Range Type Description
new-path string
New path of the LUN being moved to.
path string
Path of the LUN to be moved.
 Errno  Description
 EINVALIDINPUTERROR
 EROFS
 EISDIR
 EEXIST
 EOFFLINE
 VDISK_ERROR_NO_SUCH_VDISK
 VDISK_ERROR_NOT_QTREE_ROOT
 VDISK_ERROR_NOT_IN_SAME_VOLUME
 VDISK_ERROR_VDISK_EXISTS

 
lun-offline [top]
Disables block-protocol accesses to the LUN. Mappings, if any, configured for the lun are not altered. Note that unless explicitly offlined, a lun is online.
Input Name Range Type Description
path string
Path of the LUN.
 Errno  Description
 EINVALIDINPUTERROR
 EROFS
 VDISK_ERROR_NO_SUCH_VDISK
 VDISK_ERROR_VDISK_NOT_ENABLED

 
lun-online [top]
Re-enables block-protocol accesses to the lun.
Input Name Range Type Description
path string
Path of the LUN.
 Errno  Description
 EINVALIDINPUTERROR
 EROFS
 VDISK_ERROR_NO_SUCH_VDISK
 VDISK_ERROR_VDISK_NOT_DISABLED
 VDISK_ERROR_NO_EXPORTED_VDISK_SHARE_WRITE

 
lun-reset-stats [top]
Resets (zeroes) block-protocol access statistics for LUN(s).
Input Name Range Type Description
path string
optional
Path of the LUN. If path is specified, the stats of that LUN will be reset. If path is not specified, stats of all LUNs are reset.
 Errno  Description
 EINVALIDINPUTERROR
 VDISK_ERROR_NO_SUCH_VDISK

 
lun-resize [top]
Changes the size of the lun. Note that client-side operations may be needed to ensure that client software recognizes the changed size.
Input Name Range Type Description
force boolean
optional
Forcibly reduce the size. This is required for reducing the size of the LUN to avoid accidentally reducing the LUN size.
path string
Path of the LUN.
size integer
New size for the LUN.
 
Output Name Range Type Description
actual-size integer
Actual new size. This may be different from the specified size due to the requested size not fitting on a cylinder boundry.
 Errno  Description
 EINVALIDINPUTERROR
 EROFS
 VDISK_ERROR_NO_SUCH_VDISK
 VDISK_ERROR_SIZE_TOO_LARGE
 VDISK_ERROR_RESIZE_TOO_LARGE
 ENOSPC
 VDISK_ERROR_MUST_SPECIFY_F_FLAG
 VDISK_ERROR_SIZE_TOO_SMALL
 VDISK_ERROR_SIZE_UNCHANGED

 
lun-restore-status [top]
Get state of LUN restore.
Input Name Range Type Description
path string
Path of the LUN.
 
Output Name Range Type Description
is-running boolean
'true' if file restore is currently running for this vdisk, 'false' otherwise.
 Errno  Description
 EINVALIDINPUTERROR
 EINTERNALERROR
 VDISK_ERROR_NO_SUCH_VDISK

 
lun-set-attribute [top]
Set a named attribute for a given LUN.
Input Name Range Type Description
name string
Attribute to set.
path string
Path of the LUN.
value string
Value to set the attribute to.
 Errno  Description
 EINVALIDINPUTERROR
 VDISK_ERROR_NO_SUCH_VDISK

 
lun-set-comment [top]
Set the optional descriptive comment for a LUN.
Input Name Range Type Description
comment string
Comment to set for given LUN.
path string
Path of the LUN.
 Errno  Description
 EINVALIDINPUTERROR
 ENOMEM
 EROFS
 VDISK_ERROR_NO_SUCH_VDISK
 VDISK_ERROR_NO_SUCH_ATTRIBUTE

 
lun-set-serial-number [top]
Set the serial number for the specified LUN. The lun must first be made offline before changing the serial number. The serial number is a 12-character string formed of upper and lower-case letters, numbers, and slash (/) and hyphen (-) characters.
Input Name Range Type Description
path string
Path of the LUN.
serial-number string
Serial number for the LUN.
 Errno  Description
 EINVALIDINPUTERROR
 EROFS
 VDISK_ERROR_NO_SUCH_VDISK
 VDISK_ERROR_VDISK_NOT_DISABLED

 
lun-set-share [top]
Enables file system protocol-based access to a lun. By default, all accesses are disallowed. Note that file permissions and ACL entries still apply.
Input Name Range Type Description
path string
Path of the LUN.
share-type string
Valid values are "all", "none", "read", "write".
 Errno  Description
 EINVALIDINPUTERROR
 VDISK_ERROR_NO_SUCH_VDISK
 VDISK_ERROR_NO_EXPORTED_VDISK_SHARE_WRITE

 
lun-set-space-reservation-info [top]
Sets the space reservation settings for the named LUN.
Input Name Range Type Description
enable boolean
Enable or disable space reservation on this LUN.
path string
Path to the LUN for which the space reservations need to be set.
 Errno  Description
 EFILENOTFOUND
 EINTERNALERROR
 EINVALIDINPUTERROR
 ESETSPCRESERROR
 ENOSPC

 
lun-snap-usage-list-info [top]
Lists all LUNs backed by data in the specified snapshot. It also lists the corressponding snapshots in which these LUNs exist.
Input Name Range Type Description
snapshot string
Name of the snapshot.
volume string
Name of the volume.
 
Output Name Range Type Description
lun-snap-usage-luns lun-snap-usage-lun-info[]
List of LUNs backed by data in the specified snapshot.
 Errno  Description
 EINVALIDINPUTERROR
 VDISK_ERROR_NO_SUCH_VOLUME
 VDISK_ERROR_NO_SUCH_SNAPSHOT

 
lun-stats-list-info [top]
Get block-protocol access statistics (in bytes) for LUN(s).
Input Name Range Type Description
path string
optional
Path of the LUN. If path is specified, only the stats of that LUN is returned. If path is not specified, stats of all LUNs are returned.
 
Output Name Range Type Description
lun-stats lun-stats-info[]
List of LUN stats.
 Errno  Description
 EINVALIDINPUTERROR
 VDISK_ERROR_NO_SUCH_VDISK

 
lun-unmap [top]
Reverses the effect of lun-map on the specified LUN for the specified group.
Input Name Range Type Description
initiator-group string
Initiator group to unmap from.
path string
Path of the LUN.
 Errno  Description
 EINVALIDINPUTERROR
 EROFS
 VDISK_ERROR_NO_SUCH_VDISK
 VDISK_ERROR_NO_EXPORTED_VDISK_SHARE_WRITE
 VDISK_ERROR_NO_SUCH_EXPORT
 VDISK_ERROR_NO_SUCH_INITGROUP

 
lun-unset-attribute [top]
Clear a named attribute for a given LUN.
Input Name Range Type Description
name string
Name of attribute to set.
path string
Path of the LUN.
 Errno  Description
 EINVALIDINPUTERROR
 VDISK_ERROR_NO_SUCH_VDISK

 
Element definition: clone-status-info [top]
Status of a cloning.
Name Range Type Description
blocks-completed integer
Number of blocks completed.
blocks-total integer
Total blocks to clone. The percentage complete is (completed * 100) / total
path string
LUN path being cloned.

 
Element definition: initiator-group-info [top]
Information about an initiator group.
Name Range Type Description
initiator-group-name string
Name of this initiator group.
initiator-group-os-type string
OS type of the initiator group, i.e. "windows", "solaris", etc.
initiator-group-throttle-borrow boolean
Boolean value to indicate that the igroups throttle reserve may be exceeded if the igroup attempts to use more than it has reserved.
initiator-group-throttle-reserve integer
Percentage of filer SCSI command blocks reserved for this initiator group's exclusive usage.
initiator-group-type string
Type of the initiators in this group. Current supported types are "iscsi" and "fcp".
initiators initiator-info[]
List of initiators belonging to this group.

 
Element definition: lun-info [top]
Information of a LUN.
Name Range Type Description
backing-snapshot string
optional
Path to the backing snapshot file for a vdisk, if there is one. Only returned if it has one.
mapped boolean
Weather or not the LUN is mapped to any initiators. "true" if mapped, "false" otherwise.
online boolean
State of the LUN, ("online" or "offline"). "true" if online, "false" otherwise.
path string
Path of the LUN.
read-only boolean
"true" if the LUN is read only, "false" if read/write.
share-state string
Share state of the LUN, ("all", "none", read", or "write"). In the very rare case that the share state can not be determined, "unknown" is returned.
size integer
Size of this LUN.

 
Element definition: lun-snap-usage-lun-info [top]
Details of the LUN backed by specified snapshot.
Name Range Type Description
backing-store string
Path of the LUN serving as the backing store.
path string
Path of the LUN.
snapshot string
Name of the snapshot in which the LUN exists.

 
Element definition: lun-stats-info [top]
Stats for a LUN.
Name Range Type Description
block-size integer
Disk block size for this LUN.
last-zeroed integer
Total number of seconds since the statistics for this lun were last zeroed.
other-ops integer
Total number of other scsi ops executed.
path string
path of the LUN. (for example, "/vol/vol0/lun1")
read-blocks integer
Number of disk blocks read.
read-ops integer
Total number of scsi read ops executed.
write-blocks integer
Number of disk blocks written.
write-ops integer
Total number of scsi write ops executed.

 
Element definition: initiator-info [top]
Information about one initiator.
Name Range Type Description
initiator-name string
Name of the initiator.