.TH LSMCLI "1" "May 2013" "lsmcli 0.0.20" "libStorageMgmt" .SH NAME lsmcli \- LibStorageMgmt command line interface .SH SYNOPSIS .B lsmcli [\fIoptions\fR]... [\fIcommand\fR]... [\fIcommand options\fR]... .SH DESCRIPTION lsmcli is the command line tool for the libStorageMgmt library. This tool allows users to do one off storage related management operations or to script management of their storage. .SH "OPTIONS (global)" .TP \fB\-\-version\fR show program's version number and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .TP \fB\-u\fR URI, \fB\-\-uri\fR=\fIURI\fR uniform resource identifier (env LSMCLI_URI) .TP \fB\-P\fR, \fB\-\-prompt\fR prompt for password (env LSMCLI_PASSWORD) .TP \fB\-H\fR, \fB\-\-human\fR print sizes in human readable format (e.g., MiB, GiB, TiB) .TP \fB\-t\fR SEP, \fB\-\-terse\fR=\fISEP\fR print output in terse form with "SEP" as a record separator .TP \fB\-e\fR, \fB\-\-enum\fR display enumerated types as numbers instead of text .TP \fB\-f\fR, \fB\-\-force\fR bypass confirmation prompt for data loss operations .TP \fB\-w\fR WAIT, \fB\-\-wait\fR=\fIWAIT\fR command timeout value in ms (default = 30s) .TP \fB\-\-header\fR include the header with terse .TP \fB\-b\fR run the command asynchronously instead of waiting for completion. lsmcli command will exit with exit code(7) and job id will be written to stdout when a command is still executing on the storage array. Use --job-status to inquire on the progress of the command. .SH ENVIRONMENT .TP LSMCLI_URI The URI for the storage array in question. .TP LSMCLI_PASSWORD The password to use for the array. .IP .SH COMMANDS .TP \fB\-l\fR , \fB\-\-list=\fR .TP List records of type: [VOLUMES|INITIATORS|POOLS|FS|SNAPSHOTS|EXPORTS .br |NFS_CLIENT_AUTH|ACCESS_GROUPS|SYSTEMS] .TP Note: SNAPSHOTS listing requires: \fB\-\-fs\fR .TP \fB\-\-capabilities=\fR Retrieves array capabilities .TP \fB\-\-plugin\-info\fR Retrieves plugin description and version .TP \fB\-\-delete\-fs=\fR Delete a filesystem .TP \fB\-\-delete\-access\-group=\fR Deletes an access group .TP \fB\-\-access\-group\-add=\fR Adds an initiator to an access group, requires: .br \fB\-\-id\fR .TP \fB\-\-access\-group\-remove=\fR Removes an initiator from an access group, requires: .br \fB\-\-id\fR .TP \fB\-\-create\-volume=\fR Creates a volume (logical unit) requires: .br \fB\-\-size\fR .br \fB\-\-pool\fR .br \fB\-\-provisioning\fR (optional) [DEFAULT|THIN|FULL] .TP \fB\-\-create\-fs=\fR Creates a file system requires: .br \fB\-\-size\fR .br \fB\-\-pool\fR .TP \fB\-\-create\-ss=\fR Creates a snapshot requires: .br \fB\-\-file\fR (default is all files) .br \fB\-\-fs\fR .TP \fB\-\-create\-access\-group=\fR Creates an access group, requires: .br \fB\-\-id\fR .br \fB\-\-type\fR [WWPN|WWNN|ISCSI|HOSTNAME] .br \fB\-\-system\fR .TP \fB\-\-access\-group\-volumes=\fR Lists the volumes that the access group has been granted access to .TP \fB\-\-volume\-access\-group=\fR Lists the access group(s) that have access to volume .TP \fB\-\-volumes\-accessible\-initiator=\fR Lists the volumes that are accessible by the initiator .TP \fB\-\-initiators\-granted\-volume=\fR Lists the initiators that have been granted access to specified volume .TP \fB\-\-restore\-ss=\fR Restores a FS or specified files to previous snapshot state, requires: .br \fB\-\-fs\fR .br \fB\-\-file\fR .br \fB\-\-fileas\fR .br \fB\-\-all\fR (optional, exclusive option, restores all files in snapshot other options must be absent) .TP \fB\-\-clone\-fs=\fR Creates a file system clone requires: .br \fB\-\-name\fR .br \fB\-\-backing\-snapshot\fR (optional) .TP \fB\-\-clone\-file=\fR Creates a clone of a file (thin provisioned) requires: .br \fB\-\-src\fR .br \fB\-\-dest\fR .br \fB\-\-backing\-snapshot\fR (optional) .TP \fB\-\-delete\-volume=\fR Deletes a volume given its id .TP \fB\-\-delete\-ss=\fR Deletes a snapshot requires \fB\-\-fs\fR .TP \fB\-r\fR , \fB\-\-replicate\-volume=\fR replicates a volume, requires: .br \fB\-\-type\fR [SNAPSHOT|CLONE|COPY|MIRROR_ASYNC|MIRROR_SYNC] .br \fB\-\-name\fR .br Optional: .br \fB\-\-pool\fR (Plugin choice if absent) .br .TP \fB\-\-replicate\-volume\-range\-block\-size=\fR size of each replicated block in bytes .TP \fB\-\-replicate\-volume\-range=\fR Replicates a portion of a volume, requires: .br \fB\-\-type\fR [SNAPSHOT|CLONE|COPY|MIRROR] .br \fB\-\-dest\fR .br \fB\-\-src_start\fR .br \fB\-\-dest_start\fR .br \fB\-\-count\fR .TP \fB\-\-iscsi\-chap=\fR configures ISCSI inbound/outbound CHAP authentication .br Optional: .br \fB\-\-in\-user\fR .br \fB\-\-in\-password\fR .br \fB\-\-out\-user\fR .br \fB\-\-out\-password\fR Grants access to an initiator to a volume requires: .br \fB\-\-type\fR .br \fB\-\-volume\fR .br \fB\-\-access\fR [RO|RW], read\-only or read\-write .TP \fB\-\-access\-grant\-group=\fR Grants access to an access group to a volume requires: .br \fB\-\-volume\fR .br \fB\-\-access\fR [RO|RW], read\-only or read\-write .TP \fB\-\-access\-revoke=\fR Removes access for an initiator to a volume requires: .br \fB\-\-volume\fR .TP \fB\-\-access\-revoke\-group=\fR Removes access for access group to a volume requires: .br \fB\-\-volume\fR .br .TP \fB\-\-resize\-volume=\fR Re\-sizes a volume, requires: .br \fB\-\-size\fR .TP \fB\-\-resize\-fs=\fR Re\-sizes a file system, requires: .br \fB\-\-size\fR .TP \fB\-\-nfs\-export\-remove=\fR Removes a nfs export .TP \fB\-\-nfs\-export\-fs=\fR creates a nfs export .br Optional: .br \fB\-\-exportpath\fR e.g. /foo/bar. .br Note: root, ro, rw are to be repeated for each host .br \fB\-\-root\fR .br \fB\-\-ro\fR .br \fB\-\-rw\fR .br \fB\-\-anonuid\fR .br \fB\-\-anongid\fR .br \fB\-\-auth\-type\fR .TP \fB\-\-job\-status=\fR retrieve information about job .TP \fB\-\-volume\-dependants=\fR Returns True if volume has a dependant child .TP \fB\-\-volume\-dependants\-rm=\fR Removes dependencies .TP \fB\-\-fs\-dependants=\fR Returns true if a child dependency exists. .br \fB\-\-file\fR for File check (optional) .TP \fB\-\-fs\-dependants\-rm=\fR Removes dependencies .br \fB\-\-file\fR for File check (optional) .IP .SH COMMAND OPTIONS .TP \fB\-\-size\fR=\fIsize\fR size (Can use B, K, M, G, T, P postfix, IEC sizing) No postfix indicates bytes .TP \fB\-\-pool\fR=\fIpool\fR id pool ID .TP \fB\-\-provisioning\fR=\fIPROVISIONING\fR [DEFAULT|THIN|FULL] .TP \fB\-\-type\fR=\fItype\fR type specifier .TP \fB\-\-name\fR=\fIname\fR human readable name .TP \fB\-\-volume\fR=\fIvolume\fR volume ID .TP \fB\-\-access\fR=\fIaccess\fR [RO|RW], read\-only or read\-write access .TP \fB\-\-id\fR=\fIinitiator\fR id initiator id .TP \fB\-\-system\fR=\fIsystem\fR id system id .TP \fB\-\-backing\-snapshot=\fR backing snap shot name for operation .TP \fB\-\-src=\fR source of operation .TP \fB\-\-dest=\fR destination of operation .TP \fB\-\-file=\fR file to include in operation, option can be repeated .TP \fB\-\-fileas=\fR file to be renamed as, option can be repeated .TP \fB\-\-fs=\fR file system of interest .TP \fB\-\-exportpath=\fR desired export path on array .TP \fB\-\-root=\fR list of hosts with no_root_squash .TP \fB\-\-ro=\fR list of hosts with read/only access .TP \fB\-\-rw=\fR list of hosts with read/write access .TP \fB\-\-anonuid=\fR uid to map to anonymous .TP \fB\-\-anongid=\fR gid to map to anonymous .TP \fB\-\-authtype=\fR NFS client authentication type .TP \fB\-\-all\fR specify all in an operation .TP \fB\-\-src_start=\fR source block address to replicate .TP \fB\-\-dest_start=\fR destination block address to replicate .TP \fB\-\-count=\fR number of blocks to replicate .TP \fB\-\-in\-user=\fR CHAP inbound user name .TP \fB\-\-in\-password=\fR CHAP inbound password .TP \fB\-\-out\-user=\fR CHAP outbound user name .TP \fB\-\-out\-password=\fR CHAP outbound password .PP .SH FILES .TP ~/.lsmcli lsmcli configuration file, containing name-value pairs separated by '='. The only currently supported configuration option is 'uri', such as 'uri=ontap://user@filer.example.com'. Configuration options in .lsmcli are only used if not overridden by command-line option or environment variable. .SH BUGS Please report bugs to .SH AUTHOR Tony Asleson .PP