Storage Appliance API v40-1-0

Copyright () , Inc. All rights reserved.

1 API Overview 2 Block Diagram 3 Terms and Conventions 4 Object Model 5 Data Types 5.1 Primitive Data Types 5.2 Receiving an Array 5.3 Receiving a Dictionary 5.4 Receiving Complex Data Types 5.5 Passing an Array 5.6 Passing a Dictionary 6 Virtual Base Object 6.1 get_prop - Get the property value 6.2 get_props - Get { propname => value } dictionary of all properties ... 6.3 set_prop - Set the value of property 6.4 set_props - Set the properties according to dictionary 6.5 trylock_self - Make an attempt to lock the object. Unlike com.nexenta.nms.Container::trylock ... 6.6 unlock_self - Unlock object. Unlike com.nexenta.nms.Container::unlock it unlocks object self, not ... 7 Virtual Container 7.1 destroy - Destroy a child object. 7.2 get_child_prop - Get the value of a property for a child object. ... 7.3 get_child_props - Get the list of properties and values that match the ... 7.4 get_names - Get the list of names of all child objects that ... 7.5 get_names_by_prop - Get the list of all child objects that have a ... 7.6 object_exists - Verify that an object exists. 7.7 set_child_prop - Update a property of a child object with a new ... 7.8 trylock - Try to lock a child object. 7.9 unlock - Unlock a child object. 8 Appliance Backup 8.1 get_saved_configurations - Returns the list of saved appliance configurations 8.2 get_state - Returns current state of a save/restore process 8.3 restore_app_configuration - Restores appliance configuration 8.4 save_app_configuration - Save appliance configuration 9 AutoScrub (volume scrubbing) Service 10 AutoSnap (snapshot) Service 11 AutoTier (data replication) Service 12 Fault Management 12.1 clear - Clear specific fault ID 12.2 clear_all - Clear all faults generated by the specified fault trigger ... 12.3 event - Create and send an event for the specified trigger ... 12.4 fault - Generate a fault notification 12.5 get_faults - Get the list of faults generated by the specified fault ... 13 Folder (Filesystem) 13.1 add_group_acl - Add the group's permissions to access a given folder and ... 13.2 add_user_acl - Add the user's permissions to access a given folder and ... 13.3 clone - Create a clone of a snapshot. Clone is a writable ... 13.4 create - Create "paths" to folders 13.5 create_snapshot - Snapshot a given folder and possibly its sub-folders 13.6 create_with_props - Create a "path" of folders. This API method enables you ... 13.7 del_group_acl - Remove the group's permissions from the folder's ACL 13.8 del_user_acl - Remove the user's permissions from the folder's ACL 13.9 get_acl - Get folder's ACL for the entities that match the pattern ... 13.10 get_acl_by_index - Retrieve the complete folder's ACL, and possibly check for duplicate ... 13.11 get_aclinfo - Get the ACL related static information: the groups of permissions ... 13.12 get_all_names - Get an array of all child object names that match ... 13.13 get_groupspace - Get the groupspace parameters 13.14 get_groupspace_types - Get the list of available groupspace types. 13.15 get_prop_valid_values - Get the valid range and/or enumeration for a given folder's ... 13.16 get_subfolder_names - Get the sub-folder names 13.17 get_userspace - Get the userspace parameters 13.18 get_userspace_types - Get the available userspace types 13.19 get_version_info - Get the folder's ZFS version 13.20 has_zfs_prop - Determine whether a property exists or not 13.21 inherit_prop - Restore a system-default inheritance of a ZFS property. The method ... 13.22 promote - Promotes a cloned dataset to no longer be dependent on ... 13.23 reset_acl - Reset the folder's ACLs to the system default (POSIX, built-in) ... 13.24 set_group_acl - Set the group's permissions to access a given folder and ... 13.25 set_group_owner - Change the group ownership for a given folder. 13.26 set_user_acl - Set the user's permissions to access a given folder and ... 13.27 set_user_owner - Change the user ownership of a folder 13.28 upgrade - Upgrade folder's ZFS version 13.29 upgrade_folders - Upgrade folder's ZFS version recursively 14 Folder and Snapshot Indexing Facility (Search Engine) 14.1 create - Create indexer for the specified folder. Once created, the indexer ... 14.2 search - Search the folder and its snapshot(s). 15 General Appliance Management 15.1 add_swap - Add a zvol as an additional swap area. 15.2 configure_ugen_device - Configure a generic USB device. 15.3 create_checkpoint - Create a checkpoint from a system snapshot. 15.4 dbus_auth_iptable_is_set - Determine whether the deny/allow access rule is present in the ... 15.5 dbus_auth_iptable_list - Get all iptable access rules. The NexentaStor appliance provides a ... 15.6 dbus_auth_iptable_set - Deny/Allow access to the NexentaStor appliance from the specified IP ... 15.7 dbus_auth_iptable_unset - Remove Deny/Allow access rule from the appliance's iptable. This method ... 15.8 dbus_auth_keys_add - Add a new key to the key authorization table on ... 15.9 dbus_auth_keys_list - Get all authorization keys and their IDs. NexentaStor Storage Appliance ... 15.10 dbus_auth_keys_remove - Remove an authentication key. 15.11 delete_swap - Remove zvol swap area, and undo the result of the ... 15.12 get_cpu_info - Get the detailed per-CPU information. 15.13 get_dumpdir - Get the location of the 15.14 get_etchosts_rec - Get the record from the appliance's local host table for ... 15.15 get_fqdn - Get a fully qualified domain name (FQDN) of the appliance. ... 15.16 get_general_diagnostics - Get the general diagnostics, collect all log information in a ... 15.17 get_host_by_addr - Resolve a hostname by IP address. 15.18 get_kbd_layouts - Get the list of all supported keyboard layouts. 15.19 get_license_info_ - Get the license information. 15.20 get_memstat - Get the RAM utilization information. 15.21 get_saved_configurations - Get the list of all saved configurations. 15.22 get_saved_user_configurations - Returns the list of saved appliance configurations. This method is ... 15.23 get_serial_names - Get the list of all available serial ports. 15.24 get_subtimezones - Get the list of time zones for the specified country ... 15.25 get_timezone_continent - Get the time zone code for the specified time zone. ... 15.26 get_timezone_continents - Get the list of continents for the available time zones. ... 15.27 get_timezone_country_code - Get the time zone code for the specified country. ... 15.28 get_timezones - Get the list of all available time zones for the ... 15.29 get_upgrade_info - Get the information about upgrades on this NexentaStor appliance ... 15.30 get_uptime - Get the appliance's uptime, including the following information: the current ... 15.31 group_configuration_sync_set - Synchronize group configuration by enabling or disabling the synchronization. ... 15.32 is_rebooting - Verify that NexentaStor appliance is rebooting 15.33 list_appliances - Get the list of all SSH-bound as well as dynamically ... 15.34 list_conf_ugen_hid_devs - Get the configuration of all USB devices. 15.35 list_swap - Get the summary information about total swap space usage, existing ... 15.36 list_unconf_hid_devs - Get the list of unconfigured USB devices. 15.37 ns_getent - Get the list of local and LDAP users, groups, and ... 15.38 ns_group_del - Delete a group 15.39 ns_group_exists - Verify that a group exists. 15.40 ns_group_get - Get the group properties, such as group ID, group members, ... 15.41 ns_group_idmap_get - Get the identity mapping for a Unix group. 15.42 ns_group_set - Modify the existing local group or create a new group. ... 15.43 ns_netgroup - Get the list of hosts (computers) included in a netgroup ... 15.44 ns_user_del - Delete a specified user 15.45 ns_user_exists - Verify, if a user exists 15.46 ns_user_get - Get the properties for a specified local or LDAP user. ... 15.47 ns_user_idmap_get - Get an identity mapping for a Unix user. 15.48 ns_user_set - Modify an existing local user or add a new local ... 15.49 ping_tcp - Ping host using TCP 15.50 poweroff - Get the descriptions of the saved appliance's configurations 15.51 reboot - Reboot the appliance 15.52 reset_ugen_configuration - Reset the current USB devices configuration 15.53 restore_configuration - Restore an appliance's configuration from the most recent copy stored ... 15.54 restore_volume_services - Restore the volume services 15.55 save_configuration - Save appliance's configuration at a pre-defined location. The location in ... 15.56 save_user_configuration - Save appliance's configuration at a pre-defined location. The location in ... 15.57 set_dumpdir - Set a datapath for the directory that stores system crash ... 15.58 set_etchosts_rec - Add, replace or delete a record from the appliance's local ... 15.59 set_license_key - Update license key 15.60 ssh_bind - Bind a given (user, appliance) to the specified remote host ... 15.61 ssh_bind_add - Create the ssh-binding on the remote NexentaStor appliance 15.62 ssh_bind_delete - Delete the ssh-binding on the remote NexentaStor appliance 15.63 ssh_bind_v2 - Extension for the ssh_bind method, which enables you to use ... 15.64 ssh_bind_vip - Bind a standalone NexentaStor appliance to a cluster group virtual ... 15.65 ssh_check_binding - Verify whether the specified appliance is SSH-bound to the specified ... 15.66 ssh_list_bindings - Get all existing SSH bound hosts 15.67 ssh_unbind - SSH-unbind a given (user, appliance) from the specified remote host. ... 15.68 ssh_unbind_v2 - Extension for the ssh_unbind method, which enables you to use ... 15.69 ssl_bind - Add a new certificate to LDAP managed database 15.70 ssl_check_binding - Check whether the specified certificate exists in database 15.71 ssl_direct_bind - Add a new certificate to LDAP managed database 15.72 ssl_list_bindings - Get trusted host information for all existing certificates 15.73 ssl_list_certificates - Get certificate files 15.74 ssl_list_certinfos - Get certificate information for all existing certificates 15.75 ssl_unbind - Remove the specified certificate from the database - compare with ... 15.76 ssl_unbind_by_hostname - Remove a certificate from the LDAP managed database 15.77 stat_file - Collects and returns info for file path, including file type, ... 15.78 sysnotice_check - Check NMS sytem notice file 15.79 sysnotice_set - Update NMS sytem notice file 15.80 sysnotice_unset - Clear NMS sytem notice file 15.81 upgradable_packages - Get the list of packages to upgrade, when you run ... 15.82 upgradable_packages_check - Determine what packages require upgrade 15.83 upgrade_check - Check for appliance software upgrades 15.84 user_restore_configuration - Restore an appliance's configuration from the most recent copy stored ... 15.85 user_restore_volume_services - Restore volume services 16 Groups of Appliances Management 16.1 create - Create a new group of two or more NexentaStor appliances. ... 16.2 get_all - Get the list of all supported groups of all types. ... 16.3 get_all_members - Get the list of members of all groups. 16.4 get_group_types - Get the list of supported group types, for example ['basic']. ... 16.5 get_members - Get the list of members of the specified group. ... 17 JBOD Management 17.1 get_all_indicators - Get the status of the LED for each element in ... 17.2 get_elements - Get the list of elements. For type 'slot' all elements ... 17.3 get_failed_sensors - Get the list of sensors with failures. To get more ... 17.4 get_picture - Get a picture or an exception, if no item with ... 17.5 get_sensors - Get the list of sensors for a JBOD. 17.6 ident_off - Turn off the identification LED for a given element ... 17.7 ident_on - Turn on the identification LED for a given element ... 17.8 ident_state - Return the current status of an identification LED for a ... 17.9 ident_toggle - Switch the identification LED on a given element. It is ... 17.10 jbod_set_alias - Set user friendly name for a JBOD ID. 17.11 list_supported - Collect the information about the supported JBODs 17.12 rename_model - Rename JBOD's model 17.13 rescan - Update and re-read JBODs and disks. Use this method after ... 18 Job Management 18.1 cleanup_jobs - Delete the information aboioout the completed Jobs with expired 'autocleanup' ... 18.2 destroy_job - Delete/Cancel Job. 18.3 get_jobparams - Get the parameters of current Job 18.4 get_jobs - Get the list of current Jobs in a JSON format ... 18.5 get_jobtype_param_descs - Get the descriptions of the start parameters for the Job ... 18.6 get_jobtypes - Get the list of registered Job types 18.7 get_pid_by_unique_param - Get the list of Jobs for the specified unique startup ... 18.8 get_pids_by_param - Get the list of Jobs for the specified startup parameter ... 18.9 start_job - Start the Job with the specified parameters 19 Log Viewing Facility 19.1 get_linecount - Get the current position (line number) in the file ... 19.2 get_lines - Get the specified number of lines from the log file ... 19.3 get_tail - Get the specified number of lines from the end of ... 20 Logical and Physical Disk Management 20.1 blink_running - Verify that LED on a LUN blikns 20.2 blink_start - Start the LED blinking on a specified LUN 20.3 blink_stop - Stop LED blinking on a specified LUN 20.4 cache - Retrieve, enable and disable on-disk read and write cache. The ... 20.5 clear_slotmap - Clear the slotmap file content 20.6 disk_is_avail - Determine whether the specified disk (LUN) is available for usage, ... 20.7 get_lun_replacement_info - Get the LUN replacement information 20.8 get_slotmap - Get slot mapping information 20.9 have_slotmap - Check the existence of the slotmap file by type ... 20.10 hba_command - Execute the 'cfgadm -c operation' on each hbas 20.11 hba_list - Get the list of all HBAs by executing 'cfgadm -anl' ... 20.12 lunsync - Synchronize the LUNs and re-enumerate the devices in the appliance. ... 20.13 mounted_disks - Get the list of all mounted disks. The disk is ... 20.14 rescan - Refresh the states of LUNs. 20.15 resolve_to_vdevs - Retrieve the information about vdev that includes a specified LUN. ... 20.16 set_assignment - Set the assignment of a disk drive. Assignment defines the ... 20.17 set_slotmap - Set the slotmap parameters. 21 NMS Pool Management 21.1 disable - Disable NMS Pool support 21.2 enable - Enable NMS Pool support 21.3 get_pool - Get additional information about NMS Pool 21.4 kill_nms - Kill the process with specified PID 21.5 start_nms - Starts new NMS instance 22 Network Interface Management 22.1 change_aggr_props - Change the network agregation properties 22.2 check_static - Check the static network interface 22.3 create_aggr - Create an 802.3ad aggregated network interface (link). 22.4 create_aggr_with_props - Create link aggregation with specified parameters 22.5 create_ipalias - Create an IP alias (aka "logical IP interface"). 22.6 create_ipmp_group - Create an IPMP group 22.7 create_vlan - Create a VLAN interface. 22.8 destroy_aggr - Destroy the specified aggregated link. This operation reverses the result ... 22.9 destroy_ipalias - Destroy an IP alias. 22.10 destroy_ipmp_group - Destroys and IPMP group 22.11 destroy_vlan - Destroy a VLAN interface. 22.12 get_aggr_props - Get the parameters of the aggregated interface 22.13 get_linkprops - Get the properties of the specified aggregated interface 22.14 get_max_mtu - Get the maximum MTU size supported by a given network ... 22.15 get_min_mtu - Get the minimum MTU size supported by a given network ... 22.16 get_names_by_type - Get the list of network interface names with the specified ... 22.17 get_other_drv_ifaces - Get the list of all network interfaces, that use the ... 22.18 ipaddr_to_dev - Get the interface name by IP address 22.19 is_capable - The method determines whether a given network interface driver has ... 22.20 is_drv_locked - The method evaluates the following condition: determines if one or ... 22.21 is_drv_reload_required - The method that determines whether the network interface driver must ... 22.22 refresh - Refresh the network interface object 22.23 set_dhcp - Configure the specified network interface using DHCP. Note that unlike ... 22.24 set_linkprop - Set the property of the network interface 22.25 set_macaddr - Set a MAC address for a given network interface. ... 22.26 set_mtu - Set the MTU for specified network interface. 22.27 set_static - Statically configure a network interface. Compare with com.nexenta.nms.NetworkInterface::set_dhcp. Use ... 22.28 set_static_extended - Statically configure the specified network interface with the additional parameters. ... 22.29 set_unconfigure - Unconfigure a network interface. This operation reverses the results of ... 23 Network Management 23.1 add_route - Add a route to a given destination using the specified ... 23.2 delete_route - Delete a route, a destination and a gateway. 23.3 find_gateway_hostname - Find the corresponding gateway for a given remote IP address. ... 23.4 gateway - Get the appliance's default gateway. 23.5 get_netmasks - Get the list of netmasks configured on the NexentaStor appliance. ... 23.6 get_nmv_props - Get the list of the Nexenta Management View (NMV) properties ... 23.7 get_nmv_url - Get the Nexenta Management View (NMV) URL for the appliance. ... 23.8 get_routes - Get all routes. 23.9 host_to_ipaddr - Get the IP address by hosname 23.10 is_port_free - Verify that the specified port is free 23.11 nameservers - Get name servers. 23.12 primary - Get the primary network interface. 23.13 remote_ipaddr_to_local_dev - Map a remote IP address to a local NIC for ... 23.14 set_gateway - Set the appliance's default gateway. 23.15 set_nameservers - Set the name servers. Appliance may have up to 3 ... 23.16 set_netmasks - Set netmasks on the NexentaStor appliance, 23.17 set_nmv_props - Set the NMV specific properties 23.18 set_primary - Set the primary network interface. 24 Network Services Management 24.1 confcheck - Check service state and configuration 24.2 get_conffiles_ - List of service configuration files 24.3 get_confmethods - The list of the available network service methods 24.4 get_confmethods_desc - Get the list of the available network service methods and ... 24.5 get_confopts - Returns the list of possible commands for setting up the ... 24.6 get_logfiles_ - List of service log files 24.7 get_smbadmlist - Returns information about the current workgroup or domain 24.8 set_confopts - Setup configuration method. 25 Network Storage Service 25.1 get_share_confopts - Get the static configuration options associated with the specified storage ... 25.2 get_shared_folders - Get all folders that are shared using the specified storage ... 25.3 get_shareopts - Get configuration options associated with the specified share 25.4 get_smf_netserv_services - Get the list of SMF network services that has any ... 25.5 is_folder_shared - Find out whether the specified folder is shared using the ... 25.6 share_folder - Share the specified folder using the specified storage access protocol ... 25.7 smf_netserv_status - Get the status of SMF network services. 25.8 unshare_all - Unshare the specified folder globally, as far as all or ... 25.9 unshare_folder - Unshare the specified folder from access using the specified storage ... 26 Nexenta Management Server 26.1 append_log - Add lines to Server log 26.2 event_broadcast - Create event broadcast message 26.3 fma_event_callback - Passthrough fma event to report a fault 26.4 get_const - Get predefined system constants 26.5 get_extended_lock_info - Get an extended lock information. 26.6 get_locks - Get all existing NMS locks. 26.7 get_reply_timeout - Get Nexenta Management Server D-Bus reply timeout. 26.8 is_locked_by_client - Check if Server is locked by client 26.9 list_props - Get all NMS properties (name, value pairs) and their descriptions. ... 26.10 nmdtrace_status - Get the status of the Nexenta DTrace statistic service. ... 26.11 register_local_client - Register a local NMS client - an external local process ... 26.12 reread_config - Re-read server configuration. 26.13 restart_nmcd - Restart Nexenta Management Console daemon. 26.14 restart_nmdtrace - Restart Nexenta DTrace daemon. Nexenta DTrace Service is a daemon ... 26.15 set_reply_timeout - Set the reply timeout for Nexenta Management Server D-Bus. ... 26.16 unregister_local_client - Unregister a local NMS client. 27 Plugin 27.1 get_group_names - Get the array of all, or filtered group names. ... 27.2 get_group_plugins - Get the list of all plugins in a group ... 27.3 get_group_props - Get the dictionary with all the properties of a group, ... 27.4 get_ipc_info - Get the interface dicitonary { ipc_name => (name, suffix)} for ... 27.5 get_ipc_srvpool - Determines if a specified plugin can work with Server Pool ... 27.6 get_plugins_by_caps - Get all the plugins with required capability 27.7 get_restorable_plugins - Get all plugins, which can be restored from the saved ... 27.8 list_remote_ - Get { plugin => plugin_properties } dictionary of all available ... 27.9 preinst_check - Plugin pre-installation verification, determines, if a reboot is required or ... 27.10 resolve_lun_to_services - Get the list of all services available for a given ... 27.11 resolve_zfsname_to_services - Get the list of services that run on a ZFS ... 28 Reporting Facility (Services, Performance, Capacity) 28.1 send - Send a report to the general e-mail address 29 SMTP Mailer 29.1 check_support_request_ready - Check if the diagnostic logs are collected to be send ... 29.2 prepare_support_request - Collect the diagnostic messages and prepare the support request ... 29.3 save_support_request - Save the support request in a specified folder 29.4 send_support_request - Prepare and send support request 29.5 send_test - Send test e-mail 30 Service Account Management 31 Service Management Facility (SMF) 31.1 clear - Clear maintaince state of a service 31.2 disable - Disable an SMF service 31.3 enable - Enable an SMF service. Clears the maintenance state, if a ... 31.4 fmri_validate - Check, if a service exists 31.5 get_logfile - Get the logfile path for an SMF service 31.6 get_state - Get the current state of the specified SMF service ... 31.7 reread_config - Re-read and re-apply a service configuration. The operation updates the ... 31.8 restart - Restart an SMF service. The operation is equivalent to com.nexenta.nms.Smf::enable ... 31.9 wait_for - Wait for the specific state of service 32 Snapshot Management 32.1 create - Create (ie, take) snapshots, recursively or non-recursively, depending on the ... 32.2 get_groupspace - Get groupspace for specified parameters 32.3 get_groupspace_types - Get available groupspace types 32.4 get_snapshot_names - Get the list of existing snapshots for the specified folder, ... 32.5 get_userspace - Get userspace specified parameters 32.6 get_userspace_types - Get available userspace types 32.7 has_zfs_prop - Determine whether zfs property exists or not 32.8 rename - Give a new name to snapthot 32.9 rollback - Rollback a folder to a given snapshot 33 Statistic Collection 34 Support information collector 34.1 get_sub_categories - Get sub categories 34.2 get_top_categories - Get top categories 35 System Upgrade, Rollback and Checkpoint Management 35.1 activate_rootfs - Activate, that is make default, the specified system checkpoint. This ... 35.2 destroy_rootfs - Destroy the specified system checkpoint. Note that the appliance will ... 35.3 get_rootfs_names - Get the names of all existing root filesystems a.k.a system ... 35.4 get_rootfs_prop - Get the value of specified property of the system checkpoint ... 35.5 get_rootfs_props - Get properties of the specified system checkpoint 35.6 get_upgrade_info - Get detailed appliance software upgrade status 36 User scripts Management 36.1 create - Create a new user defined script 37 Virtual Automatic Storage Service 37.1 can_tier_copy_acls - Checks if you can copy the ACLs using RSYNC ... 37.2 execute - Execute a (auto-) service instance. This SA-API method enables you ... 37.3 get_sock_stats - Get just-in-time transport statistics. The method can be used to ... 37.4 is_daemon - Find out whether the service is a daemon 37.5 is_running - Find out whether the service is currently running 37.6 is_scheduled - Find out whether the service is scheduled 37.7 seconds_until_next_run - For a given auto-service, returns the number of seconds remaining ... 38 Virtual Runner 38.1 disable - Stop the execution of a runner. The runner must be ... 38.2 enable - Enable the specified runner. The runner must be registered (see ... 38.3 execute - Execute the specified runner. The operation enables you to run ... 38.4 get_init_params - Get the initial parameters for the specified Script Runner ... 38.5 get_init_tunables - Get the initial tunables for the specified Script Runner ... 38.6 get_tunables - Get the list of runner's tunables and their descriptions. For ... 38.7 is_registered - Check whether the specified runner is registered with the appliance. ... 38.8 register - Register the specified runner. The operation validates runner's parameters and ... 38.9 reset - Destroy job which is linked to specified Runner 38.10 set_tunable - Modify the runner's (tunable) property value. A given runner may ... 38.11 unregister - Unregister the specified runner. The operation reverses the effect of ... 39 Volume (Pool) 39.1 attach_lun - Attach a to an existing mirror. Otherwise, if mirror ... 39.2 clear_lun - Clear the device errors in a volume. The device errors ... 39.3 create_reserve - Creates new reserve folder 39.4 detach_lun - Detach device from a mirror 39.5 free_reserve - Remove a folder that contains emeregency reserve 39.6 get_all_names - Get the list of names of all child objects that ... 39.7 get_available_spares - Get the list of disks that can be used as ... 39.8 get_groupspace - Get the groupspace parameters 39.9 get_groupspace_types - Get the available groupspace types 39.10 get_import_volumes - Get the information about all, or selected volumes that can ... 39.11 get_luns - Get the list of LUNs for a given volume ... 39.12 get_luns_for_all_volumes - Get the list of all LUNs that are used by ... 39.13 get_prop_valid_values - Get the valid range and/or enumeration for a given volume's ... 39.14 get_shared_volumes - Get the list of all volumes that are currently shared ... 39.15 get_status - Get the volume's status 39.16 get_userspace - Get the userspace parameters 39.17 get_userspace_types - Get available userspace types 39.18 get_version_info - Get volume's ZFS version 39.19 has_reserve - Determine if a volume already has emergency reserve folder ... 39.20 has_zfs_prop - Determine whether zfs property exists or not 39.21 has_zpool_prop - Determine whether zpool property exists or not 39.22 history - Get volume history records, in terms of executed ZFS commands ... 39.23 offline_lun - Take the physical device offline. While the device is offline, ... 39.24 online_lun - Bring the physical device online. This operation is not applicable ... 39.25 recover_faulted_luns - Recover faulted devices in a volume. This operation is currently ... 39.26 remove_lun - Permanently remove a hot spare device from the volume. ... 39.27 replace_lun - Replace device in a mirror. The operation replaces with ... 39.28 resolve_lun_to_volumes - Resolve LUN to its container volume(s). 39.29 set_property - Set a zpool property 39.30 upgrade - Upgrade volume's ZFS version. WARNING: This operation may affect availability ... 39.31 vol_create - Create a volume 39.32 vol_export - Export a volume. This operation exports a volume and cleanups/destroys: ... 39.33 vol_grow - Grow a volume 39.34 vol_import - Import a volume 40 Zvol (Emulated Volume-based Block Device) 40.1 clone - Clone a zvol. The operation results in a writable zvol ... 40.2 create - Create a new zvol. NexentaStor provides an easy iSCSI and ... 40.3 create_snapshot - Snapshot a given zvol 40.4 create_with_props - Create a new zvol. This API method enables you to ... 40.5 get_prop_valid_values - Get a valid range and/or enumeration for a given zvol's ... 40.6 has_zfs_prop - Determine if zfs property exists or not 41 com.nexenta.nms.Profiler 42 iSCSI Initiator 42.1 get_all_luns - Get the list of all iSCSI attached LUNs (disks). ... 42.2 get_connections - Get all connections for a given iSCSI session between the ... 42.3 get_defaults - Get the Initiator parameters. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ... 42.4 get_discovery - List (TargetName, TargetAddress, TPGT) triplets for all configured discoveries. ... 42.5 get_discovery_state - Get the discovery state for the discovery method. 42.6 get_discovery_status - Get the discovery status. Returns more detailed information than 'get_discovery_state' ... 42.7 get_luns - Get the list of LUNs for the specified iSCSI Target. ... 42.8 get_sessions - Get the list of active iSCSI sessions. 42.9 get_target_config - Get the iSCSI Target configuration. The list of configurable parameters ... 42.10 get_target_props - Get the iSCSI Target default and user-defined parameters. 42.11 get_targets - List the available iSCSI Targets. The result can be used ... 42.12 get_volumes - Get the list of volumes which are connected through iSCSI ... 42.13 list_discovery - Get the list of discovery settings for the discovery method ... 42.14 remove_target - Remove a set of specified target parameters 42.15 set_default - Update the Initiator parameter. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ... 42.16 set_target_config - Update the iSCSI Target configuration. 42.17 setup_discovery - Setup iSCSI discovery 43 Examples and Usage Cases 43.1 C/C++ 43.2 Perl 43.3 Python 43.4 Ruby

1 API Overview

Welcome to the NexentaStor Storage Appliance API (SA-API) Reference documentation. This API reference provides comprehensive information allowing to build new and extend existing management services, management clients and applications on top of NexentaStor.

Storage Appliance API (SA-API) uses RPC-like D-Bus protocol that employes TCP/IP transport. D-Bus is a powerful and flexible inter-process communication (IPC) mechanism that allows: for the service providers - to register the provided services, and for the clients - to lookup on the network and use the provided services in a location-independent way. NexentaStor leverages D-Bus to provide universal and comprehensive API to manage and monitor all aspects of the appliance's operation. For more information on dbus visit the D-Bus Project Homepage. There are many good introductions and tutorials available on the web, including for instance this D-Bus Tutorial.

Since SA-API provides a higher level abstraction on top of D-Bus, knowledge of these materials is, however, not a prerequisite. SA-API makes it easy to create new, or modify existing applications in C or C++, Perl, Python or Ruby. More language specific SA-API extensions may be added in the future. Still, for reference purposes the corresponding sources are listed below:

LANGUAGE COMMENT

C/C++ SA-API is layered on top native libraries for Windows, Linux and MacOSX operating systems. The libraries are provided with the NexentaStor software development kit (SDK). NexentaStor SDK contains tutorials and examples written in C and C++.

Perl SA-API uses Perl D-Bus bindings realized via Net::DBus package. The package comes with Perl tutorials and Perl examples.

Python SA-API utilizes Pythin D-Bus bindings. Similarly, the Python D-Bus Tutorial contains easy introduction and multiple Python examples.

Ruby SA-API is layered on top of Ruby D-bus bindings. The Ruby D-Bus project contains reference documentation, Ruby tutorials and examples.

The API provides access to the appliance's management objects and services. The appliance's management object hierarchy includes: lun, volume, folder, snapshot, network, network interface, network service, storage service, indexer, zvol, statistic collector, fault trigger, reporter, and others. Each object implements and publishes a part of the API, which makes the latter a by-product of two interrelated but still distinctly separate driving "forces": the appliance's object taxonomy and the required functionality of the 2nd tier NAS.

All client management applications use SA-API to monitor and administer the appliance. This ensures consistent view of the appliance from all clients, transactional behavior of all management administrative and monitoring operations, and easy third-party integrations.

The currently existing management clients include: management console (NMC) and web GUI (Nexenta Management View a.k.a. NMV), fault triggers and storage services, statistic collectors and daily/weekly reporters. All of them execute management operations first by acquiring an object proxy, and second, by calling one of the object's . The SA-API supports many-to-many operation, in the sense that it allows to communicate to multiple statically bound or dynamically discovered appliances on the Internet/Intranet, and at the same time supports multi-user access to any given appliance.

SA-API has bindings for C, C++, Perl, Python and Ruby. This documentation contains examples and samples to demonstrate SA-API in these languages.

The prerequisites to using SA-API include:

General knowledge of one or more of the following programming languages: C, C++, Perl, Python or Ruby User-level experience with the NexentaStor appliance

The API can be used to take the full advantage of the NexentaStor capabilities, which include unlimited including unlimited incremental backups or 'snapshots', snapshot mirroring (replication), block level mirroring ('CDP'), integrated search, and the inherent , performance, thin provisioning and more. The following block diagram shows Nexenta Management Server - the sole provider of the API - and some of its clients.

2 Block Diagram 3 Terms and Conventions

DOCUMENT COMMENT CONVENTION

value1 | Enumeration. The '|' delimited list denotes enumerated list of values. For instance, 0 | 1 specifies a value2 ... boolean value (passed as a parameter or returned by an SA-API method call) that can have one of the listed values: 0 or 1 true, false As far as SA-API and this document, "true" and "non-zero" on one hand, and "false" and "zero" on another are used interchangeably. There are no special "true" and "false" values. The preferred way to pass a boolean value in a method call is to specify 1, although you may use any non-zero value array of (item- Array of items of the type 'item-type'. In this document, round brackets () are used to denote linear type) arrays containing items of the same type. For instance, 'array of (string)' means arrays of strings. Specification 'array of (string) foo()' indicates that the method foo() returns array of strings. Simlarly, 'bar (array of (string) param)' means that the type of the 1st argument of the method bar() is an array of strings. For more information on the SA-API data types, please see Section Data Types below.

dictionary Dictionary of records, whereby each record has a key of type 'key-type' and a value of type 'value-type'. {key-type => By convention, curly braces {} denote dictionaries. For more information on the SA-API data types, value-type} please see Section Data Types below

TERM COMMENT

SA-API NexentaStor Storage Appliance application programming interface NMS Nexenta Management Server, the sole provider of the SA-API NMC Nexenta Management Console, the appliance's management CLI Volume NexentaStor volume is a ZFS pool with certain additional attributes. There is a one-to-one relationship between a volume and the underlying ZFS pool

Folder NexentaStor folder is a ZFS filesystem AutoSnap, Types of appliance's storage services. For more information, please refer to NexentaStor User Guide AutoTier, AutoSync, AutoCdp

Runner Triggers, Collectors, Reporters, and Indexers - also commonly called "runners" - are pluggable modules that perform specific Fault Management, Performance Monitoring, Reporting, and archive Indexing tasks. All specific runners inherit Virtual Runner SA-API interfaces Lun Physical and logical drives, attached to the appliance directly or via iSCSI or FC SAN, are commonly called LUNs. The terms "LUN", "hard drive" and "disk" are used interchangeably

Zvol Emulated (virtual) block device based on a given appliance's volume

4 Object Model

NexentaStor management object model is designed to provision, manage, monitor, and control the life- cycle of all components that comprise the appliance, including network and data services, volumes (pools) and folders (filesystems), snapshots and zvols (virtual block devices), LUNs (physical and virtual disks), and more. The management architecture is in basic ways similar to CORBA and Java RMI, whereby object proxies on the client side are used to represent remote (implementation) objects, on a remote appliance.

The following lists all SA-API proxy objects - interface objects representing appliance's objects and services. The table comprises the following information:

In the first column, proxy interface name as seen by the client application after executing nms_client_init() - a helper method to initialize SA-API client. The former is provided with the language specific bindings as part of the NexentaStor SDK. Next is D-Bus name of the SA-API interface (proxy) object. This name is often referred to as D-Bus "path" because it looks like a filesystem path. For instance, NexentaStor appliance interface object is named '/Root/Appliance'. In the 3rd column, a link to the section in this document containing part of the API that can be exercised via the corresponding SA-API interface. Finally, in the last column, an immediate parent in the interface inheritance hierarchy. In many cases this is Virtual Container, which also means that, for instance, com.nexenta.nms.Container::get_child_props is available via the corresponding (child) interface objects. The fact that, for instance, Snapshot Management Interface is derived from Virtual Container indicates that the Snapshot Management Interface effectively "contains" all concrete snapshots, and can be used to perform the subset of SA-API operations on the snapshots defined by this Interface.

NexentaStor SDK comes with a number of local (client-side) helpers. This includes nms_client_init() - to initialize SA-API client, and nms_remote_obj() - to acquire SA-API interface proxy object associated with a given appliance (identified by its hostname or IP address). Both nms_client_init() and nms_remote_obj() are provided with the language-specific bindings and demonstrated in the Section Examples and Usage Cases below.

List of interface ojects

SA-API interface D-Bus name Reference section Inherits (proxy) object

com.nexenta.nms.Object 'Abstract Class' Virtual Base Object abstract container 'Abstract Class' Virtual Container Virtual Base Object NZA::appl_backup '/Root/ApplianceBackup' Appliance Backup Virtual Base Object NZA::auto_scrub '/Root/Smf/AutoService/AutoScrub' AutoScrub (volume Virtual Automatic Storage scrubbing) Service Service Service Management Facility (SMF) Virtual Container Virtual Base Object NZA::auto_snap '/Root/Smf/AutoService/AutoSnap' AutoSnap (snapshot) Virtual Automatic Storage Service Service Service Management Facility (SMF) Virtual Container Virtual Base Object NZA::auto_tier '/Root/Smf/AutoService/AutoTier' AutoTier (data Virtual Automatic Storage replication) Service Service Service Management Facility (SMF) Virtual Container Virtual Base Object

NZA::trigger '/Root/Runner/Trigger' Fault Management Virtual Runner Virtual Container Virtual Base Object NZA::folder '/Root/Folder' Folder (Filesystem) Virtual Container Virtual Base Object NZA::indexer '/Root/Runner/Indexer' Folder and Snapshot Virtual Runner Virtual Indexing Facility (Search Container Virtual Base Object Engine) NZA::appliance '/Root/Appliance' General Appliance Virtual Base Object Management NZA::appl_group '/Root/ApplGroup' Groups of Appliances Virtual Container Virtual Base Management Object NZA::jbod '/Root/Jbod' JBOD Management Virtual Base Object Virtual Container NZA::job '/Root/Job' Job Management Virtual Container Virtual Base Object NZA::logviewer '/Root/LogViewer' Log Viewing Facility Virtual Base Object NZA::lun '/Root/Lun' Logical and Physical Disk Virtual Container Virtual Base Management Object NZA::srvpool '/Root/SrvPool' NMS Pool Management Virtual Base Object NZA::netif '/Root/Network/Interface' Network Interface Virtual Container Virtual Base Management Object NZA::network '/Root/Network' Network Management Virtual Base Object NZA::netsvc '/Root/Smf/NetworkService' Network Services Service Management Facility Management (SMF) Virtual Container Virtual Base Object NZA::netstorsvc '/Root/NetworkStorageService' Network Storage Service Virtual Container Virtual Base Object NZA::server '/Root/Server' Nexenta Management Virtual Base Object Server NZA::plugin '/Root/Plugin' Plugin Virtual Container Virtual Base Object NZA::reporter '/Root/Runner/Reporter' Reporting Facility Virtual Runner Virtual (Services, Performance, Container Virtual Base Object Capacity) NZA::mailer '/Root/Mailer' SMTP Mailer Virtual Base Object NZA::remote_app_account '/Root/RemoteAppAccount' Service Account Virtual Base Object Management NZA::smf '/Root/Smf' Service Management Virtual Container Virtual Base Facility (SMF) Object NZA::snapshot '/Root/Snapshot' Snapshot Management Virtual Container Virtual Base Object NZA::collector '/Root/Runner/Collector' Statistic Collection Virtual Runner Virtual Container Virtual Base Object NZA::support '/Root/Support' Support information Virtual Base Object collector NZA::syspool '/Root/Syspool' System Upgrade, Virtual Container Virtual Base Rollback and Checkpoint Object Management NZA::script '/Root/Runner/ScriptRunner' User scripts Management Virtual Runner Virtual Container Virtual Base Object NZA::autosvc '/Root/Smf/AutoService' Virtual Automatic Service Management Facility Storage Service (SMF) Virtual Container Virtual Base Object NZA::runner '/Root/Runner' Virtual Runner Virtual Container Virtual Base Object NZA::volume '/Root/Volume' Volume (Pool) Virtual Container Virtual Base Object NZA::zvol '/Root/Zvol' Zvol (Emulated Volume- Virtual Container Virtual Base based Block Device) Object NZA::profiler '/Root/Profiler' com.nexenta.nms.Profiler Virtual Base Object

NZA::iscsi '/Root/Iscsi' iSCSI Initiator Virtual Base Object

All SA-API interface objects without exception are extensions of SA-API generic Virtual Object. Thus, all methods provided by the Virtual Object are polymorphically available via SA-API interface objects listed in the table above. For instance, appliance->get_props() returns appliance's properties, as per com.nexenta.nms.Object::get_props specification.

Majority of the listed SA-API interface objects extend Virtual Container interface. SA-API Container is an abstraction to aggregate multiple objects of the same type: snapshots, volumes, folders, network services, network interfaces, runners, LUNs (disks), storage services. A typical sequence of steps to execute an operation on a specific (contained) object instance includes:

acquiring all or some (filtered) object names, via com.nexenta.nms.Container::get_names invoking SA-API method, with the unique name of the "contained" object's as the first parameter.

SA-API Virtual Container abstraction is repeatedly demonstrated throughout this reference; for specific examples in C, Perl, Python and Ruby please refer to Section Examples and Usage Cases below.

5 Data Types

SA-API "data type" is either a primitive data type or a complex type built based on the primitive data types, similar to abstract data types in Java and struct data types in C and C++. SA-API data types are used to define arguments and return values in the SA-API methods listed in this reference documentation. The primitive data types include:

PRIMITIVE DATA TYPE DESCRIPTION

string zero terminated string of bytes int32 integer value bool bolean value: 0 - false, 1 - true

The complex data types are:

COMPLEX DESCRIPTION DATA TYPE

array linear array containing items of the same data type. By convention, an array is denoted as (type), where type is typically one of the primitive types listed above. For instance, notation "array of (string)" means arrays of strings

dictionary dictionary or hash containing records of data. Each record in the dictionary has two distinct elements: key and value, whereby the key can be used to access the value directly. Throughout this documentation, dictionaries are denoted using curly braces {}, for instance: dictionary { string => bool } would mean a dictionary containing records consisting of two primitive elements: string key and boolean value

Rest of this section demonstrates usage of these SA-API data types in different languages.

5.1 Primitive Data Types

As far as Perl, Python and Ruby, SA-API primitive types are in fact the corresponding programming language's primitive types: no translation necessary. The next table shows a correspondence between D- Bus and C/C++ data types: PRIMITIVE DATA TYPE C/C++ TYPE

string DBUS_TYPE_STRING int32 DBUS_TYPE_INT32 bool DBUS_TYPE_BOOLEAN

None of the primitive data types require any special preparation for using it as an argument in the SA-API method call: it is enough to declare a C variable using one of the listed DBUS_TYPE_??? primitives, and then pass a pointer to it in an SA-API method call.

Processing SA-API results is also easy. The following example prints a string returned by an SA-API call

char *str; if (nms_get_basic (msg, DBUS_TYPE_STRING, &str)) printf ("Received = %s\n", str); else printf ("Error getting string value"); For a complete example in C, see Section C/C++ below.

5.2 Receiving an Array

The following example in C prints an array type returned by an SA-API method; this type of array is denoted in this document as array of (string)

char **array; int count, i; count = nms_get_basic (msg, DBUS_TYPE_CHAR_ARRAY, &array); for (i = 0; i < count; i++){ printf ("item = %s\n", array[i]); };

This snippet of Perl code simply prints a returned array of strings denoted in this document as array of (string). Note that SA-API complex data type array is a regular Perl array, while SA-API dictionary is simply a Perl hash.

for my $item (@$array) { print "item=$item\n"; } For a complete and working example in Perl, see Section Perl below.

5.3 Receiving a Dictionary

The following example in C prints a dictionary type returned by an SA-API method; this type of dictionary is denoted in this document as dictionary {string => string}

char **dict; int count, i; count = nms_get_basic (msg, DBUS_TYPE_CHAR_DICT, &dict); for (i = 0; i < count; i++){ printf ("%s => %s\n", dict[i * 2], dict[i * 2 + 1]); }; For a complete example in C, see Section C/C++ below.

Next is a Perl code sample that does the same: prints a returned dictionary {string => string}. Note that complex data types are always returned by reference.

for my $key (keys %$dict) { print "key=$key, value=$dict->{$key}\n"; }

5.4 Receiving Complex Data Types

Low-level C functions do not support retrieving complex data types directly. In that case DBus functions should be used. The following example in C prints a dictionary of string arrays returned by an SA-API method; this type of dictionary is denoted in this document as dictionary {string => array of (string)}

msg = nms_execute (proxy, "get_luns", DBUS_TYPE_STRING, &volume_name, DBUS_TYPE_INVALID); printf ("\nLUNS list: \n"); if (msg) { int current_type; struct DBusMessageIter iter, subiter, item; char *path, *val; int arg_type = dbus_message_iter_get_arg_type (msg->reply); int elem_type = dbus_message_iter_get_element_type (msg->reply); if(arg_type != DBUS_TYPE_ARRAY || elem_type != DBUS_TYPE_DICT_ENTRY) { printf("Returned value is not a dictionary\n"); return; } // enter the dictionary dbus_message_iter_recurse (msg->reply, &iter); while ((current_type = dbus_message_iter_get_arg_type (&iter)) != DBUS_TYPE_INVALID) { int args = 0; // enter the dictionary item dbus_message_iter_recurse (&iter, &subiter); // iterate through dictionary items while((current_type = dbus_message_iter_get_arg_type (&subiter)) != DBUS_TYPE_INVALID) { if(current_type == DBUS_TYPE_STRING) { // dictionary key is found (string type) dbus_message_iter_get_basic (&subiter, &path); args++; printf("%d. %s\n", args, path); } //if(current_type == DBUS_TYPE_DICT_ENTRY) if(current_type == DBUS_TYPE_ARRAY) { // dictionary value is found (array of string type) // enter the array dbus_message_iter_recurse (&subiter, &item); // iterate through all strings in array while((current_type = dbus_message_iter_get_arg_type (&item)) != DBUS_TYPE_INVALID) { if(current_type == DBUS_TYPE_STRING) { dbus_message_iter_get_basic (&item, &val); dbus_message_iter_next (&item); } printf(" %s\n", val?val:""); } } dbus_message_iter_next (&subiter); } dbus_message_iter_next (&iter); } }

5.5 Passing an Array

The following example in C prepares an array of strings denoted in this document as array of (string), to further be passed as a parameter in an SA-API method call:

char *array[] = { "a", "b", "c", "d" };

This single-line Perl code fills an array of strings, to be passed as a parameter in SA-API method invocation:

my @array = ('a', 'b', 'c', 'd');

5.6 Passing a Dictionary The following example in C prepares a dictionary {string => string}, to further be passed as a parameter in an SA-API method call:

char *dict[] = { "name", "appliance", "version", "1.0", "release_date", "06/17/2008" }; For a complete example in C, see Section C/C++ below.

Next is a Perl example that fills in the same type of a dictionary {string => array of (string)}, to be transferred to the remote appliance for execution, for instance in a call to modify user's ACL:

my %dict = ( allow => ['read_data', 'read_acl'], deny => ['write_data'] );

Note again that SA-API dictionary is a regular Perl hash. For a complete example in Perl, see Section Perl below.

6 Virtual Base Object

SA-API Interface Object

D-Bus name Interface class name Inherits

Abstract class com.nexenta.nms.Object com.nexenta.nms.com.nexenta.nms.Object

Properties

NAME TYPE ACCESS DESCRIPTION

info string wi General information about the object ipc_name string e Interface class name of the associated interface object name string ri The name of the object

No inherited methods

6.1 com.nexenta.nms.Object::get_prop

(string) get_prop (string propname)

Get the property value

Parameters

NAME TYPE DESCRIPTION

propname string The name of the property

Return Value

TYPE DESCRIPTION

string Value of the specified property

Usage Examples 3. appliance_if->get_prop('nms_version')

Get the NMS version for the NMS that runs on a given appliance. This assumes that appliance_if is an interface object that represents the corresponding appliance

6. server_if->get_prop('trace_level')

Get the NMS trace level. This assumes that server_if represents the NMS server interface object

See Also

Method Short Description

com.nexenta.nms.Object::get_props Get { propname => value } dictionary of all properties ... com.nexenta.nms.Object::set_prop Set the value of property com.nexenta.nms.Container::get_child_prop Get the value of a property for a child object. ...

Next Section: Virtual Container

6.2 com.nexenta.nms.Object::get_props

(dictionary {string => string}) get_props (string pattern)

Get { propname => value } dictionary of all properties that match the specified pattern

Parameters

NAME TYPE DESCRIPTION

pattern string Pattern to select a subset of object's properties. An empty string matches all object's properties

Return Value

TYPE DESCRIPTION

dictionary {string => Hash: key => value, where key is the name of the property, value is the value of the string} property

Usage Examples

3. appliance_if->get_props('^n')

If appliance_if is the corresponding interface object, the method returns all appliance's properties the names of which start with the letter 'n'. A sample result: { 'name' => 'Appliance', 'nms_version' => '1.1' }

See Also

Method Short Description

com.nexenta.nms.Object::get_prop Get the property value

com.nexenta.nms.Object::set_prop Set the value of property com.nexenta.nms.Container::get_child_prop Get the value of a property for a child object. ...

Next Section: Virtual Container 6.3 com.nexenta.nms.Object::set_prop

(void) set_prop (string propname, string value)

Set the value of property

Parameters

NAME TYPE DESCRIPTION

propname string The name of the property value string New value of the property

No return values

Usage Examples

3. server_if->set_prop('trace_level', '10')

If server_if is the NMS server interface object, the method sets its tracing level to 10

See Also

Method Short Description

com.nexenta.nms.Object::get_prop Get the property value com.nexenta.nms.Container::set_child_prop Update a property of a child object with a new ... com.nexenta.nms.Container::get_child_prop Get the value of a property for a child object. ...

Next Section: Virtual Container

6.4 com.nexenta.nms.Object::set_props

(void) set_props (dictionary {string => string} not set)

Set the properties according to dictionary

Parameters

NAME TYPE DESCRIPTION

not set dictionary {string => string} Properties dictionary { name => value }

No return values

Next Section: Virtual Container

6.5 com.nexenta.nms.Object::trylock_self

(bool) trylock_self (int32 lock_type) Make an attempt to lock the object. Unlike com.nexenta.nms.Container::trylock it locks the object, not its child objects.

Parameters

NAME TYPE DESCRIPTION

lock_type int32 lock_type = 1 | 2, 1 - read lock, 2 - write lock. Read lock enables multiple concurrent readers to access the corresponding locked object, but conflicts with an attempt to take a write lock. The write lock is exclusive.

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - success, 0 - failed

Usage Examples

3. server_if->trylock_self(&NZA::WRITE_LOCK) locks server_if object

See Also

Method Short Description

com.nexenta.nms.Object::unlock_self Unlock object. Unlike com.nexenta.nms.Container::unlock it unlocks object self, not ...

com.nexenta.nms.Container::trylock Try to lock a child object. com.nexenta.nms.Container::unlock Unlock a child object.

Next Section: Virtual Container

6.6 com.nexenta.nms.Object::unlock_self

(void) unlock_self (int32 lock_type)

Unlock object. Unlike com.nexenta.nms.Container::unlock it unlocks object self, not a child.

Parameters

NAME TYPE DESCRIPTION

lock_type int32 lock_type = 1 | 2. Type of the lock to unlock. The two valid values are: 1 - read lock, 2 - write lock

No return values

Usage Examples

3. server_if->unlock(&NZA::WRITE_LOCK) unlocks server_if object

See Also Method Short Description

com.nexenta.nms.Object::trylock_self Make an attempt to lock the object. Unlike com.nexenta.nms.Container::trylock ... com.nexenta.nms.Container::trylock Try to lock a child object. com.nexenta.nms.Container::unlock Unlock a child object.

Next Section: Virtual Container

7 Virtual Container

SA-API Interface Object

D-Bus name Interface class name Inherits

Abstract class com.nexenta.nms.Container Virtual Base Object

No properties

No inherited methods

7.1 com.nexenta.nms.Container::destroy

(void) destroy (string child_name, string not set)

Destroy a child object.

Parameters

NAME TYPE DESCRIPTION

child_name string Name of a child object that you want to destroy. not set string not set

No return values

Previous Section: Virtual Base Object Table Of Contents Next Section: Appliance Backup

7.2 com.nexenta.nms.Container::get_child_prop

(string) get_child_prop (string child_name, string propname)

Get the value of a property for a child object.

Parameters

NAME TYPE DESCRIPTION

child_name string Name of child object. For example, if 'lun_if' is the LUN container, then lun_if->get_child_prop('c0d0', 'size') returns the 'size' property value for the child object: IDE disk 'c0d0'.

propname string Name of property. Use com.nexenta.nms.Container::get_child_props to retrieve the list of available properties at runtime.

Return Value TYPE DESCRIPTION

string Value of property.

Usage Examples

3. lun_if->get_child_prop('c2t0d0', 'size')

Get the size of disk 'c2t0d0'.

6. network_interfaces_if->get_child_prop('e1000g0', 'info')

Get information about the network interface 'e1000g0', where 'network_interfaces_if' is the container object, that contains all network interfaces on the NexentaStor appliance.

See Also

Method Short Description

com.nexenta.nms.Object::get_prop Get the property value com.nexenta.nms.Container::get_child_props Get the list of properties and values that match the ...

Previous Section: Virtual Base Object Table Of Contents Next Section: Appliance Backup

7.3 com.nexenta.nms.Container::get_child_props

(dictionary {string => string}) get_child_props (string child_name, string pattern)

Get the list of properties and values that match the pattern for a child object.

Parameters

NAME TYPE DESCRIPTION

child_name string Name of a child object. For example, if 'lun_if' is the LUN container, then lun_if- >get_child_props('c0d0', '') returns all properties and values for the child object 'c0d0'.

pattern string A pattern that the method uses to select a matching subset of properties for the child object. An empty string matches all object's properties

Return Value

TYPE DESCRIPTION

dictionary {string => string} Hash: property => value

Usage Examples

3. plugin('nms-autocdp')->get_child_props('tier2', '')

Get the list of all properties of the existing auto-cdp service instance 'tier2' from the nms-autocdp interface object. In this and the following examples, the container interface 'nms-autocdp' is already retrieved, and represents the corresponding container on the NexentaStor appliance. 6. lun_if->get_child_props('c2t0d0', '')

Get all properties for disk 'c2t0d0'.

9. lun_if->get_child_props('c2t0d0', 'size')

Get all properties that match 'size' parameter for disk 'c2t0d0'. Example: { 'size' => '4.1GB', 'size_bytes' => 4294967296 }

12. folder_if->get_child_props('vol1/a', '')

Get all properties for folder 'vol1/a'

15. volume_if->get_child_props('vol1', '')

Get all properties for volume 'vol1'

18. snapshot_if->get_child_props('vol1/a@today', '')

Get all properties for snapshot 'vol1/a@today'

21. folder_if->get_child_props('vol1/a', 'mount')

Get all mount-related properties for folder 'vol1/a'. Example: { 'mounted' => 'yes', 'canmount' => 'on', 'mountpoint' => '/volumes/vol1/a' }.

See Also

Method Short Description

com.nexenta.nms.Object::get_prop Get the property value com.nexenta.nms.Container::set_child_prop Update a property of a child object with a new ... com.nexenta.nms.Container::get_child_prop Get the value of a property for a child object. ...

Previous Section: Virtual Base Object Table Of Contents Next Section: Appliance Backup

7.4 com.nexenta.nms.Container::get_names

(array of (string)) get_names (string pattern)

Get the list of names of all child objects that match a specified pattern.

Parameters

NAME TYPE DESCRIPTION

pattern string Pattern that the method uses to select a matching subset of properties for a child object. An empty string matches all properties of the object.

Return Value TYPE DESCRIPTION

array of (string) List of names of child objects.

Usage Examples

3. folder_if->get_names('^vol1/a/')

Get the list of names of all sub-folders for folder 'vol1/a'. Example: ( 'vol1/a/b', 'vol1/a/c', 'vol1/a/b/ddd' ).

6. network_interfaces_if->get_names('')

Get the list of all existing network interfaces. Example: ( 'e1000g0', 'e1000g1', 'e1000g2' ).

9. volume_if->get_names('')

Get the list of all volumes located on the NexentaStor appliance.

12. zvol_if->get_names('')

Get the list of all zvols on the NexentaStor appliance.

15. snapshot_if->get_names('^vol1\/a[\/\@]')

Get the list of all snapshots for folder 'vol1/a' and its sub-folders. Example: ( 'vol1/a@yesterday', 'vol1/a@today', 'vol1/a/b@yesterday' ).

See Also

Method Short Description

com.nexenta.nms.Container::get_names_by_prop Get the list of all child objects that have a ...

Previous Section: Virtual Base Object Table Of Contents Next Section: Appliance Backup

7.5 com.nexenta.nms.Container::get_names_by_prop

(array of (string)) get_names_by_prop (string propname, string propval_pattern, string childname_pattern)

Get the list of all child objects that have a matching property value that you specify as 'childname_pattern'. The method selects all child objects with names that match and the properties that match . An empty pattern means that the pattern is ignored.

Parameters

NAME TYPE DESCRIPTION

propname string Name of property. Each appliance's container object, such as folder, volume, zvol, smf, runner, and so on, has its own list of properties. To get the list of all available properties, use com.nexenta.nms.Container::get_child_props. propval_pattern string Pattern that the method uses to select a property value. childname_pattern string Pattern that the method uses to select a matching subset of properties for the child object. An empty string matches all object's properties.

Return Value

TYPE DESCRIPTION

array of (string) List of objects

Usage Examples

3. lun_if->get_names_by_prop('type', 'cdrom', '')

Retrieve a list of names of all CD-ROMs located on the NexentaStor appliance.

6. runner_if->get_names_by_prop('type', 'collector', '')

Retrieve a list of all collectors. Example: ( 'network-collector', 'nfs-collector', 'volume-collector' ).

9. runner_if->get_names_by_prop('type', 'collector', '^v')

Retrieve a subset of all collectors which names starts with 'v'.

See Also

Method Short Description

com.nexenta.nms.Container::get_names Get the list of names of all child objects that ...

Previous Section: Virtual Base Object Table Of Contents Next Section: Appliance Backup

7.6 com.nexenta.nms.Container::object_exists

(bool) object_exists (string child_name)

Verify that an object exists.

Parameters

NAME TYPE DESCRIPTION

child_name string Name of child object

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - exists, 0 - does not exist

Usage Examples

3. lun_if->object_exists('c0d0') Verify that disk 'c0d0' exists. If the method discovers the disk, it returns 1, if not, returns 0.

6. folder_if->object_exists('vol1/a')

Verify that folder 'vol1/a' exists. If folder 'vol1/a' exists, returns 1, if not, returns 0.

See Also

Method Short Description

com.nexenta.nms.Container::get_names Get the list of names of all child objects that ... com.nexenta.nms.Container::get_names_by_prop Get the list of all child objects that have a ...

Previous Section: Virtual Base Object Table Of Contents Next Section: Appliance Backup

7.7 com.nexenta.nms.Container::set_child_prop

(void) set_child_prop (string child_name, string propname, string propvalue)

Update a property of a child object with a new value.

Parameters

NAME TYPE DESCRIPTION

child_name string Name of child object. For example, if 'folder_if' is a corresponding folder container, then folder_if- >set_child_prop('vol1/a', 'compression', 'on') switches on the compression on folder 'vol1/a'.

propname string Name of property. Use com.nexenta.nms.Container::get_child_props to get the list of available properties.

propvalue string New value

No return values

Usage Examples

3. folder_if->set_child_prop('vol1/a', 'compression', 'on')

Enable compression for folder 'vol1/a'.

See Also

Method Short Description

com.nexenta.nms.Object::get_prop Get the property value com.nexenta.nms.Object::set_prop Set the value of property com.nexenta.nms.Container::get_child_prop Get the value of a property for a child object. ...

Previous Section: Virtual Base Object Table Of Contents Next Section: Appliance Backup

7.8 com.nexenta.nms.Container::trylock (bool) trylock (string child_name, int32 lock_type)

Try to lock a child object.

Parameters

NAME TYPE DESCRIPTION

child_name string Name of child object. lock_type int32 lock_type = 1 | 2. Type of lock: 1 - the read lock, 2 - the write lock. The read lock enables multiple concurrent readers to access the locked object, but conflicts with an attempt to take a write lock. The write lock gives an exclusive access to a locked object.

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - success, 0 - fail (already locked).

Usage Examples

3. folder_if->trylock('vol1/a', 1)

Locks folder 'vol1/a' for reading. Note that you can apply multiple read locks.

6. folder_if->trylock('vol1/a', 2)

Exclusively locks folder 'vol1/a' and its sub-folders.

See Also

Method Short Description

com.nexenta.nms.Container::unlock Unlock a child object. com.nexenta.nms.Container::object_exists Verify that an object exists.

Previous Section: Virtual Base Object Table Of Contents Next Section: Appliance Backup

7.9 com.nexenta.nms.Container::unlock

(void) unlock (string child_name, int32 lock_type)

Unlock a child object.

Parameters

NAME TYPE DESCRIPTION

child_name string Name of a child object.

lock_type int32 lock_type = 1 | 2. The type of the lock that you want to unlock. 1 - the read lock, 2 - the write lock.

No return values

Usage Examples

3. folder_if->unlock('vol1/a', 1) Remove the read lock from folder 'vol1/a'.

6. folder_if->unlock('vol1/a', 2)

Remove the write (exclusive) lock from folder 'vol1/a'.

See Also

Method Short Description

com.nexenta.nms.Container::trylock Try to lock a child object. com.nexenta.nms.Container::object_exists Verify that an object exists. com.nexenta.nms.Container::destroy Destroy a child object.

Previous Section: Virtual Base Object Table Of Contents Next Section: Appliance Backup

8 Appliance Backup

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/ApplianceBackup com.nexenta.nms.ApplianceBackup Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION

info string wi General information about the object ipc_name string e Interface class name of the associated interface object name string ri The name of the object

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Object::unlock_self ['int32'], []

8.1 com.nexenta.nms.ApplianceBackup::get_saved_configurations

(array of (dictionary {string => string})) get_saved_configurations (string dir, bool short)

Returns the list of saved appliance configurations

Parameters NAME TYPE DESCRIPTION

dir string Optional parameter. A path where saved configurations are located. If it is empty then a list of saved configurations done by appliance itself is returned

short bool Short = 0 | 1. Determines amount of information returned for each save (short/verbose). Verbose mode works a bit longer because it extracts description from every save

Return Value

TYPE DESCRIPTION

array of List of all existing saved configurations attributes. Reqiured attributes are: name - save configuration (dictionary archive file name, time - human readable creation time In verbose mode following attributes are added: {string => description - save description extracted from archive string})

Previous Section: Virtual Container Table Of Contents Next Section: AutoScrub (volume scrubbing) Service

8.2 com.nexenta.nms.ApplianceBackup::get_state

(string) get_state (void)

Returns current state of a save/restore process

No parameters

Return Value

TYPE DESCRIPTION

string Possible values are 'running' - saving or restoring is in process, and 'idle' - no save/restore process are running, you can start saving or restoring

Previous Section: Virtual Container Table Of Contents Next Section: AutoScrub (volume scrubbing) Service

8.3 com.nexenta.nms.ApplianceBackup::restore_app_configuration

(int32, array of (string)) restore_app_configuration (array of (string) component_list, dictionary {string => string} params)

Restores appliance configuration

Parameters

NAME TYPE DESCRIPTION

component_list array of List of components to restore. It may be empty which means 'restore all'. Alternatively, you (string) can specify one of the following parameters: auto-sync - auto-sync services; auto-snap - auto-snap services; auto-tier - auto-tier services; auto-scrub - auto-scrub services; users - unix groups and users; names - appliance names: only domainname and hostname at that moment; basic - applaince basic properties: keyboard layout, time zone etc; nms - some of NMS properties; mailer - mailer settings; shared-volumes - shared volumes list (f.e, shared through iscsi, auto-cdp); plugins - plugins settings that support its settings save/restore; interface - network interfaces configuration; netsvc - network services configuration (f.e, cifs user mapings, ldap configuration etc); runners - triggers, collectors, reporters and indexer settings; shares - folders settings with ACL that are shared through RSYNC, CIFS, etc.

params dictionary Additional restore parameters. If dictionary is empty, then the configuration is restored from {string the latest applaince save. You can configure the restore process with the following => parameters: path - a path to file or directory from which to restore the configuration. If a string} path is a directory then the configuration is restored from the most recent save file; volume - one volume action: restore all auto-* services, shares for a given volume; dry - perfom the 'dry-run': test the operation of configuration restore without actual changing. The 'dry-run' verifies what has to be restored and searches for possible errors. After completion of a dry run, the method returns the list of required actions and errors; overwrite - overwrite existing services: old configuration is replaced with the configuration from save file (used only for auto-* services and shared volumes)

Return Value

TYPE DESCRIPTION

int32 Number of encountered error. 0 - restore successfull array of (string) List of required or fulfilled actions and errors.

Previous Section: Virtual Container Table Of Contents Next Section: AutoScrub (volume scrubbing) Service

8.4 com.nexenta.nms.ApplianceBackup::save_app_configuration

(string) save_app_configuration (array of (string) component_list, dictionary {string => string} params)

Save appliance configuration

Parameters

NAME TYPE DESCRIPTION

component_list array of List of components to save. If you do not specify any components, then operation saves all (string) the components of the configuration. You can specify one of the following parameters: auto- sync - auto-sync services; auto-snap - auto-snap services; auto-tier - auto-tier services; auto-scrub - auto-scrub services; users - unix groups and users; names - appliance names: only domainname and hostname at that moment; basic - applaince basic properties: keyboard layout, time zone etc; nms - some of NMS properties; mailer - mailer settings; shared-volumes - shared volumes list (f.e, shared through iscsi, auto-cdp); plugins - plugins settings that support its settings save/restore; interface - network interfaces configuration; netsvc - network services configuration (f.e, cifs user mapings, ldap configuration etc); runners - triggers, collectors, reporters and indexer settings; shares - folders settings with ACL that are shared through rsync, cifs etc

params dictionary Additional save parameters. If dictionary is empty then configuration will be restore from the {string latest applaince save. Restore process can be tuned up with the parameters: path - a path to => file or directory from which to restore the configuration. If a path is a directory then the string} configuration is restored from the most recent save file; dry - perfom the 'dry-run': test the operation of configuration restore without actual changing. The 'dry-run' verifies what has to be restored and searches for possible errors. After completion of a dry run, the method returns the list of required actions and errors; blocking_call - call save and wait till it finishes. By default, the save procedure cannot be blocked, and the process of saving runs in a background

Return Value

TYPE DESCRIPTION

string Timestamp of a saved configuration

Previous Section: Virtual Container Table Of Contents Next Section: AutoScrub (volume scrubbing) Service

9 AutoScrub (volume scrubbing) Service

SA-API Interface Object

D-Bus name Interface class name Inherits /Root/Smf/AutoService/AutoScrub com.nexenta.nms.SmfAutoScrub Virtual Automatic Storage Service Service Management Facility (SMF) Virtual Container Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION

general/enabled string c svc.startd(1m): If value is set to true, the restarter tries to start the service, when all its dependencies are satisfied. If set to false, the service remains in the disabled state. info string wi General information about the object instance string c Suffix of the service's fmri. FMRI stands for Fault Management Resource Identifier; in this document FMRI or fmri is used to label the name of the service. Examples of FMRIs: 'svc:/system/filesystem/zfs/auto-tier:vol1-a-000', 'svc:/system/filesystem/zfs/auto- sync:vol2-b-001', etc. All auto-services has the following naming structure: :, where com.nexenta.nms.SmfAutoService::instance is a combination of com.nexenta.nms.SmfAutoService::instance_fs_name and com.nexenta.nms.SmfAutoService::instance_fs_id. In other words, fmri of an auto-service has the following outline: com.nexenta.nms.SmfAutoService::path:com.nexenta.nms.SmfAutoService::instance. For the list of auto-services that inherit Virtual Automatic Storage Service Object, see Object Model instance_fs_id string c The numeric portion of the com.nexenta.nms.SmfAutoService::instance. For example, instance_fs_id = 0 for the following FMRIs: 'svc:/system/filesystem/zfs/auto-tier:vol1-a- 000', 'svc:/system/filesystem/zfs/auto-sync:vol1-b-000'. The following is an example of an auto-service's name for which instance_fs_id = 10: 'svc:/system/filesystem/zfs/auto- tier:vol1-a-010'. All auto-services have the following naming structure: :, where com.nexenta.nms.SmfAutoService::instance is a combination of com.nexenta.nms.SmfAutoService::instance_fs_name and com.nexenta.nms.SmfAutoService::instance_fs_id. For the list of auto-services that inherit Virtual Automatic Storage Service Object, see Object Model instance_fs_name string c Part of the com.nexenta.nms.SmfAutoService::instance that reflects the path to source filesystem (folder). For example, instance_fs_name = 'vol1-a' for the following FMRIs: 'svc:/system/filesystem/zfs/auto-tier:vol1-a-000', 'svc:/system/filesystem/zfs/auto- sync:vol1-a-123'. All auto-services have the following naming structure: :, where com.nexenta.nms.SmfAutoService::instance is a combination of com.nexenta.nms.SmfAutoService::instance_fs_name and com.nexenta.nms.SmfAutoService::instance_fs_id. For the list of auto-services that inherit Virtual Automatic Storage Service Object, see Object Model ipc_name string e Interface class name of the associated interface object name string ri The name of the object path string c The prefix of an auto-service's name, or fmri. FMRI is a Fault Management Resource Identifier; in this document FMRI or fmri is conventionally used to label the name of the service. Examples of FMRI services: 'svc:/system/filesystem/zfs/auto-tier:vol1-a-000', 'svc:/system/filesystem/zfs/auto-sync:vol2-b-001', etc. All auto-services have the following naming structure: :, where com.nexenta.nms.SmfAutoService::instance is a combination of com.nexenta.nms.SmfAutoService::instance_fs_name and com.nexenta.nms.SmfAutoService::instance_fs_id. In other words, fmri of a given auto- service has the following outline: com.nexenta.nms.SmfAutoService::path:com.nexenta.nms.SmfAutoService::instance. For the list of auto-services that inherit Virtual Automatic Storage Service Object, see Object Model restarter/logfile string c A logfile of the service (filename). restarter/start_method_timestamp string c The start time of an SMF service restarter/start_method_waitstatus string c not inherited restarter/start_pid string c The process identificator (PID) of an SMF service

restarter/state string c svc.startd(1m): The current state.

restarter/state_timestamp string c svc.startd(1m): The time when the current state was reached.

service string c service = 'auto-snap' | 'auto-scrub' | 'auto-sync' | 'auto-tier'. The type of the auto-service. For the list of auto-services that inherit Virtual Automatic Storage Service Object, see Object Model

zfs/comment string c Information about filesystem. zfs/day string c The numeric value that depends on the com.nexenta.nms.SmfAutoService::type property. For the type = 'weekly', the day of the week is numbered as follows: 0 - 'Sun', 1 - 'Mon', 2 - 'Tue', 3 - 'Wed', 4 - 'Thu', 5 - 'Fri', 6 - 'Sat'. For the com.nexenta.nms.SmfAutoService::type = 'monthly', the day of the month is a number in the range of 1 .. 31. See also: com.nexenta.nms.Runner::freq_day zfs/flags string c Flags for auto-services that are defined in common.pm. zfs/fs-name string c Same as com.nexenta.nms.SmfAutoService::instance_fs_name. Part of the service's fmri that reflects the name of the source filesystem (folder). For example, zfs/fs-name = 'vol1- a' for the following FMRIs: 'svc:/system/filesystem/zfs/auto-tier:vol1-a-000', 'svc:/system/filesystem/zfs/auto-sync:vol1-a-123', while zfs/fs-name = 'syspool' for the service named 'svc:/system/filesystem/zfs/auto-scrub:syspool-000'. For the list of auto- services that inherit Virtual Automatic Storage Service Object, see Object Model . See also: com.nexenta.nms.SmfAutoService::instance_fs_name zfs/hour string c zfs/hour = 0 .. 23. Specifies the hour of a day. For example, zfs/hour = 1 specifies 1am. See also: com.nexenta.nms.Runner::freq_hour zfs/last_replic_time string c The last time when the replication service was executed. zfs/minute string c zfs/minute = 0 .. 59. Specifies the minute of an hour. For example, zfs/minute = 30 specifies 30 minutes past a given hour. See also: com.nexenta.nms.Runner::freq_minute zfs/period string c Period between automatic replications of a service zfs/retry string c zfs/retry = 0 | 1. Defines whether to run the service once the remote host becomes reachable. Non-zero (true) - run the service immediately after the remote host becomes reachable. If you set the option to 1: when a service fails during execution because the connection is lost, NexentaStor re-runs the service before the expiration of the next scheduled interval. If you set this option to zero (false): when a service fails during execution because the connection is lost, NexentaStor does not retry to execute the service, the service executes according to schedule. zfs/retry-timestamp string c zfs/retry-timestamp = time of the last retry, as a number of seconds since the start of epoch (00:00:00 UTC Jan 1st, 1970). Note: this variable is updated by service at a run- time, after it has been scheduled to re-run (after the remote host becomes reachable - see com.nexenta.nms.SmfAutoService::zfs/retry). zfs/time_started string c The time when the service was started. zfs/trace_level string c Defines trace level for auto-services. zfs/type string c zfs/type = 'minute' | 'hourly' | 'daily' | 'weekly' | 'monthly'. The period of execution is set in the units of zfs/type. For example, zfs/type = 'hourly' enables you to schedule the service every 1, ... or 23 hours.

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Smf::clear ['string'], [] com.nexenta.nms.Container::destroy ['string', 'string'], [] com.nexenta.nms.Smf::disable ['string'], [] com.nexenta.nms.Smf::enable ['string'], [] com.nexenta.nms.SmfAutoService::execute ['string'], ['int32'] com.nexenta.nms.Container::get_child_prop ['string', 'string'], ['string'] com.nexenta.nms.Container::get_child_props ['string', 'string'], [['dict', 'string', 'string']] com.nexenta.nms.Smf::get_logfile ['string'], ['string'] com.nexenta.nms.Container::get_names ['string'], [['array', 'string']] com.nexenta.nms.Container::get_names_by_prop ['string', 'string', 'string'], [['array', 'string']] com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.SmfAutoService::get_sock_stats ['string'], [['dict', 'string', ['array', 'string']]] com.nexenta.nms.Smf::get_state ['string'], ['string'] com.nexenta.nms.SmfAutoService::is_daemon ['string'], ['bool'] com.nexenta.nms.SmfAutoService::is_running ['string'], ['bool']

com.nexenta.nms.SmfAutoService::is_scheduled ['string'], ['bool'] com.nexenta.nms.Container::object_exists ['string'], ['bool'] com.nexenta.nms.Smf::reread_config ['string'], [] com.nexenta.nms.Smf::restart ['string'], [] com.nexenta.nms.SmfAutoService::seconds_until_next_run ['string'], ['int32'] com.nexenta.nms.Container::set_child_prop ['string', 'string', 'string'], [] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Container::trylock ['string', 'int32'], ['bool'] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Container::unlock ['string', 'int32'], [] com.nexenta.nms.Object::unlock_self ['int32'], [] com.nexenta.nms.Smf::wait_for ['string', 'string', 'int32'], ['bool']

10 AutoSnap (snapshot) Service

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/Smf/AutoService/AutoSnap com.nexenta.nms.SmfAutoSnap Virtual Automatic Storage Service Service Management Facility (SMF) Virtual Container Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION

general/enabled string c svc.startd(1m): If value is set to true, the restarter tries to start the service, when all its dependencies are satisfied. If set to false, the service remains in the disabled state. info string wi General information about the object instance string c Suffix of the service's fmri. FMRI stands for Fault Management Resource Identifier; in this document FMRI or fmri is used to label the name of the service. Examples of FMRIs: 'svc:/system/filesystem/zfs/auto-tier:vol1-a-000', 'svc:/system/filesystem/zfs/auto- sync:vol2-b-001', etc. All auto-services has the following naming structure: :, where com.nexenta.nms.SmfAutoService::instance is a combination of com.nexenta.nms.SmfAutoService::instance_fs_name and com.nexenta.nms.SmfAutoService::instance_fs_id. In other words, fmri of an auto-service has the following outline: com.nexenta.nms.SmfAutoService::path:com.nexenta.nms.SmfAutoService::instance. For the list of auto-services that inherit Virtual Automatic Storage Service Object, see Object Model instance_fs_id string c The numeric portion of the com.nexenta.nms.SmfAutoService::instance. For example, instance_fs_id = 0 for the following FMRIs: 'svc:/system/filesystem/zfs/auto-tier:vol1-a- 000', 'svc:/system/filesystem/zfs/auto-sync:vol1-b-000'. The following is an example of an auto-service's name for which instance_fs_id = 10: 'svc:/system/filesystem/zfs/auto- tier:vol1-a-010'. All auto-services have the following naming structure: :, where com.nexenta.nms.SmfAutoService::instance is a combination of com.nexenta.nms.SmfAutoService::instance_fs_name and com.nexenta.nms.SmfAutoService::instance_fs_id. For the list of auto-services that inherit Virtual Automatic Storage Service Object, see Object Model instance_fs_name string c Part of the com.nexenta.nms.SmfAutoService::instance that reflects the path to source filesystem (folder). For example, instance_fs_name = 'vol1-a' for the following FMRIs: 'svc:/system/filesystem/zfs/auto-tier:vol1-a-000', 'svc:/system/filesystem/zfs/auto- sync:vol1-a-123'. All auto-services have the following naming structure: :, where com.nexenta.nms.SmfAutoService::instance is a combination of com.nexenta.nms.SmfAutoService::instance_fs_name and com.nexenta.nms.SmfAutoService::instance_fs_id. For the list of auto-services that inherit Virtual Automatic Storage Service Object, see Object Model ipc_name string e Interface class name of the associated interface object name string ri The name of the object path string c The prefix of an auto-service's name, or fmri. FMRI is a Fault Management Resource Identifier; in this document FMRI or fmri is conventionally used to label the name of the service. Examples of FMRI services: 'svc:/system/filesystem/zfs/auto-tier:vol1-a-000', 'svc:/system/filesystem/zfs/auto-sync:vol2-b-001', etc. All auto-services have the following naming structure: :, where com.nexenta.nms.SmfAutoService::instance is a combination of com.nexenta.nms.SmfAutoService::instance_fs_name and com.nexenta.nms.SmfAutoService::instance_fs_id. In other words, fmri of a given auto- service has the following outline: com.nexenta.nms.SmfAutoService::path:com.nexenta.nms.SmfAutoService::instance. For the list of auto-services that inherit Virtual Automatic Storage Service Object, see Object Model restarter/logfile string c A logfile of the service (filename). restarter/start_method_timestamp string c The start time of an SMF service restarter/start_method_waitstatus string c not inherited restarter/start_pid string c The process identificator (PID) of an SMF service restarter/state string c svc.startd(1m): The current state. restarter/state_timestamp string c svc.startd(1m): The time when the current state was reached. service string c service = 'auto-snap' | 'auto-scrub' | 'auto-sync' | 'auto-tier'. The type of the auto-service. For the list of auto-services that inherit Virtual Automatic Storage Service Object, see Object Model zfs/comment string c Information about filesystem. zfs/day string c The numeric value that depends on the com.nexenta.nms.SmfAutoService::type property. For the type = 'weekly', the day of the week is numbered as follows: 0 - 'Sun', 1 - 'Mon', 2 - 'Tue', 3 - 'Wed', 4 - 'Thu', 5 - 'Fri', 6 - 'Sat'. For the com.nexenta.nms.SmfAutoService::type = 'monthly', the day of the month is a number in the range of 1 .. 31. See also: com.nexenta.nms.Runner::freq_day zfs/exclude string c zfs/exclude = pattern1 | pattern2 ... Exclude directories matching specified pattern, or list of patterns. The pattern syntax is the same used in Unix shells for file/directory name filtering. For instance, '*.old' will allow to skip replicating directories with extension '.old'. Use '|' separator to specify more than one matching pattern, for example zfs/exclude = '*.old | *.new' will exclude both directories with '.old' and '.new' extensions. zfs/flags string c Flags for auto-services that are defined in common.pm. zfs/fs-name string c Same as com.nexenta.nms.SmfAutoService::instance_fs_name. Part of the service's fmri that reflects the name of the source filesystem (folder). For example, zfs/fs-name = 'vol1- a' for the following FMRIs: 'svc:/system/filesystem/zfs/auto-tier:vol1-a-000', 'svc:/system/filesystem/zfs/auto-sync:vol1-a-123', while zfs/fs-name = 'syspool' for the service named 'svc:/system/filesystem/zfs/auto-scrub:syspool-000'. For the list of auto- services that inherit Virtual Automatic Storage Service Object, see Object Model . See also: com.nexenta.nms.SmfAutoService::instance_fs_name zfs/hour string c zfs/hour = 0 .. 23. Specifies the hour of a day. For example, zfs/hour = 1 specifies 1am. See also: com.nexenta.nms.Runner::freq_hour zfs/keep string c Time to keep the snapshots]> zfs/last_replic_time string c The last time when the replication service was executed. zfs/latest-suffix string c zfs/minute string c zfs/minute = 0 .. 59. Specifies the minute of an hour. For example, zfs/minute = 30 specifies 30 minutes past a given hour. See also: com.nexenta.nms.Runner::freq_minute zfs/period string c Interval of time between automatic local snapshots. The maximum value depends on the com.nexenta.nms.SmfAutoService::zfs/type. For instance, if the zfs/type is 'hourly', the period may have any value in the range [1, 23], and if zfs/type is 'monthly', the valid range would be [1, 11], etc. See also com.nexenta.nms.Runner::period, com.nexenta.nms.Runner::freq_period zfs/retry string c zfs/retry = 0 | 1. Defines whether to run the service once the remote host becomes reachable. Non-zero (true) - run the service immediately after the remote host becomes reachable. If you set the option to 1: when a service fails during execution because the connection is lost, NexentaStor re-runs the service before the expiration of the next scheduled interval. If you set this option to zero (false): when a service fails during execution because the connection is lost, NexentaStor does not retry to execute the service, the service executes according to schedule. zfs/retry-timestamp string c zfs/retry-timestamp = time of the last retry, as a number of seconds since the start of epoch (00:00:00 UTC Jan 1st, 1970). Note: this variable is updated by service at a run- time, after it has been scheduled to re-run (after the remote host becomes reachable - see com.nexenta.nms.SmfAutoService::zfs/retry). zfs/snap-recursive string c zfs/snap-recursive = 0 | 1. If true, snapshot all nested folders, otherwise do not recurs into nested folders. The default value is 1 (true). zfs/time_started string c The time when the service was started. zfs/trace_level string c Defines trace level for auto-services. zfs/type string c zfs/type = 'minute' | 'hourly' | 'daily' | 'weekly' | 'monthly'. The period of execution is set in the units of zfs/type. For example, zfs/type = 'hourly' enables you to schedule the service every 1, ... or 23 hours. zfs/uniqid string c Unique automatic snapshots identificator

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Smf::clear ['string'], [] com.nexenta.nms.Container::destroy ['string', 'string'], [] com.nexenta.nms.Smf::disable ['string'], [] com.nexenta.nms.Smf::enable ['string'], [] com.nexenta.nms.SmfAutoService::execute ['string'], ['int32'] com.nexenta.nms.Container::get_child_prop ['string', 'string'], ['string'] com.nexenta.nms.Container::get_child_props ['string', 'string'], [['dict', 'string', 'string']] com.nexenta.nms.Smf::get_logfile ['string'], ['string'] com.nexenta.nms.Container::get_names ['string'], [['array', 'string']] com.nexenta.nms.Container::get_names_by_prop ['string', 'string', 'string'], [['array', 'string']] com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.SmfAutoService::get_sock_stats ['string'], [['dict', 'string', ['array', 'string']]] com.nexenta.nms.Smf::get_state ['string'], ['string'] com.nexenta.nms.SmfAutoService::is_daemon ['string'], ['bool'] com.nexenta.nms.SmfAutoService::is_running ['string'], ['bool'] com.nexenta.nms.SmfAutoService::is_scheduled ['string'], ['bool'] com.nexenta.nms.Container::object_exists ['string'], ['bool'] com.nexenta.nms.Smf::reread_config ['string'], [] com.nexenta.nms.Smf::restart ['string'], [] com.nexenta.nms.SmfAutoService::seconds_until_next_run ['string'], ['int32'] com.nexenta.nms.Container::set_child_prop ['string', 'string', 'string'], [] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Container::trylock ['string', 'int32'], ['bool'] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Container::unlock ['string', 'int32'], [] com.nexenta.nms.Object::unlock_self ['int32'], [] com.nexenta.nms.Smf::wait_for ['string', 'string', 'int32'], ['bool']

11 AutoTier (data replication) Service

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/Smf/AutoService/AutoTier com.nexenta.nms.SmfAutoTier Virtual Automatic Storage Service Service Management Facility (SMF) Virtual Container Virtual Base Object Properties

NAME TYPE ACCESS DESCRIPTION

general/enabled string c svc.startd(1m): If value is set to true, the restarter tries to start the service, when all its dependencies are satisfied. If set to false, the service remains in the disabled state. info string wi General information about the object instance string c Suffix of the service's fmri. FMRI stands for Fault Management Resource Identifier; in this document FMRI or fmri is used to label the name of the service. Examples of FMRIs: 'svc:/system/filesystem/zfs/auto-tier:vol1-a-000', 'svc:/system/filesystem/zfs/auto- sync:vol2-b-001', etc. All auto-services has the following naming structure: :, where com.nexenta.nms.SmfAutoService::instance is a combination of com.nexenta.nms.SmfAutoService::instance_fs_name and com.nexenta.nms.SmfAutoService::instance_fs_id. In other words, fmri of an auto-service has the following outline: com.nexenta.nms.SmfAutoService::path:com.nexenta.nms.SmfAutoService::instance. For the list of auto-services that inherit Virtual Automatic Storage Service Object, see Object Model instance_fs_id string c The numeric portion of the com.nexenta.nms.SmfAutoService::instance. For example, instance_fs_id = 0 for the following FMRIs: 'svc:/system/filesystem/zfs/auto-tier:vol1-a- 000', 'svc:/system/filesystem/zfs/auto-sync:vol1-b-000'. The following is an example of an auto-service's name for which instance_fs_id = 10: 'svc:/system/filesystem/zfs/auto- tier:vol1-a-010'. All auto-services have the following naming structure: :, where com.nexenta.nms.SmfAutoService::instance is a combination of com.nexenta.nms.SmfAutoService::instance_fs_name and com.nexenta.nms.SmfAutoService::instance_fs_id. For the list of auto-services that inherit Virtual Automatic Storage Service Object, see Object Model instance_fs_name string c Part of the com.nexenta.nms.SmfAutoService::instance that reflects the path to source filesystem (folder). For example, instance_fs_name = 'vol1-a' for the following FMRIs: 'svc:/system/filesystem/zfs/auto-tier:vol1-a-000', 'svc:/system/filesystem/zfs/auto- sync:vol1-a-123'. All auto-services have the following naming structure: :, where com.nexenta.nms.SmfAutoService::instance is a combination of com.nexenta.nms.SmfAutoService::instance_fs_name and com.nexenta.nms.SmfAutoService::instance_fs_id. For the list of auto-services that inherit Virtual Automatic Storage Service Object, see Object Model ipc_name string e Interface class name of the associated interface object name string ri The name of the object path string c The prefix of an auto-service's name, or fmri. FMRI is a Fault Management Resource Identifier; in this document FMRI or fmri is conventionally used to label the name of the service. Examples of FMRI services: 'svc:/system/filesystem/zfs/auto-tier:vol1-a-000', 'svc:/system/filesystem/zfs/auto-sync:vol2-b-001', etc. All auto-services have the following naming structure: :, where com.nexenta.nms.SmfAutoService::instance is a combination of com.nexenta.nms.SmfAutoService::instance_fs_name and com.nexenta.nms.SmfAutoService::instance_fs_id. In other words, fmri of a given auto- service has the following outline: com.nexenta.nms.SmfAutoService::path:com.nexenta.nms.SmfAutoService::instance. For the list of auto-services that inherit Virtual Automatic Storage Service Object, see Object Model restarter/logfile string c A logfile of the service (filename). restarter/start_method_timestamp string c The start time of an SMF service restarter/start_method_waitstatus string c not inherited restarter/start_pid string c The process identificator (PID) of an SMF service restarter/state string c svc.startd(1m): The current state. restarter/state_timestamp string c svc.startd(1m): The time when the current state was reached.

service string c service = 'auto-snap' | 'auto-scrub' | 'auto-sync' | 'auto-tier'. The type of the auto-service. For the list of auto-services that inherit Virtual Automatic Storage Service Object, see Object Model

zfs/comment string c Information about filesystem.

zfs/day string c The numeric value that depends on the com.nexenta.nms.SmfAutoService::type property. For the type = 'weekly', the day of the week is numbered as follows: 0 - 'Sun', 1 - 'Mon', 2 - 'Tue', 3 - 'Wed', 4 - 'Thu', 5 - 'Fri', 6 - 'Sat'. For the com.nexenta.nms.SmfAutoService::type = 'monthly', the day of the month is a number in the range of 1 .. 31. See also: com.nexenta.nms.Runner::freq_day zfs/depth string c RSYNC fanout depth zfs/dircontent string c Replicate the content of the dataset but not dataset itself zfs/direction string c Direction of replication stream zfs/exclude string c Exclude directories matching specified pattern zfs/flags string c Flags for auto-services that are defined in common.pm. zfs/from-fs string c Souce directory zfs/from-host string c Source host zfs/from-snapshot string c Replicate from specified snapthot zfs/from_snapname_temp string c Tier from temporary snapshot zfs/fs-name string c Same as com.nexenta.nms.SmfAutoService::instance_fs_name. Part of the service's fmri that reflects the name of the source filesystem (folder). For example, zfs/fs-name = 'vol1- a' for the following FMRIs: 'svc:/system/filesystem/zfs/auto-tier:vol1-a-000', 'svc:/system/filesystem/zfs/auto-sync:vol1-a-123', while zfs/fs-name = 'syspool' for the service named 'svc:/system/filesystem/zfs/auto-scrub:syspool-000'. For the list of auto- services that inherit Virtual Automatic Storage Service Object, see Object Model . See also: com.nexenta.nms.SmfAutoService::instance_fs_name zfs/hour string c zfs/hour = 0 .. 23. Specifies the hour of a day. For example, zfs/hour = 1 specifies 1am. See also: com.nexenta.nms.Runner::freq_hour zfs/keep string c zfs/last_replic_time string c The last time when the replication service was executed. zfs/latest-suffix string c Custom suffix for latest snapshot zfs/method string c Rsync method zfs/minute string c zfs/minute = 0 .. 59. Specifies the minute of an hour. For example, zfs/minute = 30 specifies 30 minutes past a given hour. See also: com.nexenta.nms.Runner::freq_minute zfs/non-recursive string c Don't replicate nested folders zfs/options string c Rsync additional options zfs/period string c Interval of time between service runs zfs/proto string c Rsync protocol: 'rsync', 'rsync+ssh', 'rsync+nfs', 'rsync+tcp' zfs/rate_limit string c Maximium allowed network speed for replication stream in kilobytes/s zfs/retry string c zfs/retry = 0 | 1. Defines whether to run the service once the remote host becomes reachable. Non-zero (true) - run the service immediately after the remote host becomes reachable. If you set the option to 1: when a service fails during execution because the connection is lost, NexentaStor re-runs the service before the expiration of the next scheduled interval. If you set this option to zero (false): when a service fails during execution because the connection is lost, NexentaStor does not retry to execute the service, the service executes according to schedule. zfs/retry-timestamp string c zfs/retry-timestamp = time of the last retry, as a number of seconds since the start of epoch (00:00:00 UTC Jan 1st, 1970). Note: this variable is updated by service at a run- time, after it has been scheduled to re-run (after the remote host becomes reachable - see com.nexenta.nms.SmfAutoService::zfs/retry). zfs/time_started string c The time when the service was started. zfs/to-fs string c Destination directory zfs/to-host string c Destination host zfs/trace_level string c Defines trace level for auto-services. zfs/type string c zfs/type = 'minute' | 'hourly' | 'daily' | 'weekly' | 'monthly'. The period of execution is set in the units of zfs/type. For example, zfs/type = 'hourly' enables you to schedule the service every 1, ... or 23 hours. zfs/uniqid string c Unique automatic snapshots identificator

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Smf::clear ['string'], []

com.nexenta.nms.Container::destroy ['string', 'string'], [] com.nexenta.nms.Smf::disable ['string'], [] com.nexenta.nms.Smf::enable ['string'], [] com.nexenta.nms.SmfAutoService::execute ['string'], ['int32'] com.nexenta.nms.Container::get_child_prop ['string', 'string'], ['string'] com.nexenta.nms.Container::get_child_props ['string', 'string'], [['dict', 'string', 'string']] com.nexenta.nms.Smf::get_logfile ['string'], ['string'] com.nexenta.nms.Container::get_names ['string'], [['array', 'string']] com.nexenta.nms.Container::get_names_by_prop ['string', 'string', 'string'], [['array', 'string']] com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.SmfAutoService::get_sock_stats ['string'], [['dict', 'string', ['array', 'string']]] com.nexenta.nms.Smf::get_state ['string'], ['string'] com.nexenta.nms.SmfAutoService::is_daemon ['string'], ['bool'] com.nexenta.nms.SmfAutoService::is_running ['string'], ['bool'] com.nexenta.nms.SmfAutoService::is_scheduled ['string'], ['bool'] com.nexenta.nms.Container::object_exists ['string'], ['bool'] com.nexenta.nms.Smf::reread_config ['string'], [] com.nexenta.nms.Smf::restart ['string'], [] com.nexenta.nms.SmfAutoService::seconds_until_next_run ['string'], ['int32'] com.nexenta.nms.Container::set_child_prop ['string', 'string', 'string'], [] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Container::trylock ['string', 'int32'], ['bool'] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Container::unlock ['string', 'int32'], [] com.nexenta.nms.Object::unlock_self ['int32'], [] com.nexenta.nms.Smf::wait_for ['string', 'string', 'int32'], ['bool']

12 Fault Management

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/Runner/Trigger com.nexenta.nms.Trigger Virtual Runner Virtual Container Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION

flags string c flags = none = 0 | is_daemon = 1 | maintenance_on_max_fail = 2 | clear_old_faults = 4 | notify_on_first_fail = 8 | notify_never = 16 | schedule_never = 32 | schedule_later = 64. This creation time property defines the runner's behavior and is a bitwise combination of the listed enumerated values. For instance, flags = 3 indicates that the runner is a daemon and that when the maximum number of failures is reached, the runner changes the state to 'maintenance'.

freq_day string wc The numeric value depends on the freq_type property. For the freq_type = 'weekly', the day of the week freq_day = 0 | 1 | 2 | 3 | 4 | 5 | 6. Days of the week are numbered as follows: 0 - 'Sun', 1 - 'Mon', 2 - 'Tue', 3 - 'Wed', 4 - 'Thu', 5 - 'Fri', 6 - 'Sat'. For the freq_type = 'monthly', the day of the month freq_day = 1 .. 31

freq_hour string wc freq_hour = 0 .. 23. Specifies the hour of a day. For example, freq_hour = 1 specifies 1am. freq_minute string wc freq_minute = 0 .. 59. Specifies the minute in an hour. For example, freq_minute = 30 specifies 30 minutes past a given hour. freq_period string wc freq_period = [1, max]. The maximum value depends on the freq_type. For example, if the freq_type is 'hourly', the freq_period may have any value in the range [1, 23], and if freq_type is 'monthly', the valid range is [1, 11], etc. freq_type string wc freq_type = 'minute' | 'hourly' | 'daily' | 'weekly' | 'monthly'. You set the period of execution in the units of freq_type. For example, if freq_type = 'hourly', you can schedule the runner every 1, .. or 23 hours. See related com.nexenta.nms.Runner::freq_period info string wi General information about the object ipc_name string e Interface class name of the associated interface object keep_days string c keep_days = number of days. Deafult value is 60 days. The property specifies the number of days to keep the runner's information. After keep_days period expires, the information is deleted from the database. name string ri The name of the object period string c Human-readable description of the periodic runner's execution. The description effectively consolidates freq_type, freq_day and the rest frequency related properties into single human-readable string, for example: "every two hours", "every Saturday at 3am", "every 3rd day of each month at 12:45am", etc. state string c state = 'unknown' | 'ready' | 'running' | 'starting' | 'pending' | 'missing'. Under normal circumstances the runner's state is 'ready', or 'running' status string wc status = 'not-registered' | 'disabled' | 'enabled' | 'maintenance'. trace_level string wc trace_level = none = 0 | default = 1 | verbose = 10 | verbose-verbose = 20 | verbose- verbose-verbose. Specifies the levels of detail of the logging information for the runner, from 0 (none) to 20 (the most detailed). type string c type = 'trigger' | 'collector' | 'reporter' | 'indexer'

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Container::destroy ['string', 'string'], [] com.nexenta.nms.Runner::disable ['string'], [] com.nexenta.nms.Runner::enable ['string'], [] com.nexenta.nms.Runner::execute ['string'], [] com.nexenta.nms.Container::get_child_prop ['string', 'string'], ['string'] com.nexenta.nms.Container::get_child_props ['string', 'string'], [['dict', 'string', 'string']] com.nexenta.nms.Runner::get_init_params ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Runner::get_init_tunables ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::get_names ['string'], [['array', 'string']] com.nexenta.nms.Container::get_names_by_prop ['string', 'string', 'string'], [['array', 'string']] com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Runner::get_tunables ['string', 'string', 'bool'], [['dict', 'string', 'string']] com.nexenta.nms.Runner::is_registered ['string'], ['bool'] com.nexenta.nms.Container::object_exists ['string'], ['bool'] com.nexenta.nms.Runner::register ['string', ['dict', 'string', 'string'], ['dict', 'string', 'string']], [] com.nexenta.nms.Runner::reset ['string'], [] com.nexenta.nms.Container::set_child_prop ['string', 'string', 'string'], [] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Runner::set_tunable ['string', 'string', 'string'], [] com.nexenta.nms.Container::trylock ['string', 'int32'], ['bool'] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Container::unlock ['string', 'int32'], [] com.nexenta.nms.Object::unlock_self ['int32'], [] com.nexenta.nms.Runner::unregister ['string'], [] 12.1 com.nexenta.nms.Trigger::clear

(void) clear (string runner_name, int32 fault_id)

Clear specific fault ID

Parameters

NAME TYPE DESCRIPTION

runner_name string The name of the fault trigger fault_id int32 Fault ID

No return values

Usage Examples

3. clear('memory-check', 2) clear fault ID = 2 raized by the 'memory-check'

See Also

Method Short Description

com.nexenta.nms.Trigger::clear_all Clear all faults generated by the specified fault trigger ... com.nexenta.nms.Trigger::get_faults Get the list of faults generated by the specified fault ... com.nexenta.nms.Trigger::fault Generate a fault notification

Previous Section: AutoTier (data replication) Service Table Of Contents Next Section: Folder (Filesystem)

12.2 com.nexenta.nms.Trigger::clear_all

(void) clear_all (string runner_name)

Clear all faults generated by the specified fault trigger

Parameters

NAME TYPE DESCRIPTION

runner_name string The name of the fault trigger

No return values

Usage Examples

3. clear_all('memory-check') clear all faults raised so far by the 'memory-check' See Also

Method Short Description

com.nexenta.nms.Trigger::clear Clear specific fault ID com.nexenta.nms.Trigger::get_faults Get the list of faults generated by the specified fault ... com.nexenta.nms.Trigger::fault Generate a fault notification

Previous Section: AutoTier (data replication) Service Table Of Contents Next Section: Folder (Filesystem)

12.3 com.nexenta.nms.Trigger::event

(void) event (string runner_name, dictionary {string => string} params)

Create and send an event for the specified trigger

Parameters

NAME TYPE DESCRIPTION

runner_name string The name of the trigger

params dictionary {string => Available parameters: { 'subj' => '', 'msg' => '', 'severity' => 'CRITICAL' | string} 'WARNING' | 'INFO' | 'NOTICE'}

No return values

Previous Section: AutoTier (data replication) Service Table Of Contents Next Section: Folder (Filesystem)

12.4 com.nexenta.nms.Trigger::fault

(void) fault (string runner_name, dictionary {string => string} params)

Generate a fault notification

Parameters

NAME TYPE DESCRIPTION

runner_name string The name of the fault trigger params dictionary dictionary { string => string } that contains the following keys: 'id', 'level', 'severity', {string 'max_fail', 'description', 'details'. And the values are: 'id' = , 'level' = 'ALARM' | 'FATAL' => | 'ERROR', 'severity' = 'CRITICAL' | 'NOTICE', 'max_fail' = , 'description' = , string} 'details' = . For instance: { 'id' => 10032, 'level' => 'ALARM', 'max_fail' => 1, 'severity' => 'CRITICAL', 'description' => "Out of memory", 'details' => "..." }

No return values

Usage Examples

3. fault('memory-check', { 'id' => 8, 'level' => 'ALARM', 'max_fail' => 1, 'severity' => 'CRITICAL', 'description' => "Out of memory", 'details' => "..." } )

Generate the alarm-level fault notification with the specified parameters

See Also Method Short Description

com.nexenta.nms.Trigger::get_faults Get the list of faults generated by the specified fault ... com.nexenta.nms.Trigger::clear Clear specific fault ID com.nexenta.nms.Trigger::clear_all Clear all faults generated by the specified fault trigger ...

Previous Section: AutoTier (data replication) Service Table Of Contents Next Section: Folder (Filesystem)

12.5 com.nexenta.nms.Trigger::get_faults

(dictionary {int32 => dictionary {string => string}}) get_faults (string runner_name)

Get the list of faults generated by the specified fault trigger; the resulting dictionary includes the detailed fault descriptions

Parameters

NAME TYPE DESCRIPTION

runner_name string The name of the fault trigger

Return Value

TYPE DESCRIPTION

dictionary {int32 => dictionary {string => Hash: fault ID = > description (details, description, severity, string}} timestamp)

Usage Examples

3. get_faults('memory-check')

Get faults by 'memory-check'

See Also

Method Short Description

com.nexenta.nms.Trigger::fault Generate a fault notification com.nexenta.nms.Trigger::clear Clear specific fault ID com.nexenta.nms.Trigger::clear_all Clear all faults generated by the specified fault trigger ... com.nexenta.nms.Trigger::fault Generate a fault notification

Previous Section: AutoTier (data replication) Service Table Of Contents Next Section: Folder (Filesystem)

13 Folder (Filesystem)

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/Folder com.nexenta.nms.Folder Virtual Container Virtual Base Object Properties

NAME TYPE ACCESS DESCRIPTION

info string wi General information about the object ipc_name string e Interface class name of the associated interface object name string ri The name of the object origin string c For the cloned folders (filesystems) - the snapshot from which the clone was created. The origin cannot be destroyed, even with the -r or -f options, as long as a clone exists.

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Container::destroy ['string', 'string'], [] com.nexenta.nms.Container::get_child_prop ['string', 'string'], ['string'] com.nexenta.nms.Container::get_child_props ['string', 'string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::get_names ['string'], [['array', 'string']] com.nexenta.nms.Container::get_names_by_prop ['string', 'string', 'string'], [['array', 'string']] com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::object_exists ['string'], ['bool'] com.nexenta.nms.Container::set_child_prop ['string', 'string', 'string'], [] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Container::trylock ['string', 'int32'], ['bool'] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Container::unlock ['string', 'int32'], [] com.nexenta.nms.Object::unlock_self ['int32'], []

13.1 com.nexenta.nms.Folder::add_group_acl

(void) add_group_acl (string zname, string group, dictionary {string => array of (string)} acl)

Add the group's permissions to access a given folder and its sub-folders

Parameters

NAME TYPE DESCRIPTION

zname string The name of the folder group string The name of the group

acl dictionary {string => Dictionary of one or more entries: { key => (array of permissions) }, where the array of (string)} has the following two values: "allow", "deny"

No return values

Usage Examples

3. add_group_acl('vol1/a', 'contractors', { 'allow' => ['read_data'],'deny' => ['write_data']} )

Enable the read access and deny the write access to folder 'vol1/a' for group 'contractors' 6. add_group_acl('vol1/a', 'staff', { 'allow' => ['read_data', 'write_data'] } )

Enable the read and write access to folder 'vol1/a' for group 'staff'

See Also

Method Short Description

com.nexenta.nms.Folder::get_aclinfo Get the ACL related static information: the groups of permissions ... com.nexenta.nms.Folder::get_acl Get folder's ACL for the entities that match the pattern ... com.nexenta.nms.Folder::add_user_acl Add the user's permissions to access a given folder and ... com.nexenta.nms.Folder::del_user_acl Remove the user's permissions from the folder's ACL com.nexenta.nms.Folder::del_group_acl Remove the group's permissions from the folder's ACL com.nexenta.nms.Folder::set_user_acl Set the user's permissions to access a given folder and ... com.nexenta.nms.Folder::set_group_acl Set the group's permissions to access a given folder and ... com.nexenta.nms.Folder::reset_acl Reset the folder's ACLs to the system default (POSIX, built-in) ... com.nexenta.nms.Folder::set_user_owner Change the user ownership of a folder com.nexenta.nms.Folder::set_group_owner Change the group ownership for a given folder.

Previous Section: Fault Management Table Of Contents Next Section: Folder and Snapshot Indexing Facility (Search Engine)

13.2 com.nexenta.nms.Folder::add_user_acl

(void) add_user_acl (string zname, string user, dictionary {string => array of (string)} acl)

Add the user's permissions to access a given folder and its sub-folders

Parameters

NAME TYPE DESCRIPTION

zname string The name of the folder user string The name of the user

acl dictionary {string => Dictionary of one or more entries: { key => (array of permissions) }, where the array of (string)} has the following two values: "allow", "deny"

No return values

Usage Examples

3. add_user_acl('vol1/a', 'mikec', { 'allow' => ['read_data'], 'deny' => ['write_data'] } )

Enable the read access and disable the write access to folder 'vol1/a' for user 'mikec'

6. add_user_acl('vol1/a', 'joel', { 'allow' => ['read_data', 'write_data'] } )

Enable the read and write access to folder 'vol1/a' for user 'joel'

See Also

Method Short Description com.nexenta.nms.Folder::get_aclinfo Get the ACL related static information: the groups of permissions ... com.nexenta.nms.Folder::get_acl Get folder's ACL for the entities that match the pattern ... com.nexenta.nms.Folder::add_group_acl Add the group's permissions to access a given folder and ... com.nexenta.nms.Folder::del_user_acl Remove the user's permissions from the folder's ACL com.nexenta.nms.Folder::del_group_acl Remove the group's permissions from the folder's ACL com.nexenta.nms.Folder::set_user_acl Set the user's permissions to access a given folder and ... com.nexenta.nms.Folder::set_group_acl Set the group's permissions to access a given folder and ... com.nexenta.nms.Folder::reset_acl Reset the folder's ACLs to the system default (POSIX, built-in) ... com.nexenta.nms.Folder::set_user_owner Change the user ownership of a folder com.nexenta.nms.Folder::set_group_owner Change the group ownership for a given folder.

Previous Section: Fault Management Table Of Contents Next Section: Folder and Snapshot Indexing Facility (Search Engine)

13.3 com.nexenta.nms.Folder::clone

(void) clone (string zname_snapname, string target_zname)

Create a clone of a snapshot. Clone is a writable folder () with the initial contents identical to the one of the snapshot. Note: to clone zvols, use com.nexenta.nms.Zvol::clone API.

Parameters

NAME TYPE DESCRIPTION

zname_snapname string A fully qualified snapshot name of the following layout: zname@snapname. For example, clone('vol1/a@today', ...) results in cloning folder 'vol1/a' at the exact point in time of creation of snapshot 'vol1/a@today' and with the exact content captured by the 'vol1/a@today'.

target_zname string The name of the target folder.

No return values

Usage Examples

3. clone('vol1/a/b@today', 'vol1/clone_ab')

Clone snapshot 'vol1/a/b@today' as a new folder 'vol1/clone_ab'

See Also

Method Short Description

com.nexenta.nms.Snapshot::create Create (ie, take) snapshots, recursively or non-recursively, depending on the ... com.nexenta.nms.Zvol::clone Clone a zvol. The operation results in a writable zvol ...

Previous Section: Fault Management Table Of Contents Next Section: Folder and Snapshot Indexing Facility (Search Engine)

13.4 com.nexenta.nms.Folder::create

(array of (string)) create (string zname, string pathname)

Create "paths" to folders Parameters

NAME TYPE DESCRIPTION

zname string The name of the parent folder pathname string Partial name of the new folder, optionally may not include the parent folder's name

Return Value

TYPE DESCRIPTION

array of (string) List of the created folders

Usage Examples

3. create('vol1', 'vol1/a/b/c')

Create folder a/b/c on volume vol1. Depending on the availability of 'vol1/a' and 'vol1/a/b', this operation creates, and includes in the returned list either all 3 sub-folders, or two, or just one

6. create('vol1/a/b', 'c/d')

Create 'c/d' sub-folder on folder 'vol1/a/b'. The resulting set of sub-folders includes 'vol1/a/b/c' and 'vol1/a/b/c/d'

See Also

Method Short Description

com.nexenta.nms.Folder::create_with_props Create a "path" of folders. This API method enables you ... com.nexenta.nms.Container::destroy Destroy a child object. com.nexenta.nms.Snapshot::create Create (ie, take) snapshots, recursively or non-recursively, depending on the ...

com.nexenta.nms.Folder::create_snapshot Snapshot a given folder and possibly its sub-folders com.nexenta.nms.Volume::vol_create Create a volume

Previous Section: Fault Management Table Of Contents Next Section: Folder and Snapshot Indexing Facility (Search Engine)

13.5 com.nexenta.nms.Folder::create_snapshot

(void) create_snapshot (string zname, string snapname, string cmdopt)

Snapshot a given folder and possibly its sub-folders

Parameters

NAME TYPE DESCRIPTION

zname string The name of the folder

snapname string Snapshot's partial name cmdopt string ZFS command option

No return values Usage Examples

3. create_snapshot('vol1/a', 'today', "")

Create a snapshot of folder 'vol1/a', and name the snapshot 'vol1/a@today'

6. create_snapshot('vol1/a', 'today', "-r")

Create a snapshot of folder 'vol1/a' and its sub-folders. If folder 'vol1/a/' contains any sub-folders, then the operation creates a snapshot of each sub-folder, for example: 'vol1/a/b/c@today'

See Also

Method Short Description

com.nexenta.nms.Folder::create Create "paths" to folders com.nexenta.nms.Snapshot::create Create (ie, take) snapshots, recursively or non-recursively, depending on the ...

com.nexenta.nms.Folder::create_with_props Create a "path" of folders. This API method enables you ...

Previous Section: Fault Management Table Of Contents Next Section: Folder and Snapshot Indexing Facility (Search Engine)

13.6 com.nexenta.nms.Folder::create_with_props

(array of (string)) create_with_props (string zname, string pathname, dictionary {string => string} creation_time_props)

Create a "path" of folders. This API method enables you to specify the creation time properties. Compare with com.nexenta.nms.Folder::create.

Parameters

NAME TYPE DESCRIPTION

zname string The name of the parent folder pathname string Partial name of the new folder, optionally not including the parent folder's name

creation_time_props dictionary {string { Property Name => Property Value } dictionary of property names and their => string} values specified at the creation time.

Return Value

TYPE DESCRIPTION

array of (string) List of the created folders

Usage Examples

3. create_with_props('vol1', 'vol1/a/b/c', {})

Create folder 'a/b/c' on volume 'vol1'. Depending on the availability of 'vol1/a' and 'vol1/a/b', this operation creates, and includes in the returned list either all 3 sub-folders, or two, or just one'. Note that in this example you pass an empty dictionary for creation_time_props. 6. create_with_props('vol1/a/b', 'c/d', { compression=>"on", quota=>"1G", recordsize=>"4k" })

Create 'c/d' sub-folder of the folder 'vol1/a/b'. The resulting set of sub-folders includes 'vol1/a/b/c' and 'vol1/a/b/c/d' with enabled compression, and the corresponding quota and recordsize values

See Also

Method Short Description

com.nexenta.nms.Folder::create Create "paths" to folders

com.nexenta.nms.Container::destroy Destroy a child object. com.nexenta.nms.Snapshot::create Create (ie, take) snapshots, recursively or non-recursively, depending on the ...

com.nexenta.nms.Folder::create_snapshot Snapshot a given folder and possibly its sub-folders com.nexenta.nms.Volume::vol_create Create a volume

Previous Section: Fault Management Table Of Contents Next Section: Folder and Snapshot Indexing Facility (Search Engine)

13.7 com.nexenta.nms.Folder::del_group_acl

(void) del_group_acl (string zname, string group, dictionary {string => array of (string)} acl)

Remove the group's permissions from the folder's ACL

Parameters

NAME TYPE DESCRIPTION

zname string The name of the folder group string The name of the group

acl dictionary {string => Dictionary of one or more entries: { key => (array of permissions) }, where the array of (string)} has the following two values: "allow", "deny"

No return values

Usage Examples

3. del_group_acl('vol1/a', 'staff', { 'allow' => (), 'deny' => () } )

Remove all group 'staff' permissions from the ACL of folder 'vol1/a'.

See Also

Method Short Description

com.nexenta.nms.Folder::get_aclinfo Get the ACL related static information: the groups of permissions ... com.nexenta.nms.Folder::get_acl Get folder's ACL for the entities that match the pattern ... com.nexenta.nms.Folder::add_user_acl Add the user's permissions to access a given folder and ... com.nexenta.nms.Folder::add_group_acl Add the group's permissions to access a given folder and ... com.nexenta.nms.Folder::del_user_acl Remove the user's permissions from the folder's ACL com.nexenta.nms.Folder::set_user_acl Set the user's permissions to access a given folder and ... com.nexenta.nms.Folder::set_group_acl Set the group's permissions to access a given folder and ... com.nexenta.nms.Folder::reset_acl Reset the folder's ACLs to the system default (POSIX, built-in) ... com.nexenta.nms.Folder::set_user_owner Change the user ownership of a folder com.nexenta.nms.Folder::set_group_owner Change the group ownership for a given folder.

Previous Section: Fault Management Table Of Contents Next Section: Folder and Snapshot Indexing Facility (Search Engine)

13.8 com.nexenta.nms.Folder::del_user_acl

(void) del_user_acl (string zname, string user, dictionary {string => array of (string)} acl)

Remove the user's permissions from the folder's ACL

Parameters

NAME TYPE DESCRIPTION

zname string The name of the folder user string The name of the user

acl dictionary {string => Dictionary of one or more entries: { key => (array of permissions) }, where the array of (string)} has the following two values: "allow", "deny"

No return values

Usage Examples

3. del_user_acl('vol1/a', 'mikec', { 'allow' => (), 'deny' => () } )

Remove all permissions for user 'mikec' from the ACL of folder 'vol1/a'

See Also

Method Short Description

com.nexenta.nms.Folder::get_aclinfo Get the ACL related static information: the groups of permissions ... com.nexenta.nms.Folder::get_acl Get folder's ACL for the entities that match the pattern ... com.nexenta.nms.Folder::add_user_acl Add the user's permissions to access a given folder and ... com.nexenta.nms.Folder::add_group_acl Add the group's permissions to access a given folder and ... com.nexenta.nms.Folder::del_group_acl Remove the group's permissions from the folder's ACL com.nexenta.nms.Folder::set_user_acl Set the user's permissions to access a given folder and ... com.nexenta.nms.Folder::set_group_acl Set the group's permissions to access a given folder and ... com.nexenta.nms.Folder::reset_acl Reset the folder's ACLs to the system default (POSIX, built-in) ... com.nexenta.nms.Folder::set_user_owner Change the user ownership of a folder com.nexenta.nms.Folder::set_group_owner Change the group ownership for a given folder.

Previous Section: Fault Management Table Of Contents Next Section: Folder and Snapshot Indexing Facility (Search Engine)

13.9 com.nexenta.nms.Folder::get_acl

(dictionary {string => dictionary {string => array of (string)}}) get_acl (string zname, string pattern)

Get folder's ACL for the entities that match the pattern Parameters

NAME TYPE DESCRIPTION

zname string The name of the folder pattern string Pattern to select a matching subset of ACL entities. The entities are: owner@, group@, everyone@, as well as user: and group:, where the first 3 entities are standard and built-in, provided for POSIX compatibility. An empty pattern results in returning the folder's ACL, with entities being keys of the resulting dictionary (see next).

Return Value

TYPE DESCRIPTION

dictionary {string => dictionary {string => array of Hash: { entity_name => Dictionary of { key => (array of (string)}} permissions) } },

Usage Examples

3. get_acl('vol1/a', '^group:')

Get all user-defined (non-default) group permissions for folder 'vol1/a'; A sample result: 'group:staff' => { 'allow' => ( 'read_xattr', 'read_attributes' ), }

6. get_acl('vol1/a', '')

Get the ACL for folder 'vol1/a'. A sample result: 'owner@', 'group@', and 'everyone@'. Each entity name, whether POSIX or added by user, is an "outer" key in the returned dictionary that have the following layout: { entity_name => Dictionary of { key => (array of permissions) } }, where the "inner" may have the following values: "allow", "deny"

See Also

Method Short Description

com.nexenta.nms.Folder::get_acl_by_index Retrieve the complete folder's ACL, and possibly check for duplicate ... com.nexenta.nms.Folder::get_aclinfo Get the ACL related static information: the groups of permissions ... com.nexenta.nms.Folder::add_user_acl Add the user's permissions to access a given folder and ... com.nexenta.nms.Folder::add_group_acl Add the group's permissions to access a given folder and ... com.nexenta.nms.Folder::del_user_acl Remove the user's permissions from the folder's ACL com.nexenta.nms.Folder::del_group_acl Remove the group's permissions from the folder's ACL com.nexenta.nms.Folder::set_user_acl Set the user's permissions to access a given folder and ... com.nexenta.nms.Folder::set_group_acl Set the group's permissions to access a given folder and ... com.nexenta.nms.Folder::reset_acl Reset the folder's ACLs to the system default (POSIX, built-in) ...

Previous Section: Fault Management Table Of Contents Next Section: Folder and Snapshot Indexing Facility (Search Engine)

13.10 com.nexenta.nms.Folder::get_acl_by_index

(dictionary {string => dictionary {string => array of (string)}}) get_acl_by_index (string zname, bool check_duplicates_only)

Retrieve the complete folder's ACL, and possibly check for duplicate entries. The "entities" are: owner@, group@, everyone@, as well as user: and group:, where the first 3 entities are standard and built-in, provided for POSIX compatibility. See com.nexenta.nms.Folder::get_acl Parameters

NAME TYPE DESCRIPTION

zname string The name of the folder check_duplicates_only bool check_duplicates_only = 0 | 1. 1 - true, check for redundant ACL entries. 0 - false, do not check. Note that a correct ACL must have no more than one 'allow' entry per entity and no more than one 'deny' entry. An ACL with two or more 'allow' or 'deny' entries is redundant. The difference between com.nexenta.nms.Folder::get_acl_by_index and the com.nexenta.nms.Folder::get_acl APIs is that the later retrieves all ACL entries and returns a dictionary with the unique keys of the following layout: . See also: com.nexenta.nms.Folder::get_acl.

Return Value

TYPE DESCRIPTION

dictionary {string => dictionary {string => array { entity_name:index_in_the_ACL => Dictionary of { key => (array of of (string)}} permissions) } }

Usage Examples

3. get_acl_by_index('vol1/a', 0)

Get the entire access control list for folder 'vol1/a'. The resulting nested dictionary may include the following standard POSIX entities: 'owner@', 'group@', and 'everyone@'. Each entity name, whether POSIX default or explicitly added, is an "outer" key in the returned dictionary that will have the following layout: { entity_name:index_in_the_ACL => Dictionary of { key => (array of permissions) } }, where the "inner" may have the following values: "allow", "deny"

See Also

Method Short Description

com.nexenta.nms.Folder::get_acl Get folder's ACL for the entities that match the pattern ... com.nexenta.nms.Folder::get_aclinfo Get the ACL related static information: the groups of permissions ... com.nexenta.nms.Folder::add_user_acl Add the user's permissions to access a given folder and ... com.nexenta.nms.Folder::add_group_acl Add the group's permissions to access a given folder and ... com.nexenta.nms.Folder::del_user_acl Remove the user's permissions from the folder's ACL com.nexenta.nms.Folder::del_group_acl Remove the group's permissions from the folder's ACL com.nexenta.nms.Folder::set_user_acl Set the user's permissions to access a given folder and ... com.nexenta.nms.Folder::set_group_acl Set the group's permissions to access a given folder and ... com.nexenta.nms.Folder::reset_acl Reset the folder's ACLs to the system default (POSIX, built-in) ...

Previous Section: Fault Management Table Of Contents Next Section: Folder and Snapshot Indexing Facility (Search Engine)

13.11 com.nexenta.nms.Folder::get_aclinfo

(dictionary {string => dictionary {string => string}}) get_aclinfo (void)

Get the ACL related static information: the groups of permissions and descriptions

No parameters

Return Value

TYPE DESCRIPTION dictionary {string => dictionary Descriptions of the ACL permissions, in a form of hash: { permission_group => {string => string}} Dictionary of { permission_name => Description } }

Usage Examples

3. get_aclinfo()

Get the ACL information

See Also

Method Short Description

com.nexenta.nms.Folder::get_acl Get folder's ACL for the entities that match the pattern ... com.nexenta.nms.Folder::add_user_acl Add the user's permissions to access a given folder and ... com.nexenta.nms.Folder::add_group_acl Add the group's permissions to access a given folder and ... com.nexenta.nms.Folder::del_user_acl Remove the user's permissions from the folder's ACL com.nexenta.nms.Folder::del_group_acl Remove the group's permissions from the folder's ACL com.nexenta.nms.Folder::set_user_acl Set the user's permissions to access a given folder and ... com.nexenta.nms.Folder::set_group_acl Set the group's permissions to access a given folder and ... com.nexenta.nms.Folder::reset_acl Reset the folder's ACLs to the system default (POSIX, built-in) ...

Previous Section: Fault Management Table Of Contents Next Section: Folder and Snapshot Indexing Facility (Search Engine)

13.12 com.nexenta.nms.Folder::get_all_names

(array of (string)) get_all_names (string pattern)

Get an array of all child object names that match the specified pattern (include 'syspool')

Parameters

NAME TYPE DESCRIPTION

pattern string Pattern to select a matching subset of child objects. An empty string matches all existing child objects.

Return Value

TYPE DESCRIPTION

array of (string) List of all child object names

Previous Section: Fault Management Table Of Contents Next Section: Folder and Snapshot Indexing Facility (Search Engine)

13.13 com.nexenta.nms.Folder::get_groupspace

(dictionary {string => dictionary {string => string}}) get_groupspace (string zname, string group, string type)

Get the groupspace parameters

Parameters NAME TYPE DESCRIPTION

zname string Folder name, for example: 'trunk/fol2' group string Group name, for example: 'other' type string Optional parameter, which is get by 'get_groupspace_types'

Return Value

TYPE DESCRIPTION

dictionary {string => dictionary {string => string}} The groupspace parameters: 'type', 'used', and 'quota'

Previous Section: Fault Management Table Of Contents Next Section: Folder and Snapshot Indexing Facility (Search Engine)

13.14 com.nexenta.nms.Folder::get_groupspace_types

(array of (string)) get_groupspace_types (void)

Get the list of available groupspace types.

No parameters

Return Value

TYPE DESCRIPTION

array of (string) List of available groupspace types

Previous Section: Fault Management Table Of Contents Next Section: Folder and Snapshot Indexing Facility (Search Engine)

13.15 com.nexenta.nms.Folder::get_prop_valid_values

(array of (string)) get_prop_valid_values (string prop_name)

Get the valid range and/or enumeration for a given folder's property.

Parameters

NAME TYPE DESCRIPTION

prop_name string The name of the property.

Return Value

TYPE DESCRIPTION

array of (string) Array of available values for the specified property

Usage Examples

3. get_prop_valid_values('available')

Returns ('').

6. get_prop_valid_values('compression') Return ('on', 'off', 'lzjb', 'gzip', 'gzip-[1-9]').

9. get_prop_valid_values('readonly')

Returns ('on', 'off').

12. get_prop_valid_values('reservation')

Returns ('', 'none').

15. get_prop_valid_values('snapdir')

Returns ('hidden', 'visible').

18. get_prop_valid_values('checksum')

Returns ('on', 'off', 'fletcher2', 'fletcher4', 'sha256').

See Also

Method Short Description

com.nexenta.nms.Volume::get_prop_valid_values Get the valid range and/or enumeration for a given volume's ... com.nexenta.nms.Zvol::get_prop_valid_values Get a valid range and/or enumeration for a given zvol's ... com.nexenta.nms.Folder::inherit_prop Restore a system-default inheritance of a ZFS property. The method ...

Previous Section: Fault Management Table Of Contents Next Section: Folder and Snapshot Indexing Facility (Search Engine)

13.16 com.nexenta.nms.Folder::get_subfolder_names

(array of (string)) get_subfolder_names (string zname, bool recursive)

Get the sub-folder names

Parameters

NAME TYPE DESCRIPTION

zname string The name of the parent folder recursive bool recursive = 0 | 1. 1 - true, include all names of nested folders; 0 - false, include only immediate sub- folders of the specified folder

Return Value

TYPE DESCRIPTION

array of (string) List of subfolders

Usage Examples 3. get_subfolder_names('vol1/a', 1)

Recursively return all nested sub-folders of the folder 'vol1/a'; For example, if you have a folder 'vol1/a/b/c/d', it will be included in the returned list of sub-folders.

See Also

Method Short Description

com.nexenta.nms.Container::get_names Get the list of names of all child objects that ... com.nexenta.nms.Container::get_names_by_prop Get the list of all child objects that have a ... com.nexenta.nms.Snapshot::get_snapshot_names Get the list of existing snapshots for the specified folder, ...

Previous Section: Fault Management Table Of Contents Next Section: Folder and Snapshot Indexing Facility (Search Engine)

13.17 com.nexenta.nms.Folder::get_userspace

(dictionary {string => dictionary {string => string}}) get_userspace (string zname, string user, string type)

Get the userspace parameters

Parameters

NAME TYPE DESCRIPTION

zname string Folder name, for example: 'trunk/fol2' user string User name, ex: 'john' type string Optional parameter, which you get by 'get_userspace_types'

Return Value

TYPE DESCRIPTION

dictionary {string => dictionary {string => string}} The userspace parameters

Previous Section: Fault Management Table Of Contents Next Section: Folder and Snapshot Indexing Facility (Search Engine)

13.18 com.nexenta.nms.Folder::get_userspace_types

(array of (string)) get_userspace_types (void)

Get the available userspace types

No parameters

Return Value

TYPE DESCRIPTION

array of (string) List of the userspace types

Previous Section: Fault Management Table Of Contents Next Section: Folder and Snapshot Indexing Facility (Search Engine) 13.19 com.nexenta.nms.Folder::get_version_info

(array of (int32)) get_version_info (string zname)

Get the folder's ZFS version

Parameters

NAME TYPE DESCRIPTION

zname string The name of the folder

Return Value

TYPE DESCRIPTION

array of (int32) ZFS version of the folder

Usage Examples

3. get_version_info('vol1/a')

Get the information about the version of folder 'vol1/a'. A sample result: (3, 3) or (3, 2). The 2nd example demonstrates the case, when the folder's ZFS version (2) may be upgraded to the system version (3)

See Also

Method Short Description

com.nexenta.nms.Folder::upgrade Upgrade folder's ZFS version com.nexenta.nms.Volume::get_version_info Get volume's ZFS version com.nexenta.nms.Volume::upgrade Upgrade volume's ZFS version. WARNING: This operation may affect availability ...

Previous Section: Fault Management Table Of Contents Next Section: Folder and Snapshot Indexing Facility (Search Engine)

13.20 com.nexenta.nms.Folder::has_zfs_prop

(bool) has_zfs_prop (string zname, string prop)

Determine whether a zfs property exists or not

Parameters

NAME TYPE DESCRIPTION

zname string ZFS name prop string Property name

Return Value

TYPE DESCRIPTION

bool 1 | 0, 1 - true, 0 - false Previous Section: Fault Management Table Of Contents Next Section: Folder and Snapshot Indexing Facility (Search Engine)

13.21 com.nexenta.nms.Folder::inherit_prop

(void) inherit_prop (string zname, string propname, int32 recursive)

Restore a system-default inheritance of a ZFS property. The method clears a value of the specified property, causing it to be inherited from the parent folder. If the parent folder does not have this property set, the default value is used. Note that all modifiable properties, with the exception of quota and reservation, inherit the values from their parent folder.

Parameters

NAME TYPE DESCRIPTION

zname string The name of the folder propname string The name of the property. The list of modifiable properties includes: compression, reservation, checksum, copies, readonly

recursive int32 recursive = 0 | 1. 1 - true: clear the specified property in the specified folder and all its sub-folders. This makes the entire sub-tree of sub-folders to inherit the specified property from the folder's parent. 0 - false: apply the operation only to the specified folder.

No return values

Usage Examples

3. inherit_prop('vol1/a/b', 'sharenfs', 1)

Inherit recursively property 'sharenfs' for the 'vol1/a/b' and all descendent sub-folders (if any) from the parent folder 'vol1/a'.

See Also

Method Short Description

com.nexenta.nms.Folder::get_prop_valid_values Get the valid range and/or enumeration for a given folder's ...

Previous Section: Fault Management Table Of Contents Next Section: Folder and Snapshot Indexing Facility (Search Engine)

13.22 com.nexenta.nms.Folder::promote

(void) promote (string zname)

Promotes a cloned dataset to no longer be dependent on its 'origin' snapshot.

Parameters

NAME TYPE DESCRIPTION

zname string Dataset name

No return values

Previous Section: Fault Management Table Of Contents Next Section: Folder and Snapshot Indexing Facility (Search Engine) 13.23 com.nexenta.nms.Folder::reset_acl

(void) reset_acl (string zname)

Reset the folder's ACLs to the system default (POSIX, built-in) permissions.

Parameters

NAME TYPE DESCRIPTION

zname string The name of the folder

No return values

Usage Examples

3. reset_acl('vol1/a')

Reset the 'vol1/a' ACL.

See Also

Method Short Description

com.nexenta.nms.Folder::get_aclinfo Get the ACL related static information: the groups of permissions ... com.nexenta.nms.Folder::get_acl Get folder's ACL for the entities that match the pattern ... com.nexenta.nms.Folder::add_user_acl Add the user's permissions to access a given folder and ... com.nexenta.nms.Folder::add_group_acl Add the group's permissions to access a given folder and ... com.nexenta.nms.Folder::del_user_acl Remove the user's permissions from the folder's ACL com.nexenta.nms.Folder::del_group_acl Remove the group's permissions from the folder's ACL com.nexenta.nms.Folder::set_user_acl Set the user's permissions to access a given folder and ... com.nexenta.nms.Folder::set_group_acl Set the group's permissions to access a given folder and ...

Previous Section: Fault Management Table Of Contents Next Section: Folder and Snapshot Indexing Facility (Search Engine)

13.24 com.nexenta.nms.Folder::set_group_acl

(void) set_group_acl (string zname, string group, dictionary {string => array of (string)} acl)

Set the group's permissions to access a given folder and its sub-folders. This method is effectively a combination of com.nexenta.nms.Folder::del_group_acl and com.nexenta.nms.Folder::add_group_acl, in sequence

Parameters

NAME TYPE DESCRIPTION

zname string The name of the folder

group string The name of the group

acl dictionary {string => Dictionary of one or more entries: { key => (array of permissions) }, where the array of (string)} may have the following values: "allow", "deny"

No return values Usage Examples

3. set_group_acl('vol1/a', 'contractors', { 'allow' => ['read_data'], 'deny' => ['write_data'] } )

Remove all access permissions to folder 'vol1/a' for group 'contractors'; enable the read access and disable the write access to folder 'vol1/a' for group 'contractors'

6. set_group_acl('vol1/a', 'staff', { 'allow' => ['read_data', 'write_data'] } )

Enable the read and write access to folder 'vol1/a' for group 'staff'

See Also

Method Short Description

com.nexenta.nms.Folder::get_aclinfo Get the ACL related static information: the groups of permissions ... com.nexenta.nms.Folder::get_acl Get folder's ACL for the entities that match the pattern ... com.nexenta.nms.Folder::add_user_acl Add the user's permissions to access a given folder and ... com.nexenta.nms.Folder::add_group_acl Add the group's permissions to access a given folder and ... com.nexenta.nms.Folder::del_user_acl Remove the user's permissions from the folder's ACL com.nexenta.nms.Folder::del_group_acl Remove the group's permissions from the folder's ACL com.nexenta.nms.Folder::set_user_acl Set the user's permissions to access a given folder and ... com.nexenta.nms.Folder::reset_acl Reset the folder's ACLs to the system default (POSIX, built-in) ... com.nexenta.nms.Folder::set_user_owner Change the user ownership of a folder com.nexenta.nms.Folder::set_group_owner Change the group ownership for a given folder.

Previous Section: Fault Management Table Of Contents Next Section: Folder and Snapshot Indexing Facility (Search Engine)

13.25 com.nexenta.nms.Folder::set_group_owner

(void) set_group_owner (string zname, string user)

Change the group ownership for a given folder.

Parameters

NAME TYPE DESCRIPTION

zname string The name of the folder user string The name of the group

No return values

Usage Examples

3. set_group_owner('vol1/a', 'engineering')

Grant the group ownership for 'vol1/a' to group 'engineering'.

See Also Method Short Description

com.nexenta.nms.Folder::get_aclinfo Get the ACL related static information: the groups of permissions ... com.nexenta.nms.Folder::get_acl Get folder's ACL for the entities that match the pattern ... com.nexenta.nms.Folder::add_user_acl Add the user's permissions to access a given folder and ... com.nexenta.nms.Folder::add_group_acl Add the group's permissions to access a given folder and ... com.nexenta.nms.Folder::del_user_acl Remove the user's permissions from the folder's ACL com.nexenta.nms.Folder::del_group_acl Remove the group's permissions from the folder's ACL com.nexenta.nms.Folder::set_user_acl Set the user's permissions to access a given folder and ... com.nexenta.nms.Folder::set_group_acl Set the group's permissions to access a given folder and ...

Previous Section: Fault Management Table Of Contents Next Section: Folder and Snapshot Indexing Facility (Search Engine)

13.26 com.nexenta.nms.Folder::set_user_acl

(void) set_user_acl (string zname, string user, dictionary {string => array of (string)} acl)

Set the user's permissions to access a given folder and its sub-folders. This method is a combination of com.nexenta.nms.Folder::del_user_acl and com.nexenta.nms.Folder::add_user_acl, in a sequence

Parameters

NAME TYPE DESCRIPTION

zname string The name of the folder user string The name of the user

acl dictionary {string => Dictionary of one or more entries: { key => (array of permissions) }, where the array of (string)} has the following two values: "allow", "deny"

No return values

Usage Examples

3. set_user_acl('vol1/a', 'mikec', { 'allow' => ['read_data'], 'deny' => ['write_data'] } )

Remove the permissions to access 'vol1/a' for user 'mikec'; enable the read and disable the write access to folder 'vol1/a' for user 'mikec'

6. set_user_acl('vol1/a', 'joel', { 'allow' => ['read_data', 'write_data'] } )

Enable the read and write access to folder 'vol1/a' for user 'joel'

See Also

Method Short Description

com.nexenta.nms.Folder::get_aclinfo Get the ACL related static information: the groups of permissions ...

com.nexenta.nms.Folder::get_acl Get folder's ACL for the entities that match the pattern ... com.nexenta.nms.Folder::add_user_acl Add the user's permissions to access a given folder and ... com.nexenta.nms.Folder::add_group_acl Add the group's permissions to access a given folder and ... com.nexenta.nms.Folder::del_user_acl Remove the user's permissions from the folder's ACL com.nexenta.nms.Folder::del_group_acl Remove the group's permissions from the folder's ACL com.nexenta.nms.Folder::set_group_acl Set the group's permissions to access a given folder and ... com.nexenta.nms.Folder::reset_acl Reset the folder's ACLs to the system default (POSIX, built-in) ... com.nexenta.nms.Folder::set_user_owner Change the user ownership of a folder com.nexenta.nms.Folder::set_group_owner Change the group ownership for a given folder.

Previous Section: Fault Management Table Of Contents Next Section: Folder and Snapshot Indexing Facility (Search Engine)

13.27 com.nexenta.nms.Folder::set_user_owner

(void) set_user_owner (string zname, string user)

Change the user ownership of a folder

Parameters

NAME TYPE DESCRIPTION

zname string The name of the folder user string The name of the user

No return values

Usage Examples

3. set_user_owner('vol1/a', 'admin')

Grant ownership of folder 'vol1/a' to user 'admin'.

See Also

Method Short Description

com.nexenta.nms.Folder::get_aclinfo Get the ACL related static information: the groups of permissions ... com.nexenta.nms.Folder::get_acl Get folder's ACL for the entities that match the pattern ... com.nexenta.nms.Folder::add_user_acl Add the user's permissions to access a given folder and ... com.nexenta.nms.Folder::add_group_acl Add the group's permissions to access a given folder and ... com.nexenta.nms.Folder::del_user_acl Remove the user's permissions from the folder's ACL com.nexenta.nms.Folder::del_group_acl Remove the group's permissions from the folder's ACL com.nexenta.nms.Folder::set_user_acl Set the user's permissions to access a given folder and ... com.nexenta.nms.Folder::set_group_acl Set the group's permissions to access a given folder and ...

Previous Section: Fault Management Table Of Contents Next Section: Folder and Snapshot Indexing Facility (Search Engine)

13.28 com.nexenta.nms.Folder::upgrade

(bool) upgrade (string zname)

Upgrade folder's ZFS version

Parameters NAME TYPE DESCRIPTION

zname string The name of the folder

Return Value

TYPE DESCRIPTION

bool 1 | 0, 1 - success, 0 - failed

Usage Examples

3. upgrade('vol1/a')

Upgrade folder 'vol1/a' to the system ZFS version

See Also

Method Short Description

com.nexenta.nms.Folder::get_version_info Get the folder's ZFS version com.nexenta.nms.Volume::get_version_info Get volume's ZFS version com.nexenta.nms.Volume::upgrade Upgrade volume's ZFS version. WARNING: This operation may affect availability ...

Previous Section: Fault Management Table Of Contents Next Section: Folder and Snapshot Indexing Facility (Search Engine)

13.29 com.nexenta.nms.Folder::upgrade_folders

(int32) upgrade_folders (string zname)

Upgrade folder's ZFS version recursively

Parameters

NAME TYPE DESCRIPTION

zname string Dataset name

Return Value

TYPE DESCRIPTION

int32 The number of folders that were upgraded

Previous Section: Fault Management Table Of Contents Next Section: Folder and Snapshot Indexing Facility (Search Engine)

14 Folder and Snapshot Indexing Facility (Search Engine)

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/Runner/Indexer com.nexenta.nms.Indexer Virtual Runner Virtual Container Virtual Base Object Properties

NAME TYPE ACCESS DESCRIPTION

dbfolder string c Specifies location of the indexing database. By default, the generated indexing data is kept on the system volume ('syspool'), in folder 'syspool/.index/escaped_name'. The escaped_name is based on the name of the folder that is being indexed. For example, by default, for folder 'vol1/a/b', the generated indexing database is stored in the corresponding system folder 'syspool/.index/vol1-a-b'. Note the correspondence between the original folder name 'vol1/a/b' and the data base folder 'syspool/.index/vol1-a-b'. See also: com.nexenta.nms.Indexer::escaped_name. escaped_name string c The property is derived from the name of the folder that is being indexed and searched. In the name of the folder all '/' are replaced with dash '-'. For example, for an indexer that indexes folder 'vol1/a/b', the escaped name is 'vol1-a-b'. flags string c flags = none = 0 | is_daemon = 1 | maintenance_on_max_fail = 2 | clear_old_faults = 4 | notify_on_first_fail = 8 | notify_never = 16 | schedule_never = 32 | schedule_later = 64. This creation time property defines the runner's behavior and is a bitwise combination of the listed enumerated values. For instance, flags = 3 indicates that the runner is a daemon and that when the maximum number of failures is reached, the runner changes the state to 'maintenance'. freq_day string wc The numeric value depends on the freq_type property. For the freq_type = 'weekly', the day of the week freq_day = 0 | 1 | 2 | 3 | 4 | 5 | 6. Days of the week are numbered as follows: 0 - 'Sun', 1 - 'Mon', 2 - 'Tue', 3 - 'Wed', 4 - 'Thu', 5 - 'Fri', 6 - 'Sat'. For the freq_type = 'monthly', the day of the month freq_day = 1 .. 31 freq_hour string wc freq_hour = 0 .. 23. Specifies the hour of a day. For example, freq_hour = 1 specifies 1am. freq_minute string wc freq_minute = 0 .. 59. Specifies the minute in an hour. For example, freq_minute = 30 specifies 30 minutes past a given hour. freq_period string wc freq_period = [1, max]. The maximum value depends on the freq_type. For example, if the freq_type is 'hourly', the freq_period may have any value in the range [1, 23], and if freq_type is 'monthly', the valid range is [1, 11], etc. freq_type string wc freq_type = 'minute' | 'hourly' | 'daily' | 'weekly' | 'monthly'. You set the period of execution in the units of freq_type. For example, if freq_type = 'hourly', you can schedule the runner every 1, .. or 23 hours. See related com.nexenta.nms.Runner::freq_period info string wi General information about the object ipc_name string e Interface class name of the associated interface object name string ri The name of the object period string c Human-readable description of the periodic runner's execution. The description effectively consolidates freq_type, freq_day and the rest frequency related properties into single human-readable string, for example: "every two hours", "every Saturday at 3am", "every 3rd day of each month at 12:45am", etc. state string c state = 'unknown' | 'ready' | 'running' | 'starting' | 'pending' | 'missing'. Under normal circumstances the runner's state is 'ready', or 'running' status string wc status = 'not-registered' | 'disabled' | 'enabled' | 'maintenance'. trace_level string wc trace_level = none = 0 | default = 1 | verbose = 10 | verbose-verbose = 20 | verbose-verbose-verbose. Specifies the levels of detail of the logging information for the runner, from 0 (none) to 20 (the most detailed). type string c type = 'trigger' | 'collector' | 'reporter' | 'indexer'

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Container::destroy ['string', 'string'], [] com.nexenta.nms.Runner::disable ['string'], [] com.nexenta.nms.Runner::enable ['string'], [] com.nexenta.nms.Runner::execute ['string'], [] com.nexenta.nms.Container::get_child_prop ['string', 'string'], ['string'] com.nexenta.nms.Container::get_child_props ['string', 'string'], [['dict', 'string', 'string']] com.nexenta.nms.Runner::get_init_params ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Runner::get_init_tunables ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::get_names ['string'], [['array', 'string']] com.nexenta.nms.Container::get_names_by_prop ['string', 'string', 'string'], [['array', 'string']] com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Runner::get_tunables ['string', 'string', 'bool'], [['dict', 'string', 'string']] com.nexenta.nms.Runner::is_registered ['string'], ['bool'] com.nexenta.nms.Container::object_exists ['string'], ['bool'] com.nexenta.nms.Runner::register ['string', ['dict', 'string', 'string'], ['dict', 'string', 'string']], [] com.nexenta.nms.Runner::reset ['string'], [] com.nexenta.nms.Container::set_child_prop ['string', 'string', 'string'], [] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Runner::set_tunable ['string', 'string', 'string'], [] com.nexenta.nms.Container::trylock ['string', 'int32'], ['bool'] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Container::unlock ['string', 'int32'], [] com.nexenta.nms.Object::unlock_self ['int32'], [] com.nexenta.nms.Runner::unregister ['string'], []

14.1 com.nexenta.nms.Indexer::create

(void) create (string zname)

Create indexer for the specified folder. Once created, the indexer may be registered through inherited com.nexenta.nms.Runner::register method, and then it starts executing at a specified time interval. In general, as an instance of Virtual Runner, an indexer may be registered and unregistered, enabled and disabled (suspended), and so on. Note that when the indexer is registered and starts running, it indexes the specified folder (see the first argument) and recursively its mounted sub-folders. For the list of all "runners" that inherit Virtual Runner, see Object Model

Parameters

NAME TYPE DESCRIPTION

zname string The name of the folder to index. Note that the name is the name of the created indexer. This name is used in all SA-API methods to identify the indexer instance.

No return values

Usage Examples

3. create('vol1/a/b')

Create an indexer to index folder 'vol1/a/b' and its mounted sub-folders (if any). You can use com.nexenta.nms.Indexer::search to search this folder and its snapshots, for example com.nexenta.nms.Indexer::search('vol1/a/b', { 'terms' => ..., 'operation' => ... } ) searches the folder for specified terms/keywords.

See Also

Method Short Description

com.nexenta.nms.Indexer::set_indexinfo

com.nexenta.nms.Runner::register Register the specified runner. The operation validates runner's parameters and ... com.nexenta.nms.Runner::is_registered Check whether the specified runner is registered with the appliance. ... com.nexenta.nms.Indexer::search Search the folder and its snapshot(s). com.nexenta.nms.Runner::enable Enable the specified runner. The runner must be registered (see ... com.nexenta.nms.Runner::execute Execute the specified runner. The operation enables you to run ...

Previous Section: Folder (Filesystem) Table Of Contents Next Section: General Appliance Management

14.2 com.nexenta.nms.Indexer::search

(array of (dictionary {string => string})) search (string zname, dictionary {string => string} request)

Search the folder and its snapshot(s).

Parameters

NAME TYPE DESCRIPTION

zname string The name of the folder request dictionary Dictionary { string => string }, with a single mandatory key: 'terms', and the following {string => optional keys: 'operation', 'paginate_min', 'paginate_max', 'snapshot'. string}

Return Value

TYPE DESCRIPTION

array of (dictionary {string => string}) List of hashes which contains the search results

See Also

Method Short Description

com.nexenta.nms.Indexer::create Create indexer for the specified folder. Once created, the indexer ... com.nexenta.nms.Runner::unregister Unregister the specified runner. The operation reverses the effect of ... com.nexenta.nms.Runner::is_registered Check whether the specified runner is registered with the appliance. ... com.nexenta.nms.Runner::disable Stop the execution of a runner. The runner must be ... com.nexenta.nms.Runner::execute Execute the specified runner. The operation enables you to run ...

Previous Section: Folder (Filesystem) Table Of Contents Next Section: General Appliance Management

15 General Appliance Management

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/Appliance com.nexenta.nms.Appliance Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION

domainname string wi Domain name. For example: mydomain.com. enterprise string ri Determines the type of license. Set to 1, if Enterprise Edition, or 0 for Community Edition. hostname string wi Host name. info string wi General information about the object ipc_name string e Interface class name of the associated interface object is_trial string ri Determines whether trial license is used. Set to 1, if appliance is in Trial mode. kbd_layout string wi Keyboard layout - specific mechanical, visual, or functional arrangement of the keys. Storage Appliance supports a wide variety of keyboard layouts, including all QWERTY based layouts. license_agreement string ri Path to the License Agreement file. model string i Model of the NexentaStor appliance. Specifies a combination of appliance's model ID (unified or virtual) and a type of the software license. For instance: "ZFS Open Storage Appliance (Community Edition)". model_id string i model_id = STOR_UNIFIED | STOR_VIRTUAL. Specifies appliance's model ID. Currently there are two model IDs: "STOR_UNIFIED" - unified, bare-metal installable appliance, and "STOR_VIRTUAL" - pre-installed VMware image (virtual) appliance. name string ri The name of the object nmc_version string i Version of the Nexenta Management Console (NMC). nms_version string i Version of the Nexenta Management Server (NMS). nmv_version string i Version of the Nexenta Management View (NMV). num_cpu_cores string i Number of CPU cores. A total number of online processors in the system. Note that a physical CPU may support multiple cores. os_version string i OS version, the version of the underlying Nexenta (NexentaOS). The versioning scheme includes specification of the OpenSolaris kernel build, for example "b85" for build 85. The string may look as follows: "1.0.1b85". product_family string i A product family. For example, 'NexentaStor'. release_date string i Release date of the appliance's software, in a form of number of seconds since the start of epoch (00:00:00 UTC Jan 1st, 1970). For example: '1210987793' means May 16, 2008 timezone string wi Time Zone, for example: "US/Pacific". uuid string i UUID, or Universally Unique Identifier of the platform. Typically retrieved through smbios or equivalent. x86_instruction_set string i x86 instruction set = '64bit' | '32bit'

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Object::unlock_self ['int32'], []

15.1 com.nexenta.nms.Appliance::add_swap

(void) add_swap (string zname)

Add a zvol as an additional swap area.

Parameters

NAME TYPE DESCRIPTION zname string Zvol pathname, for example: 'vol1/zvol1', where 'vol1' is the name of an underlying volume

No return values

See Also

Method Short Description

com.nexenta.nms.Appliance::list_swap Get the summary information about total swap space usage, existing ... com.nexenta.nms.Appliance::delete_swap Remove zvol swap area, and undo the result of the ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.2 com.nexenta.nms.Appliance::configure_ugen_device

(void) configure_ugen_device (dictionary {string => dictionary {string => string}} device_info)

Configure a generic USB device.

Parameters

NAME TYPE DESCRIPTION

device_info dictionary {string => dictionary {string => Dictionary which is received by string}} 'list_conf_ugen_hid_devs'

No return values

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.3 com.nexenta.nms.Appliance::create_checkpoint

(string) create_checkpoint (string snapname)

Create a checkpoint from a system snapshot.

Parameters

NAME TYPE DESCRIPTION

snapname string Name of the system snapshot

Return Value

TYPE DESCRIPTION

string Checkpoint name

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.4 com.nexenta.nms.Appliance::dbus_auth_iptable_is_set

(bool) dbus_auth_iptable_is_set (string action, string mask_ip) Determine whether the deny/allow access rule is present in the appliance's iptable.

Parameters

NAME TYPE DESCRIPTION

action string action = 'allow' | 'deny' mask_ip string mask_ip = IPv4 mask or IPv4 address

Return Value

TYPE DESCRIPTION

bool Return = 1 | 0, 1 = true, specified allow/deny rule exists, 0 = false, specified allow/deny rule does not exist

See Also

Method Short Description

com.nexenta.nms.Appliance::dbus_auth_iptable_set Deny/Allow access to the NexentaStor appliance from the specified IP ...

com.nexenta.nms.Appliance::dbus_auth_iptable_list Get all iptable access rules. The NexentaStor appliance provides a ...

com.nexenta.nms.Appliance::dbus_auth_iptable_unset Remove Deny/Allow access rule from the appliance's iptable. This method ...

com.nexenta.nms.Appliance::dbus_auth_iptable_list Get all iptable access rules. The NexentaStor appliance provides a ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.5 com.nexenta.nms.Appliance::dbus_auth_iptable_list

(dictionary {string => string}) dbus_auth_iptable_list (void)

Get all iptable access rules. The NexentaStor appliance provides a secure access to other NexentaStor appliances, as well as administrative management client applications on the network. The inter-appliance access is executed either through SSH, or through Storage Appliance API (SA-API), or both. All management client applications, whether developed internally by Nexenta Systems, Inc and/or by 3rd parties, access appliance through SA-API. Access to the appliance requires client's authentication. SA-API supports the following authentication mechanisms: 1) Through the IP address of the client machine; 2) Through the ssh-keygen authentication keys. Nexenta Systems recommends that you use the ssh-keygen based mechanism, which executes through the following API methods: com.nexenta.nms.Appliance::dbus_auth_keys_add, com.nexenta.nms.Appliance::dbus_auth_keys_remove, com.nexenta.nms.Appliance::dbus_auth_keys_list. This mechanism is used by Storage Appliances to communicate between themselves. The latter is required to run storage replication services, to execute the commands in a group mode, to switch between the appliances for the purposes of the centralized management. Once the appliances are ssh-bound, all SA-API interfaces become available, and you can execute them in a secure mode.

No parameters

Return Value

TYPE DESCRIPTION

dictionary {string => string} List of the iptable rules, in a form of hash: rule => allow | deny

See Also

Method Short Description

com.nexenta.nms.Appliance::dbus_auth_iptable_set Deny/Allow access to the NexentaStor appliance from the specified IP ... com.nexenta.nms.Appliance::dbus_auth_iptable_list Get all iptable access rules. The NexentaStor appliance provides a ...

com.nexenta.nms.Appliance::dbus_auth_iptable_unset Remove Deny/Allow access rule from the appliance's iptable. This method ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.6 com.nexenta.nms.Appliance::dbus_auth_iptable_set

(void) dbus_auth_iptable_set (string action, string mask_ip)

Deny/Allow access to the NexentaStor appliance from the specified IP address or subnet. This API method enables you to add a matching rule to the appliance's iptable. The appliance provides secure access to other Storage Appliances, as well as administrative management client applications on the network. The inter-appliance access is executed either through SSH, or through SA-API, or both. All management client applications, whether developed internally by Nexenta Systems, Inc and/or by 3rd parties, access the appliance through SA-API. Access to an appliance requires client authentication. SA-API supports the following authentication mechanisms: 1) Through the IP address of the client machine; 2) Through the ssh- keygen authentication keys

Parameters

NAME TYPE DESCRIPTION

action string action = 'allow' | 'deny' mask_ip string mask_ip = IPv4 mask or IPv4 address

No return values

See Also

Method Short Description

com.nexenta.nms.Appliance::dbus_auth_iptable_unset Remove Deny/Allow access rule from the appliance's iptable. This method ...

com.nexenta.nms.Appliance::dbus_auth_iptable_list Get all iptable access rules. The NexentaStor appliance provides a ...

com.nexenta.nms.Appliance::dbus_auth_iptable_is_set Determine whether the deny/allow access rule is present in the ...

com.nexenta.nms.Appliance::dbus_auth_iptable_list Get all iptable access rules. The NexentaStor appliance provides a ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.7 com.nexenta.nms.Appliance::dbus_auth_iptable_unset

(void) dbus_auth_iptable_unset (string action, string mask_ip)

Remove Deny/Allow access rule from the appliance's iptable. This method reverse the effect of com.nexenta.nms.Appliance::dbus_auth_iptable_set.

Parameters

NAME TYPE DESCRIPTION

action string action = 'allow' | 'deny' mask_ip string mask_ip = IPv4 mask or IPv4 address

No return values

See Also

Method Short Description

com.nexenta.nms.Appliance::dbus_auth_iptable_set Deny/Allow access to the NexentaStor appliance from the specified IP ...

com.nexenta.nms.Appliance::dbus_auth_iptable_list Get all iptable access rules. The NexentaStor appliance provides a ...

com.nexenta.nms.Appliance::dbus_auth_iptable_is_set Determine whether the deny/allow access rule is present in the ...

com.nexenta.nms.Appliance::dbus_auth_iptable_list Get all iptable access rules. The NexentaStor appliance provides a ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.8 com.nexenta.nms.Appliance::dbus_auth_keys_add

(void) dbus_auth_keys_add (string key, string value)

Add a new key to the key authorization table on the client. The NexentaStor Storage Appliance provides a secure access to remote NexentaStor Storage Appliances, as well as administrative management client applications on the network. The inter-appliance access is executed either through SSH, or through SA-API, or both. All management client applications, whether developed internally by Nexenta Systems, Inc and/or by 3rd parties, access an appliance through SA-API. The access to the NexentaStor appliance requires client's authentication. SA-API supports the following authentication mechanisms: 1) Through the IP address of the client machine; 2) Through the ssh-keygen authentication keys. Nexenta Systems recommends that you use the ssh-keygen based mechanism. This mechanism is executed through the following API methods: com.nexenta.nms.Appliance::dbus_auth_keys_add, com.nexenta.nms.Appliance::dbus_auth_keys_remove, com.nexenta.nms.Appliance::dbus_auth_keys_list. The mechanism is used by Storage Appliances to communicate to each other. Communication is required to run the storage replication services, to execute the commands in a group mode, to switch between the appliances. Once the appliances are ssh-bound, all SA-API interfaces become available, and you can execute them in a secure mode.

Parameters

NAME TYPE DESCRIPTION

key string Key identifier value string RSA key value

No return values

See Also

Method Short Description

com.nexenta.nms.Appliance::dbus_auth_iptable_set Deny/Allow access to the NexentaStor appliance from the specified IP ...

com.nexenta.nms.Appliance::dbus_auth_iptable_list Get all iptable access rules. The NexentaStor appliance provides a ...

com.nexenta.nms.Appliance::dbus_auth_iptable_unset Remove Deny/Allow access rule from the appliance's iptable. This method ...

com.nexenta.nms.Appliance::dbus_auth_keys_add Add a new key to the key authorization table on ...

com.nexenta.nms.Appliance::dbus_auth_keys_remove Remove an authentication key. Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.9 com.nexenta.nms.Appliance::dbus_auth_keys_list

(dictionary {string => string}) dbus_auth_keys_list (void)

Get all authorization keys and their IDs. NexentaStor Storage Appliance provides a secure access to remote NexentaStor Storage Appliances, as well as administrative management client applications on the network. The inter-appliance access is executed either through SSH, or through SA-API, or both. All management client applications, whether developed internally by Nexenta Systems, Inc and/or by 3rd parties, access an appliance through SA-API. The access to the NexentaStor appliance requires client's authentication. SA-API supports the following authentication mechanisms: 1) Through the IP address of the client machine; 2) Through the ssh-keygen authentication keys. Nexenta Systems recommends that you use the ssh-keygen based mechanism. This mechanism is executed through the following API methods: com.nexenta.nms.Appliance::dbus_auth_keys_add, com.nexenta.nms.Appliance::dbus_auth_keys_remove, com.nexenta.nms.Appliance::dbus_auth_keys_list. The mechanism is used by Storage Appliances to communicate to each other. Communication is required to run the storage replication services, to execute the commands in a group mode, to switch between appliances for the purposes of centralized management. Once the appliances are ssh-bound, all SA-API interfaces become available, and you can execute them in a secure mode.

No parameters

Return Value

TYPE DESCRIPTION

dictionary {string => string} List of authorization keys, in form of hash: client => authorization key

See Also

Method Short Description

com.nexenta.nms.Appliance::dbus_auth_iptable_set Deny/Allow access to the NexentaStor appliance from the specified IP ...

com.nexenta.nms.Appliance::dbus_auth_iptable_list Get all iptable access rules. The NexentaStor appliance provides a ...

com.nexenta.nms.Appliance::dbus_auth_iptable_unset Remove Deny/Allow access rule from the appliance's iptable. This method ...

com.nexenta.nms.Appliance::dbus_auth_keys_add Add a new key to the key authorization table on ... com.nexenta.nms.Appliance::dbus_auth_keys_remove Remove an authentication key.

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.10 com.nexenta.nms.Appliance::dbus_auth_keys_remove

(void) dbus_auth_keys_remove (string key)

Remove an authentication key.

Parameters

NAME TYPE DESCRIPTION

key string Key identifier

No return values See Also

Method Short Description

com.nexenta.nms.Appliance::dbus_auth_iptable_set Deny/Allow access to the NexentaStor appliance from the specified IP ...

com.nexenta.nms.Appliance::dbus_auth_iptable_list Get all iptable access rules. The NexentaStor appliance provides a ...

com.nexenta.nms.Appliance::dbus_auth_iptable_unset Remove Deny/Allow access rule from the appliance's iptable. This method ...

com.nexenta.nms.Appliance::dbus_auth_keys_add Add a new key to the key authorization table on ... com.nexenta.nms.Appliance::dbus_auth_keys_remove Remove an authentication key.

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.11 com.nexenta.nms.Appliance::delete_swap

(void) delete_swap (string zname)

Remove zvol swap area, and undo the result of the execution of com.nexenta.nms.Appliance::add_swap.

Parameters

NAME TYPE DESCRIPTION

zname string Zvol pathname, for example 'vol1/zvol1', where 'vol1' is the name of an underlying volume

No return values

See Also

Method Short Description

com.nexenta.nms.Appliance::add_swap Add a zvol as an additional swap area. com.nexenta.nms.Appliance::list_swap Get the summary information about total swap space usage, existing ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.12 com.nexenta.nms.Appliance::get_cpu_info

(dictionary {int32 => dictionary {string => string}}) get_cpu_info (void)

Get the detailed per-CPU information.

No parameters

Return Value

TYPE DESCRIPTION

dictionary {int32 => dictionary {string => string}} Information about CPU in a form of: CPU ID => info

Usage Examples

3. get_cpu_info() Get the detailed per-CPU information. A sample result: { '0' => { 'clock_MHz' => '2300', 'crtime' => '15.99439196', 'cpu_type' => 'i386', 'core_id' => '0', 'model' => '15', 'ncore_per_chip' => '1', 'brand' => 'Intel(r) Core(tm)2 Duo CPU T7700 @ 2.40GHz', 'state' => 'on-line', 'clog_id' => '0', 'implementation' => 'x86 (GenuineIntel 6F8 family 6 model 15 step 8 clock 2300 MHz)', 'fpu_type' => 'i387 compatible', 'state_begin' => '1213042644', 'stepping' => '8', 'supported_frequencies_Hz' => '2299926901', 'vendor_id' => 'GenuineIntel', 'pkg_core_id' => '0', 'current_clock_Hz' => '2299926901', 'ncpu_per_chip' => '1', 'chip_id' => '0', 'class' => 'misc', 'snaptime' => '54922.184402079', 'family' => '6' } }

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.13 com.nexenta.nms.Appliance::get_dumpdir

(string) get_dumpdir (void)

Get the location of the

No parameters

Return Value

TYPE DESCRIPTION

string Datapth to dumpdir

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.14 com.nexenta.nms.Appliance::get_etchosts_rec

(array of (string)) get_etchosts_rec (string pattern)

Get the record from the appliance's local host table for a specified hostname, part of a hostname, or FQDN. In modern operating systems host tables are superseded by DNS. However, the host table is still widely used for small deployments isolated from the network. The local host table may also be required by some of the appliance's services, such as replication and HA cluster services. If the local information in your environment changes rarely, and the NexentaStor appliance is not connected to the Internet, you may want to use DNS. The host table is a text file that associates IP addresses with hostnames. The API uses file '/etc/inet/hosts', the symlink '/etc/hosts' is provided for BSD compatibility. Each line in the /etc/host file contains the following information: IP_address hostname IP aliases. This API method retrieves the corresponding record, and presents the result as an array of strings, for example: ('192.168.102.194', 'chost', 'chost.cdomain').

Parameters

NAME TYPE DESCRIPTION

pattern string A pattern that is used to select a record from the host table on the NexentaStor appliance. The pattern is a required parameter.

Return Value

TYPE DESCRIPTION

array of (string) Information from the /etc/hosts in a form of a list

Usage Examples

3. get_etchosts_rec('chost') Get the 'chost' record from the apliance's local host table. A sample result: ('192.168.102.194', 'chost', 'chost.cdomain')

See Also

Method Short Description

com.nexenta.nms.Appliance::set_etchosts_rec Add, replace or delete a record from the appliance's local ... com.nexenta.nms.Network::set_nameservers Set the name servers. Appliance may have up to 3 ... com.nexenta.nms.Network::nameservers Get name servers.

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.15 com.nexenta.nms.Appliance::get_fqdn

(string) get_fqdn (void)

Get a fully qualified domain name (FQDN) of the appliance.

No parameters

Return Value

TYPE DESCRIPTION

string A fully qualified domain name (FQDN) of the specified NexentaStor appliance

Usage Examples

3. get_fqdn()

Get the appliance's FQDN. For example, assuming appliance's local hostname 'myhost' and domain name is 'example.com', the fully qualified domain name is 'myhost.example.com'.

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.16 com.nexenta.nms.Appliance::get_general_diagnostics

(string) get_general_diagnostics (int32 level, bool call_is_local)

Get the general diagnostics, collect all log information in a text file.

Parameters

NAME TYPE DESCRIPTION

level int32 Level of the diagnostic messages

call_is_local bool Not used

Return Value TYPE DESCRIPTION

string Path to text file with general diagnostic information

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.17 com.nexenta.nms.Appliance::get_host_by_addr

(string) get_host_by_addr (string ipaddr)

Resolve a hostname by IP address.

Parameters

NAME TYPE DESCRIPTION

ipaddr string IP address

Return Value

TYPE DESCRIPTION

string Host name

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.18 com.nexenta.nms.Appliance::get_kbd_layouts

(array of (string)) get_kbd_layouts (void)

Get the list of all supported keyboard layouts.

No parameters

Return Value

TYPE DESCRIPTION

array of (string) List of all supported keyboard layouts

Usage Examples

3. get_kbd_layouts()

Get the list of all available keyboard layouts. A sample result: (Albanian Belarusian Belgian Bulgarian Croatian Czech Danish Dutch Finnish French French-Canadian Hungarian German Greek Icelandic Italian Japanese-type6 Japanese Korean Latin-American Lithuanian Latvian Macedonian Malta_UK Malta_US Norwegian Polish Portuguese Russian Serbia-And-Montenegro Slovenian Slovakian Spanish Swedish Swiss- French Swiss-German Taiwan)

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.19 com.nexenta.nms.Appliance::get_license_info_ (dictionary {string => string}) get_license_info_ (void)

Get the license information.

No parameters

Return Value

TYPE DESCRIPTION

dictionary {string => string} Information about the license in a form of hash: key => value.

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.20 com.nexenta.nms.Appliance::get_memstat

(dictionary {string => int32}) get_memstat (void)

Get the RAM utilization information.

No parameters

Return Value

TYPE DESCRIPTION

dictionary {string => int32} RAM utilization information in a form of hash: key => value

Usage Examples

3. get_memstat()

Get the RAM information. A sample result: { 'ram_total' => 511, 'ram_unusable' => 8, 'ram_kernel' => 326, 'ram_locked' => 0, 'ram_free' => 51, 'ram_paging' => 0, 'ram_used' => 125 }

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.21 com.nexenta.nms.Appliance::get_saved_configurations

(array of (string)) get_saved_configurations (void)

Get the list of all saved configurations.

No parameters

Return Value

TYPE DESCRIPTION

array of (string) List of all saved configurations.

Usage Examples 3. get_saved_configurations()

Get the list of all saved configuration filenames and descriptions. A sample result: ( '1252099979.tar.gz', 'Fri Sep 4 14:32:59 2009', '', '1252100931.tar.gz', 'Fri Sep 4 14:48:51 2009', 'auto-tier destroyed', '1252101756.tar.gz', 'Fri Sep 4 15:02:36 2009', 'hostname changed'). Please note that the result in this example contains 3 triples, each describing a particular saved configuration.

See Also

Method Short Description

com.nexenta.nms.Appliance::save_configuration Save appliance's configuration at a pre-defined location. The location in ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.22 com.nexenta.nms.Appliance::get_saved_user_configurations

(array of (string)) get_saved_user_configurations (void)

Returns the list of saved appliance configurations. This method is similar to get_saved_configuration. The difference is that the configurations are saved by NMC command and not automatically by NexentaStor. The changes are stored in ".user_config".

No parameters

Return Value

TYPE DESCRIPTION

array of (string) List of saved configurations attributes.

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.23 com.nexenta.nms.Appliance::get_serial_names

(dictionary {string => string}) get_serial_names (void)

Get the list of all available serial ports.

No parameters

Return Value

TYPE DESCRIPTION

dictionary {string => string} List of serial ports that are available on the system

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.24 com.nexenta.nms.Appliance::get_subtimezones

(array of (string)) get_subtimezones (string continent, string country) Get the list of time zones for the specified country and continent.

Parameters

NAME TYPE DESCRIPTION

continent string Name of the continent (see com.nexenta.nms.Appliance::get_timezone_continents) country string Name of the country

Return Value

TYPE DESCRIPTION

array of (string) List of available time zones for the specified country and continent

Usage Examples

3. get_subtimezones("America", "Mexico")

Get the list of time zones for Mexico.

See Also

Method Short Description

com.nexenta.nms.Appliance::get_timezone_continent Get the time zone code for the specified time zone. ... com.nexenta.nms.Appliance::get_timezones Get the list of all available time zones for the ... com.nexenta.nms.Appliance::get_subtimezones Get the list of time zones for the specified country ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.25 com.nexenta.nms.Appliance::get_timezone_continent

(string) get_timezone_continent (string timezone)

Get the time zone code for the specified time zone.

Parameters

NAME TYPE DESCRIPTION

timezone string Time zone

Return Value

TYPE DESCRIPTION

string Current time zone

Usage Examples

3. get_timezone_continent("Europe/Prague")

Get the time zone => continent. A sample result: "Europe". See Also

Method Short Description

com.nexenta.nms.Appliance::get_timezone_continent Get the time zone code for the specified time zone. ... com.nexenta.nms.Appliance::get_timezones Get the list of all available time zones for the ... com.nexenta.nms.Appliance::get_subtimezones Get the list of time zones for the specified country ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.26 com.nexenta.nms.Appliance::get_timezone_continents

(array of (string)) get_timezone_continents (void)

Get the list of continents for the available time zones.

No parameters

Return Value

TYPE DESCRIPTION

array of (string) List of available continents

Usage Examples

3. get_timezone_continents()

Get the names of all continents for all time zones. A sample result: (Africa America Antarctica Arctic Asia Atlantic Australia Europe Pacific Indian)

See Also

Method Short Description

com.nexenta.nms.Appliance::get_timezone_country_code Get the time zone code for the specified country. ... com.nexenta.nms.Appliance::get_timezone_continent Get the time zone code for the specified time zone. ... com.nexenta.nms.Appliance::get_timezones Get the list of all available time zones for the ... com.nexenta.nms.Appliance::get_subtimezones Get the list of time zones for the specified country ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.27 com.nexenta.nms.Appliance::get_timezone_country_code

(string) get_timezone_country_code (string country)

Get the time zone code for the specified country.

Parameters

NAME TYPE DESCRIPTION

country string Country name Return Value

TYPE DESCRIPTION

string Timezone code

Usage Examples

3. get_timezone_country_code("Brazil")

Get the time zone code for Brazil. A sample result: "BR".

See Also

Method Short Description

com.nexenta.nms.Appliance::get_timezone_continents Get the list of continents for the available time zones. ... com.nexenta.nms.Appliance::get_timezone_continent Get the time zone code for the specified time zone. ... com.nexenta.nms.Appliance::get_timezones Get the list of all available time zones for the ... com.nexenta.nms.Appliance::get_subtimezones Get the list of time zones for the specified country ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.28 com.nexenta.nms.Appliance::get_timezones

(array of (string)) get_timezones (string continent)

Get the list of all available time zones for the specified continent.

Parameters

NAME TYPE DESCRIPTION

continent string Name of the continent (see com.nexenta.nms.Appliance::get_timezone_continents)

Return Value

TYPE DESCRIPTION

array of (string) List of time zones

Usage Examples

3. get_timezones("Australia")

Get all time zones for Australia. A sample result: "Australia"

See Also

Method Short Description

com.nexenta.nms.Appliance::get_timezone_continent Get the time zone code for the specified time zone. ...

com.nexenta.nms.Appliance::get_timezones Get the list of all available time zones for the ... com.nexenta.nms.Appliance::get_subtimezones Get the list of time zones for the specified country ... Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.29 com.nexenta.nms.Appliance::get_upgrade_info

(array of (dictionary {string => string})) get_upgrade_info (void)

Get the information about upgrades on this NexentaStor appliance

No parameters

Return Value

TYPE DESCRIPTION

array of (dictionary {string => string}) Hash: {version =>..., date =>..., desc =>..., current =>..., stability =>...}

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.30 com.nexenta.nms.Appliance::get_uptime

(dictionary {string => double}) get_uptime (void)

Get the appliance's uptime, including the following information: the current time, how long the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes. The time is measured in seconds from the start of epoch (00:00:00 UTC Jan 1st, 1970).

No parameters

Return Value

TYPE DESCRIPTION

dictionary Appliance uptime information in a form of hash: key => value. The keys are: 'boot' - appliance boot time {string 'time' - current time 'uptime' - appliance working time starting from boot time 'load1' - load average for 1 => minute 'load5' - load average for 5 minutes 'load15' - load average for 15 minutes double}

Usage Examples

3. get_uptime()

Get the appliance's uptime information. A sample result: { 'boot' => '86400', 'time' => '1213163656', 'load1' => '0.03', 'load5' => '0.03', 'load15' => '0.02' }.

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.31 com.nexenta.nms.Appliance::group_configuration_sync_set

(void) group_configuration_sync_set (bool enable)

Synchronize group configuration by enabling or disabling the synchronization.

Parameters NAME TYPE DESCRIPTION

enable bool 1: enable, '': disable

No return values

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.32 com.nexenta.nms.Appliance::is_rebooting

(bool) is_rebooting (void)

Verify that NexentaStor appliance is rebooting

No parameters

Return Value

TYPE DESCRIPTION

bool return= 1 | 0, 1 - is currently rebooting, 0 - not rebooting.

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.33 com.nexenta.nms.Appliance::list_appliances

(dictionary {string => string}) list_appliances (void)

Get the list of all SSH-bound as well as dynamically discovered on a local subnet NexentaStor appliances that are currently online. The returned dictionary includes the appliances that are considered online by the appliance that executes the operation.

No parameters

Return Value

TYPE DESCRIPTION

dictionary {string => string} List of appliances in a form of hash: host => IP

See Also

Method Short Description

com.nexenta.nms.Appliance::ssh_bind Bind a given (user, appliance) to the specified remote host ... com.nexenta.nms.Appliance::ssh_unbind SSH-unbind a given (user, appliance) from the specified remote host. ...

com.nexenta.nms.Appliance::ssh_list_bindings Get all existing SSH bound hosts

com.nexenta.nms.Appliance::ssh_check_binding Verify whether the specified appliance is SSH-bound to the specified ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management 15.34 com.nexenta.nms.Appliance::list_conf_ugen_hid_devs

(array of (dictionary {string => dictionary {string => string}})) list_conf_ugen_hid_devs (void)

Get the configuration of all USB devices.

No parameters

Return Value

TYPE DESCRIPTION

array of (dictionary {string => dictionary {string => string}}) List of configured USB devices

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.35 com.nexenta.nms.Appliance::list_swap

(array of (string)) list_swap (bool include_hdr_total)

Get the summary information about total swap space usage, existing swap areas, and the availability.

Parameters

NAME TYPE DESCRIPTION

include_hdr_total bool include_hdr_total = 0 | 1, 1 - true, 0 false. Specifies whether to include detailed per swap area information

Return Value

TYPE DESCRIPTION

array List of the statuses of all swap areas. The output has the following columns: 'path' - pathname to swap area; of 'dev' - the major/minor device number in decimal, if it is a block special device; zeroes otherwise; 'swaplo' - the (string) swaplow value for the area in 512-byte blocks; 'blocks' - the swaplen value for the area in 512-byte blocks; 'free' - the number of 512-byte blocks in this area that are not currently allocated. For more information, see 'man swap'

See Also

Method Short Description

com.nexenta.nms.Appliance::add_swap Add a zvol as an additional swap area. com.nexenta.nms.Appliance::delete_swap Remove zvol swap area, and undo the result of the ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.36 com.nexenta.nms.Appliance::list_unconf_hid_devs

(array of (dictionary {string => dictionary {string => string}})) list_unconf_hid_devs (void)

Get the list of unconfigured USB devices.

No parameters

Return Value TYPE DESCRIPTION

array of (dictionary {string => dictionary {string => string}}) List of unconfigured USB devices

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.37 com.nexenta.nms.Appliance::ns_getent

(array of (string)) ns_getent (string entity, string type, string filter)

Get the list of local and LDAP users, groups, and netgroups.

Parameters

NAME TYPE DESCRIPTION

entity string entity = 'group' | 'passwd' | 'netgroup', where 'group' - retrieve group names, 'passwd' - retrieve user names, 'netgroup' - retrieve netgroups. Note that users and groups can be both local and LDAP defined, while netgroups (groups of computers) can only be added through LDAP directory service.

type string type = 'local' | 'ldap' | ''. Use 'local' to retrieve locally defined users or groups, 'ldap' - LDAP defined users or groups, empty string '' - a union of both local and LDAP entities, that is, entities listed in the associated LDAP directory service.

filter string Filter returned records based on the pattern. For example, for entity 'user' filter = 'jo' matches the following usernames: 'john', 'joe', 'joseph', and so on. An empty filter '' matches all records.

Return Value

TYPE DESCRIPTION

array of (string) List local and LDAP-based users, groups, and netgroups from the system files such as /etc/pswd

Usage Examples

3. ns_getent('group', '', '')

Get the list of all groups including the listed in the LDAP directory

6. ns_getent('group', 'local', '')

Get the list of local groups

9. ns_getent('passwd', 'local', '')

Get the list of all local users

12. ns_getent('passwd', 'ldap', 'jo')

Get the list of LDAP users with usernames which start with 'jo'

See Also

Method Short Description

com.nexenta.nms.Appliance::ns_netgroup Get the list of hosts (computers) included in a netgroup ... com.nexenta.nms.Appliance::ns_user_get Get the properties for a specified local or LDAP user. ... com.nexenta.nms.Appliance::ns_user_exists Verify, if a user exists com.nexenta.nms.Appliance::ns_user_set Modify an existing local user or add a new local ... com.nexenta.nms.Appliance::ns_user_del Delete a specified user com.nexenta.nms.Appliance::ns_group_set Modify the existing local group or create a new group. ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.38 com.nexenta.nms.Appliance::ns_group_del

(void) ns_group_del (string group)

Delete a group

Parameters

NAME TYPE DESCRIPTION

group string Name of the group

No return values

Usage Examples

3. ns_user_del('contractors')

Delete group 'contractors'

See Also

Method Short Description

com.nexenta.nms.Appliance::ns_group_exists Verify that a group exists. com.nexenta.nms.Appliance::ns_getent Get the list of local and LDAP users, groups, and ... com.nexenta.nms.Appliance::ns_netgroup Get the list of hosts (computers) included in a netgroup ... com.nexenta.nms.Appliance::ns_user_get Get the properties for a specified local or LDAP user. ... com.nexenta.nms.Appliance::ns_user_exists Verify, if a user exists com.nexenta.nms.Appliance::ns_user_del Delete a specified user com.nexenta.nms.Appliance::ns_user_set Modify an existing local user or add a new local ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.39 com.nexenta.nms.Appliance::ns_group_exists

(string) ns_group_exists (string group)

Verify that a group exists.

Parameters

NAME TYPE DESCRIPTION group string Name of the group

Return Value

TYPE DESCRIPTION

string The group type

Usage Examples

3. ns_group_exists('staff')

Verify that group 'staff' exists

See Also

Method Short Description

com.nexenta.nms.Appliance::ns_user_exists Verify, if a user exists com.nexenta.nms.Appliance::ns_getent Get the list of local and LDAP users, groups, and ... com.nexenta.nms.Appliance::ns_netgroup Get the list of hosts (computers) included in a netgroup ... com.nexenta.nms.Appliance::ns_user_get Get the properties for a specified local or LDAP user. ... com.nexenta.nms.Appliance::ns_user_set Modify an existing local user or add a new local ... com.nexenta.nms.Appliance::ns_user_del Delete a specified user com.nexenta.nms.Appliance::ns_group_set Modify the existing local group or create a new group. ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.40 com.nexenta.nms.Appliance::ns_group_get

(dictionary {string => string}) ns_group_get (string group)

Get the group properties, such as group ID, group members, group type, 'local' or 'ldap'. LDAP groups may have additional properties.

Parameters

NAME TYPE DESCRIPTION

group string Name of group

Return Value

TYPE DESCRIPTION

dictionary {string => string} List of the group properties in a form of hash: key => value

Usage Examples

3. ns_group_get('staff')

Get the properties and members of group 'staff'. A sample result: { 'type' => 'local', 'gidNumber' => 3001, 'memberUid' => 'john mike alice' }

See Also Method Short Description

com.nexenta.nms.Appliance::ns_group_exists Verify that a group exists. com.nexenta.nms.Appliance::ns_getent Get the list of local and LDAP users, groups, and ... com.nexenta.nms.Appliance::ns_netgroup Get the list of hosts (computers) included in a netgroup ... com.nexenta.nms.Appliance::ns_user_get Get the properties for a specified local or LDAP user. ... com.nexenta.nms.Appliance::ns_user_exists Verify, if a user exists com.nexenta.nms.Appliance::ns_user_set Modify an existing local user or add a new local ... com.nexenta.nms.Appliance::ns_group_set Modify the existing local group or create a new group. ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.41 com.nexenta.nms.Appliance::ns_group_idmap_get

(string) ns_group_idmap_get (string group)

Get the identity mapping for a Unix group.

Parameters

NAME TYPE DESCRIPTION

group string Name of the group

Return Value

TYPE DESCRIPTION

string Identity mapping for a UNIX group

Usage Examples

3. ns_group_idmap_get('staff')

Get idmap for group 'staff'. A sample result: 'wingroup:[email protected] -> unixgroup:staff'

See Also

Method Short Description

com.nexenta.nms.Appliance::ns_group_exists Verify that a group exists. com.nexenta.nms.Appliance::ns_getent Get the list of local and LDAP users, groups, and ... com.nexenta.nms.Appliance::ns_netgroup Get the list of hosts (computers) included in a netgroup ... com.nexenta.nms.Appliance::ns_user_get Get the properties for a specified local or LDAP user. ... com.nexenta.nms.Appliance::ns_user_set Modify an existing local user or add a new local ... com.nexenta.nms.Appliance::ns_user_del Delete a specified user com.nexenta.nms.Appliance::ns_group_set Modify the existing local group or create a new group. ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.42 com.nexenta.nms.Appliance::ns_group_set (void) ns_group_set (string group, string type, dictionary {string => string} props)

Modify the existing local group or create a new group. The new/existing group properties include: 'gidNumber' (group ID) and 'memberUid' that specifies a space delimited list of the group members. This method supports the local (type = 'local') groups.

Parameters

NAME TYPE DESCRIPTION

group string Name of the group

type string Type of the group. Must be 'local'. props dictionary {string => string} Dictionary { string => string } that contains the group properties.

No return values

Usage Examples

3. ns_group_set('staff', 'local', { 'memberUid' => "john mike alice" })

Modify the local group 'staff'

See Also

Method Short Description

com.nexenta.nms.Appliance::ns_group_exists Verify that a group exists. com.nexenta.nms.Appliance::ns_getent Get the list of local and LDAP users, groups, and ... com.nexenta.nms.Appliance::ns_netgroup Get the list of hosts (computers) included in a netgroup ... com.nexenta.nms.Appliance::ns_user_get Get the properties for a specified local or LDAP user. ... com.nexenta.nms.Appliance::ns_user_exists Verify, if a user exists com.nexenta.nms.Appliance::ns_user_del Delete a specified user com.nexenta.nms.Appliance::ns_user_set Modify an existing local user or add a new local ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.43 com.nexenta.nms.Appliance::ns_netgroup

(array of (string)) ns_netgroup (string netgroup)

Get the list of hosts (computers) included in a netgroup

Parameters

NAME TYPE DESCRIPTION

netgroup string The name of the netgroup

Return Value

TYPE DESCRIPTION

array of (string) List of hosts included in a specified netgroup

Usage Examples 3. ns_netgroup('netgroup-engineering')

List all hosts from netgroup 'netgroup-engineering'. A sample result: ('host1.mycorp.com', 'host2.mycorp.com', ...)

See Also

Method Short Description

com.nexenta.nms.Appliance::ns_getent Get the list of local and LDAP users, groups, and ... com.nexenta.nms.Appliance::ns_user_get Get the properties for a specified local or LDAP user. ... com.nexenta.nms.Appliance::ns_user_exists Verify, if a user exists com.nexenta.nms.Appliance::ns_user_set Modify an existing local user or add a new local ... com.nexenta.nms.Appliance::ns_user_del Delete a specified user com.nexenta.nms.Appliance::ns_group_set Modify the existing local group or create a new group. ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.44 com.nexenta.nms.Appliance::ns_user_del

(void) ns_user_del (string user, bool del_home_folder)

Delete a specified user

Parameters

NAME TYPE DESCRIPTION

user string The name of the user del_home_folder bool del_home_folder = 0 | 1, 1 - true, 0 - false. Determines whether to delete a user's home folder.

No return values

Usage Examples

3. ns_user_del('john', 1)

Delete user 'john' and destroy the associated home folder

See Also

Method Short Description

com.nexenta.nms.Appliance::ns_getent Get the list of local and LDAP users, groups, and ... com.nexenta.nms.Appliance::ns_netgroup Get the list of hosts (computers) included in a netgroup ... com.nexenta.nms.Appliance::ns_user_get Get the properties for a specified local or LDAP user. ... com.nexenta.nms.Appliance::ns_user_exists Verify, if a user exists com.nexenta.nms.Appliance::ns_user_set Modify an existing local user or add a new local ...

com.nexenta.nms.Appliance::ns_group_set Modify the existing local group or create a new group. ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management 15.45 com.nexenta.nms.Appliance::ns_user_exists

(string) ns_user_exists (string user)

Verify, if a user exists

Parameters

NAME TYPE DESCRIPTION

user string The name of the user

Return Value

TYPE DESCRIPTION

string Type of the user, LDAP or local

Usage Examples

3. ns_user_exists('john')

Verify if user 'john' exists

See Also

Method Short Description

com.nexenta.nms.Appliance::ns_group_exists Verify that a group exists. com.nexenta.nms.Appliance::ns_getent Get the list of local and LDAP users, groups, and ... com.nexenta.nms.Appliance::ns_netgroup Get the list of hosts (computers) included in a netgroup ... com.nexenta.nms.Appliance::ns_user_get Get the properties for a specified local or LDAP user. ... com.nexenta.nms.Appliance::ns_user_set Modify an existing local user or add a new local ... com.nexenta.nms.Appliance::ns_user_del Delete a specified user com.nexenta.nms.Appliance::ns_group_set Modify the existing local group or create a new group. ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.46 com.nexenta.nms.Appliance::ns_user_get

(dictionary {string => string}) ns_user_get (string user)

Get the properties for a specified local or LDAP user. Parameters: 'user' - user name 'type' - type of a user, LDAP or local 'gidNumber' - group ID 'group' - group name 'uidNUmber' - user ID number 'homeFolder' - home folder for a specified user, if any 'description' - user description, if any

Parameters

NAME TYPE DESCRIPTION

user string The name of the user

Return Value TYPE DESCRIPTION

dictionary {string => string} List of properties for a specified user

Usage Examples

3. ns_user_get('smb')

Get the list of properties for user 'smb'; A sample result: { 'user' => 'smb', 'type' => 'local', 'gidNumber' => 1, 'group' => 'other', 'uidNumber' => 1001, 'homeFolder' => '', 'description' => '' }

See Also

Method Short Description

com.nexenta.nms.Appliance::ns_getent Get the list of local and LDAP users, groups, and ... com.nexenta.nms.Appliance::ns_netgroup Get the list of hosts (computers) included in a netgroup ... com.nexenta.nms.Appliance::ns_user_exists Verify, if a user exists com.nexenta.nms.Appliance::ns_user_set Modify an existing local user or add a new local ... com.nexenta.nms.Appliance::ns_user_del Delete a specified user com.nexenta.nms.Appliance::ns_group_set Modify the existing local group or create a new group. ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.47 com.nexenta.nms.Appliance::ns_user_idmap_get

(string) ns_user_idmap_get (string user)

Get an identity mapping for a Unix user.

Parameters

NAME TYPE DESCRIPTION

user string The name of the user

Return Value

TYPE DESCRIPTION

string Identity mapping for a specified user

Usage Examples

3. ns_user_idmap_get('john')

Get idmap for a user 'john'. A sample result: 'winuser:[email protected] -> unixuser:john'

See Also

Method Short Description

com.nexenta.nms.Appliance::ns_group_exists Verify that a group exists.

com.nexenta.nms.Appliance::ns_getent Get the list of local and LDAP users, groups, and ... com.nexenta.nms.Appliance::ns_netgroup Get the list of hosts (computers) included in a netgroup ... com.nexenta.nms.Appliance::ns_user_get Get the properties for a specified local or LDAP user. ... com.nexenta.nms.Appliance::ns_user_set Modify an existing local user or add a new local ... com.nexenta.nms.Appliance::ns_user_del Delete a specified user com.nexenta.nms.Appliance::ns_group_set Modify the existing local group or create a new group. ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.48 com.nexenta.nms.Appliance::ns_user_set

(void) ns_user_set (string user, string type, dictionary {string => string} props)

Modify an existing local user or add a new local user, if the user does not exist. The user properties include: 'uidNumber' (the user's ID), 'gidNumber' (the user's default group ID), 'homeFolder', 'description'. The current implementation works only for locally defined (type = 'local') users

Parameters

NAME TYPE DESCRIPTION

user string The name of the user type string The type of the user. Must be 'local'.

props dictionary {string Dictionary { string => string } that contains new properties to update existing user or => string} assign to a new user, if it does not exist.

No return values

Usage Examples

3. ns_user_set('new_user_x', 'local', { 'uidNumber' => 1020, 'gidNumber' => 75, 'description' => "new description" })

If 'new_user_x' does not exist, the operation creates a new local user definition with the default group ID = 75 and so on.

See Also

Method Short Description

com.nexenta.nms.Appliance::ns_getent Get the list of local and LDAP users, groups, and ... com.nexenta.nms.Appliance::ns_netgroup Get the list of hosts (computers) included in a netgroup ... com.nexenta.nms.Appliance::ns_user_get Get the properties for a specified local or LDAP user. ... com.nexenta.nms.Appliance::ns_user_exists Verify, if a user exists com.nexenta.nms.Appliance::ns_user_del Delete a specified user com.nexenta.nms.Appliance::ns_group_set Modify the existing local group or create a new group. ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.49 com.nexenta.nms.Appliance::ping_tcp

(bool) ping_tcp (string host, int32 timeout, int32 port)

Ping host using TCP Parameters

NAME TYPE DESCRIPTION

host string Hostname timeout int32 Timeout in milliseconds port int32 Optional parameter. If the port number is not defined, then SSH port is used by default

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - alive, 0 - unreacheable

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.50 com.nexenta.nms.Appliance::poweroff

(void) poweroff (bool force, bool reconfigure, string extra_options)

Get the descriptions of the saved appliance's configurations

Parameters

NAME TYPE DESCRIPTION

force bool force = 0 | 1. If true (1), forces the poweroff operation even if one or more of the appliance services run. The forced operation may interrupt the service(s), with partially completed results that depend on the particular service and other conditions. Use the force option with caution. In NMC, run 'show appliance nms locks' to view the locks.

reconfigure bool reconfigure = 0 | 1, 1 - true, 0 - false. If this option is set to true, NexentaStor cleanups the stale device links and re-enumerates the devices, such as disks, network cards, storage controllers, at poweroff time. Reconfigure may be required, when you move the devices from one place to another, add new, or replace the old devices.

extra_options string Extra options. A string that is passed as is to the system reboot function. For example, "-d" forces a system crash dump. See poweroff(1m) for details.

No return values

See Also

Method Short Description

com.nexenta.nms.Appliance::save_configuration Save appliance's configuration at a pre-defined location. The location in ...

com.nexenta.nms.Appliance::restore_configuration Restore an appliance's configuration from the most recent copy stored ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.51 com.nexenta.nms.Appliance::reboot

(void) reboot (bool force, bool reconfigure, string extra_options)

Reboot the appliance

Parameters NAME TYPE DESCRIPTION

force bool force = 0 | 1. If true (non-zero), force the reboot operation even if one or more NexentaStor services run. The operation interrupts the service(s) with partially completed results that depend on the service and other conditions. Use force option with caution. In NMC, use 'show appliance nms locks' command to view the locks.

reconfigure bool reconfigure = 0 | 1, 1 - true, 0 - false. If this option is set to true, NexentaStor cleanups the stale device links and re-enumerates the devices, such as disks, network cards, storage controllers, at poweroff time. Reconfigure may be required, when you move the devices from one place to another, add new, or replace the old devices.

extra_options string Extra options. A string that is passed as is to the system reboot function. For example, "-d" forces a system crash dump before rebooting. Use the delimiter -- (two hyphens) to separate reboot options from the options to be passed to boot(1m). For instance, "-d -- -v" passes "-d" to reboot (and causes system crash dump), and passes "-v" to boot. See reboot(1m) for details.

No return values

See Also

Method Short Description

com.nexenta.nms.Appliance::poweroff Get the descriptions of the saved appliance's configurations

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.52 com.nexenta.nms.Appliance::reset_ugen_configuration

(void) reset_ugen_configuration (void)

Reset the current USB devices configuration

No parameters

No return values

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.53 com.nexenta.nms.Appliance::restore_configuration

(array of (string)) restore_configuration (string component, bool overwrite_newer, bool check_only, string vol_name)

Restore an appliance's configuration from the most recent copy stored at a pre-defined location. The location of the saved configuration that is in use is defined by NMS property 'saved_configroot'. The operation restores service definitions for the appliance's storage services to the point in time when they were saved using com.nexenta.nms.Appliance::save_configuration

Parameters

NAME TYPE DESCRIPTION

component string component = basic | mailer | nms | nmc | auto-snap | auto-scrub | auto-sync | auto-tier. Use 'basic' to restore the basic appliance settings: hostname, domainname, etc. Use 'mailer' to restore Mailer setting: SMTP server, username, password, etc. Use 'nms' to restore NMS configuration options, 'nmc' - to restore NMC configuration options. You can use the other components to restore service parameters for the corresponsing automated (auto-) service.

overwrite_newer bool overwrite_newer = 0 | 1, 1 - override the existing saved configuration with a newer configuration, 0 - do not override the old configuration.

check_only bool check_only = 0 | 1, 1 - dry run the operation without actually making changes, 0 - change the configuration vol_name string Optional argument which defines the volume name

Return Value

TYPE DESCRIPTION

array of (string) System messages

Usage Examples

3. restore_configuration('auto-sync', 0, 0)

Restore the latest saved auto-sync configuration; do not override existing newer auto-sync service(s), if any

See Also

Method Short Description

com.nexenta.nms.Appliance::get_saved_configurations Get the list of all saved configurations. com.nexenta.nms.Appliance::save_configuration Save appliance's configuration at a pre-defined location. The location in ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.54 com.nexenta.nms.Appliance::restore_volume_services

(bool) restore_volume_services (string volume_name)

Restore the volume services

Parameters

NAME TYPE DESCRIPTION

volume_name string The name of the volume to restore

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - success, 0 - failed

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.55 com.nexenta.nms.Appliance::save_configuration

(string) save_configuration (string description)

Note that com.nexenta.nms.Appliance::restore_configurationSave appliance's configuration at a pre-defined location. The location in use is defined by NMS property 'saved_configroot'. Saved configuration includes service definitions for the appliance's storage services. Saved configuration includes the following components: basic | mailer | nms | nmc | auto-snap | auto-scrub | auto-sync | auto-tier, where 'basic' configuration includes appliance basic settings: hostname, domainname, etc., 'mailer' - SMTP server, username, password, etc., 'nms' - NMS configuration options, 'nmc' - NMC configuration options. Other component types are used for definitions of the corresponsing automated (auto-) services. method can be used to later restore selected components of a saved configuration.

Parameters

NAME TYPE DESCRIPTION

description string Information about configuration. Spaces are permitted. You may add any description related to the operation.

Return Value

TYPE DESCRIPTION

string Timestamp, that defines when the configuration was saved

See Also

Method Short Description

com.nexenta.nms.Appliance::get_saved_configurations Get the list of all saved configurations. com.nexenta.nms.Appliance::restore_configuration Restore an appliance's configuration from the most recent copy stored ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.56 com.nexenta.nms.Appliance::save_user_configuration

(string) save_user_configuration (string description, string not set)

Note that com.nexenta.nms.Appliance::restore_configurationSave appliance's configuration at a pre-defined location. The location in use is defined by NMS property 'saved_configroot'. The saved configuration includes service definitions for the appliance's storage services. The saved configuration includes the following components: basic | mailer | nms | nmc | auto-snap | auto-scrub | auto-sync | auto-tier, where 'basic' configuration includes appliance basic settings: hostname, domainname, etc., 'mailer' - SMTP server, username, password, etc., 'nms' - NMS configuration options, 'nmc' - NMC configuration options. Other component types are used for definitions of corresponsing automated (auto-) services. method can be used to later restore selected components of saved configuration. This method is similar to save_configuration. However, the information that you save is stored on a per user basis in the ".user_config" file.

Parameters

NAME TYPE DESCRIPTION

description string Information about configuration. Spaces are permitted. You may add any description related to the operation.

not set string not set

Return Value

TYPE DESCRIPTION

string Timestamp, that defines when the configuration was saved

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.57 com.nexenta.nms.Appliance::set_dumpdir

(void) set_dumpdir (string not set) Set a datapath for the directory that stores system crash dumps

Parameters

NAME TYPE DESCRIPTION

not set string Datapath to the crash dump directory

No return values

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.58 com.nexenta.nms.Appliance::set_etchosts_rec

(void) set_etchosts_rec (string ipaddr, array of (string) hostnames)

Add, replace or delete a record from the appliance's local host table. The first search of the local host table is perfomed by ipaddr (the first argument). If the other arguments are empty, the corresponding record is removed. If the search finds the record, the record is modified, or added. In modern operating systems host tables are superseded by DNS. However, the host table is still widely used for small deployments isolated from the network. The local host table may also be required by some of the appliance's services, such as replication and HA cluster services. If the local information in your environment changes rarely, and the NexentaStor appliance is not connected to the Internet, you may want to use DNS. The host table is a text file that associates IP addresses with hostnames. The API uses file '/etc/inet/hosts', the symlink '/etc/hosts' is provided for BSD compatibility. Each line in the /etc/host file contains the following information: IP_address hostname [aliases...].

Parameters

NAME TYPE DESCRIPTION

ipaddr string IP address of the host to be located in/to be added to the local appliance's host table. hostnames array of (string) Array of hostname(s), or FQDN(s), to associate with a given IP address.

No return values

Usage Examples

3. set_etchosts_rec('192.168.102.194', ('chost', 'chost.cdomain'))

Add a record to resolve hostname for the IP address to the apliance's local host table, or - if the record already exists - replace it with new information.

See Also

Method Short Description

com.nexenta.nms.Appliance::get_etchosts_rec Get the record from the appliance's local host table for ... com.nexenta.nms.Network::set_nameservers Set the name servers. Appliance may have up to 3 ... com.nexenta.nms.Network::nameservers Get name servers.

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.59 com.nexenta.nms.Appliance::set_license_key (bool) set_license_key (string new_license_key)

Update license key

Parameters

NAME TYPE DESCRIPTION

new_license_key string New license key

Return Value

TYPE DESCRIPTION

bool 0 - success, if operatin fails, returns an exception

Usage Examples

3. set_license_key('EVAL-E501340681-5D2UD6-BIAHJK') update appliance's license key with a new (license key) value

See Also

Method Short Description

com.nexenta.nms.Appliance::get_license_info

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.60 com.nexenta.nms.Appliance::ssh_bind

(int32) ssh_bind (string user, string hostport, string password)

Bind a given (user, appliance) to the specified remote host using SSH. Two appliances are considered SSH- bound, if ssh_bind operation is successfully performed for (and by) 'root'.

Parameters

NAME TYPE DESCRIPTION

user string User name. Applaince's local user, or a user registered with the associated LDAP/AD server. hostport string hostport = hostname[:port]. If you do not specify the port number, the port 22 is used by default. password string The password of the specified user on the remote host.

Return Value

TYPE DESCRIPTION

int32 return = 1 | 0, 0 - success, 1 - failed

See Also

Method Short Description

com.nexenta.nms.Appliance::ssh_check_binding Verify whether the specified appliance is SSH-bound to the specified ... com.nexenta.nms.Appliance::ssh_unbind SSH-unbind a given (user, appliance) from the specified remote host. ... com.nexenta.nms.Appliance::ssh_list_bindings Get all existing SSH bound hosts com.nexenta.nms.Appliance::list_appliances Get the list of all SSH-bound as well as dynamically ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.61 com.nexenta.nms.Appliance::ssh_bind_add

(int32) ssh_bind_add (string user, string remote_ip)

Create the ssh-binding on the remote NexentaStor appliance

Parameters

NAME TYPE DESCRIPTION

user string The name of the user on the remote NexentaStor appliance remote_ip string IP address of the remote NexentaStor appliance

Return Value

TYPE DESCRIPTION

int32 return = 1 | 0, 1 - failed, 0 - success

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.62 com.nexenta.nms.Appliance::ssh_bind_delete

(int32) ssh_bind_delete (string user, string remote_ip)

Delete the ssh-binding on the remote NexentaStor appliance

Parameters

NAME TYPE DESCRIPTION

user string The name of the user on the remote NexentaStor appliance remote_ip string IP address of the remote NexentaStor appliance

Return Value

TYPE DESCRIPTION

int32 return = 1 | 0, 1 - failed, 0 - success

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.63 com.nexenta.nms.Appliance::ssh_bind_v2

(int32) ssh_bind_v2 (string user, string remote_ip, string password, dictionary {string => string} options)

Extension for the ssh_bind method, which enables you to use the extra options during the creation of the ssh-binding Parameters

NAME TYPE DESCRIPTION

user string The name of the user on the remote NexentaStor appliance remote_ip string IP address of the remote NexentaStor appliance password string Password for the specified user on the remote NexentaStor appliance options dictionary {string => string} Extra options, such as synchronization, reverse binding and so on

Return Value

TYPE DESCRIPTION

int32 returns = 1 | 0, 1 - failed, 0 - success

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.64 com.nexenta.nms.Appliance::ssh_bind_vip

(int32) ssh_bind_vip (string vip, array of (string) ssh-list)

Bind a standalone NexentaStor appliance to a cluster group virtual IP address or hostname.

Parameters

NAME TYPE DESCRIPTION

vip string Virtual IP address or hostname of the HA Cluster ssh-list array of (string) List of SSH bindings created with nodes of the HA Cluster group

Return Value

TYPE DESCRIPTION

int32 return = 1 | 0, 1 - failed, 0 - success.

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.65 com.nexenta.nms.Appliance::ssh_check_binding

(bool) ssh_check_binding (string user, string hostport)

Verify whether the specified appliance is SSH-bound to the specified remote host. Two appliances are considered SSH-bound if ssh_check_binding returns true for user 'root'.

Parameters

NAME TYPE DESCRIPTION

user string User name. Applaince's local user, or a user registered with the associated LDAP/AD server.

hostport string hostport = hostname[:port]. If you do not specify the port number, the port 22 is used by default.

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - success, 0 - failed Usage Examples

3. ssh_check_binding('root', 'remote-host.domain')

Check whether the appliance is SSH-bound to 'remote-host.domain'.

6. ssh_check_binding('mike', '192.168.17.145:4000')

Check whether the user 'mike' is SSH-bound to host with IP address 192.168.17.145 using the port 4000.

See Also

Method Short Description

com.nexenta.nms.Appliance::ssh_bind Bind a given (user, appliance) to the specified remote host ... com.nexenta.nms.Appliance::ssh_unbind SSH-unbind a given (user, appliance) from the specified remote host. ... com.nexenta.nms.Appliance::ssh_list_bindings Get all existing SSH bound hosts com.nexenta.nms.Appliance::list_appliances Get the list of all SSH-bound as well as dynamically ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.66 com.nexenta.nms.Appliance::ssh_list_bindings

(dictionary {string => array of (string)}) ssh_list_bindings (void)

Get all existing SSH bound hosts

No parameters

Return Value

TYPE DESCRIPTION

dictionary {string => array of (string)} List of the SSH-bound hosts

See Also

Method Short Description

com.nexenta.nms.Appliance::ssh_bind Bind a given (user, appliance) to the specified remote host ... com.nexenta.nms.Appliance::ssh_unbind SSH-unbind a given (user, appliance) from the specified remote host. ...

com.nexenta.nms.Appliance::ssh_check_binding Verify whether the specified appliance is SSH-bound to the specified ... com.nexenta.nms.Appliance::list_appliances Get the list of all SSH-bound as well as dynamically ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.67 com.nexenta.nms.Appliance::ssh_unbind

(int32) ssh_unbind (string user, string hostport, bool force) SSH-unbind a given (user, appliance) from the specified remote host. Two appliances are considered SSH- bound if ssh_bind operation is successfully performed for (and by) 'root'. This operation reverses the effect of com.nexenta.nms.Appliance::ssh_bind

Parameters

NAME TYPE DESCRIPTION

user string User name. Applaince's local user, or a user registered with the associated LDAP/AD server. hostport string hostport = hostname[:port]. The default port is 22. If you do not specify the port number, the port 22 is used by default.

force bool force = 0 | 1. Non-zero (true) - force the operation even though the remote may not be accessible.

Return Value

TYPE DESCRIPTION

int32 return = 1 | 0, 1 - failed, 0 - success

See Also

Method Short Description

com.nexenta.nms.Appliance::ssh_bind Bind a given (user, appliance) to the specified remote host ... com.nexenta.nms.Appliance::ssh_check_binding Verify whether the specified appliance is SSH-bound to the specified ... com.nexenta.nms.Appliance::ssh_list_bindings Get all existing SSH bound hosts com.nexenta.nms.Appliance::list_appliances Get the list of all SSH-bound as well as dynamically ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.68 com.nexenta.nms.Appliance::ssh_unbind_v2

(int32) ssh_unbind_v2 (string user, string not set, dictionary {string => string} options)

Extension for the ssh_unbind method, which enables you to use the extra options during the deletion of the ssh-binding

Parameters

NAME TYPE DESCRIPTION

user string ]Name of user]> not set string not set options dictionary {string => string} Extra options, such as synchronization, reverse binding and so on

Return Value

TYPE DESCRIPTION

int32 return = 1 | 0, 1 - failed, 0 - success

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.69 com.nexenta.nms.Appliance::ssl_bind

(int32) ssl_bind (string certificate, string cname) Add a new certificate to LDAP managed database

Parameters

NAME TYPE DESCRIPTION

certificate string Certificate file cname string Certificate alias (optional): cname = '' means that FQDN is used.

Return Value

TYPE DESCRIPTION

int32 return = 1 | 0, 1 - failed, 0 - success

See Also

Method Short Description

com.nexenta.nms.Appliance::ssl_direct_bind Add a new certificate to LDAP managed database com.nexenta.nms.Appliance::ssl_check_binding Check whether the specified certificate exists in database com.nexenta.nms.Appliance::ssl_list_bindings Get trusted host information for all existing certificates com.nexenta.nms.Appliance::ssl_list_certinfos Get certificate information for all existing certificates

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.70 com.nexenta.nms.Appliance::ssl_check_binding

(bool) ssl_check_binding (string cname)

Check whether the specified certificate exists in database

Parameters

NAME TYPE DESCRIPTION

cname string Certificate alias

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - exist, 0 - does not exist

See Also

Method Short Description

com.nexenta.nms.Appliance::ssl_direct_bind Add a new certificate to LDAP managed database com.nexenta.nms.Appliance::ssl_bind Add a new certificate to LDAP managed database com.nexenta.nms.Appliance::ssl_list_bindings Get trusted host information for all existing certificates com.nexenta.nms.Appliance::ssl_list_certinfos Get certificate information for all existing certificates

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.71 com.nexenta.nms.Appliance::ssl_direct_bind (int32) ssl_direct_bind (string hostport, string cname)

Add a new certificate to LDAP managed database

Parameters

NAME TYPE DESCRIPTION

hostport string hostport = hostname[:port]. The default port is 636. If you do not specify the port number, the port 636 is used by default.

cname string Certificate alias (optional): cname = '' (empty string) means that FQDN is used.

Return Value

TYPE DESCRIPTION

int32 return = 1 | 0, 1 - success, 0 - failed

See Also

Method Short Description

com.nexenta.nms.Appliance::ssl_check_binding Check whether the specified certificate exists in database com.nexenta.nms.Appliance::ssl_bind Add a new certificate to LDAP managed database com.nexenta.nms.Appliance::ssl_list_bindings Get trusted host information for all existing certificates com.nexenta.nms.Appliance::ssl_list_certinfos Get certificate information for all existing certificates

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.72 com.nexenta.nms.Appliance::ssl_list_bindings

(dictionary {string => string}) ssl_list_bindings (void)

Get trusted host information for all existing certificates

No parameters

Return Value

TYPE DESCRIPTION

dictionary {string => string} Dictionary that contains information about the existing certificates

See Also

Method Short Description

com.nexenta.nms.Appliance::ssl_direct_bind Add a new certificate to LDAP managed database com.nexenta.nms.Appliance::ssl_check_binding Check whether the specified certificate exists in database com.nexenta.nms.Appliance::ssl_unbind_by_hostname Remove a certificate from the LDAP managed database com.nexenta.nms.Appliance::ssl_list_certinfos Get certificate information for all existing certificates

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.73 com.nexenta.nms.Appliance::ssl_list_certificates (array of (string)) ssl_list_certificates (void)

Get certificate files

No parameters

Return Value

TYPE DESCRIPTION

array of (string) List of certificates

See Also

Method Short Description

com.nexenta.nms.Appliance::ssl_direct_bind Add a new certificate to LDAP managed database com.nexenta.nms.Appliance::ssl_check_binding Check whether the specified certificate exists in database com.nexenta.nms.Appliance::ssl_unbind_by_hostname Remove a certificate from the LDAP managed database com.nexenta.nms.Appliance::ssl_list_bindings Get trusted host information for all existing certificates

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.74 com.nexenta.nms.Appliance::ssl_list_certinfos

(array of (dictionary {string => string})) ssl_list_certinfos (void)

Get certificate information for all existing certificates

No parameters

Return Value

TYPE DESCRIPTION

array of (dictionary {string => Lists information about the certificates, such as serial number, host name, and the string}) duration of the certificate

See Also

Method Short Description

com.nexenta.nms.Appliance::ssl_direct_bind Add a new certificate to LDAP managed database com.nexenta.nms.Appliance::ssl_check_binding Check whether the specified certificate exists in database com.nexenta.nms.Appliance::ssl_unbind_by_hostname Remove a certificate from the LDAP managed database com.nexenta.nms.Appliance::ssl_list_bindings Get trusted host information for all existing certificates

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.75 com.nexenta.nms.Appliance::ssl_unbind

(int32) ssl_unbind (string cname)

Remove the specified certificate from the database - compare with com.nexenta.nms.Appliance::ssl_unbind_by_hostname Parameters

NAME TYPE DESCRIPTION

cname string Certificate alias (optional): cname = '' (empty string) means that FQDN is used.

Return Value

TYPE DESCRIPTION

int32 return = 1 | 0, 1 - failed, 0 - success

See Also

Method Short Description

com.nexenta.nms.Appliance::ssl_direct_bind Add a new certificate to LDAP managed database com.nexenta.nms.Appliance::ssl_check_binding Check whether the specified certificate exists in database com.nexenta.nms.Appliance::ssl_list_bindings Get trusted host information for all existing certificates com.nexenta.nms.Appliance::ssl_list_certinfos Get certificate information for all existing certificates

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.76 com.nexenta.nms.Appliance::ssl_unbind_by_hostname

(int32) ssl_unbind_by_hostname (string host_fqdn)

Remove a certificate from the LDAP managed database

Parameters

NAME TYPE DESCRIPTION

host_fqdn string FQDN of a trusted host

Return Value

TYPE DESCRIPTION

int32 return = 1 | 0, 1 - failed, 0 - success

See Also

Method Short Description

com.nexenta.nms.Appliance::ssl_direct_bind Add a new certificate to LDAP managed database com.nexenta.nms.Appliance::ssl_check_binding Check whether the specified certificate exists in database com.nexenta.nms.Appliance::ssl_list_bindings Get trusted host information for all existing certificates com.nexenta.nms.Appliance::ssl_list_certinfos Get certificate information for all existing certificates

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.77 com.nexenta.nms.Appliance::stat_file

(dictionary {string => string}) stat_file (string filepath) Collects and returns info for file path, including file type, perms, size, inode, gid, uid, timestamps and so on

Parameters

NAME TYPE DESCRIPTION

filepath string Full path to file

Return Value

TYPE DESCRIPTION

dictionary {string => string} Information about file path in a form of a hash: key => value.

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.78 com.nexenta.nms.Appliance::sysnotice_check

(string) sysnotice_check (void)

Check NMS sytem notice file

No parameters

Return Value

TYPE DESCRIPTION

string Notice message

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.79 com.nexenta.nms.Appliance::sysnotice_set

(void) sysnotice_set (string notice_msg)

Update NMS sytem notice file

Parameters

NAME TYPE DESCRIPTION

notice_msg string Sytem message

No return values

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.80 com.nexenta.nms.Appliance::sysnotice_unset

(void) sysnotice_unset (void)

Clear NMS sytem notice file No parameters

No return values

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.81 com.nexenta.nms.Appliance::upgradable_packages

(array of (string)) upgradable_packages (void)

Get the list of packages to upgrade, when you run 'setup appliance upgrade', or 'apt-get upgrade'

No parameters

Return Value

TYPE DESCRIPTION

array of (string) List of packages to upgrade

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.82 com.nexenta.nms.Appliance::upgradable_packages_check

(array of (string)) upgradable_packages_check (array of (string) packages_for_check)

Determine what packages require upgrade

Parameters

NAME TYPE DESCRIPTION

packages_for_check array of (string) List of packages to check for upgrades

Return Value

TYPE DESCRIPTION

array of (string) List of packages that you want to upgrade

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.83 com.nexenta.nms.Appliance::upgrade_check

(int32) upgrade_check (int32 invalidate)

Check for appliance software upgrades

Parameters

NAME TYPE DESCRIPTION

invalidate int32 Invalidate = 0 | 1. If true (that is, non-zero), disregard locally cached upgrade status and actually perform query on the remote centralized software repository. The latter operation may take some time, use invalidate to get just in time upgrade information. Note that the appliance automatically checks for upgrades and caches the results for a certain time to optimize the operation.

Return Value

TYPE DESCRIPTION

int32 Status of the upgrade_check, -1 | 0 | 1 | 2, -1 - upgrade license invalid, 0 - upgrade not detected, 1 - upgrade detected, 2 - upgrade no connection

Usage Examples

3. upgrade_check(0)

Check for upgrades; use the latest cached result of the automatically performed check for upgrades.

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.84 com.nexenta.nms.Appliance::user_restore_configuration

(array of (string)) user_restore_configuration (string component, bool overwrite_newer, bool check_only, string vol_name)

The operation restores service definitions for the appliance's storage services to the point in time when they were saved using com.nexenta.nms.Appliance::save_configurationRestore an appliance's configuration from the most recent copy stored at a pre-defined location. The location of the saved configuration that is in use is defined by NMS property 'saved_configroot'. This method is similar to "restore_configuration". The difference is that the configurations are saved by user and not automatically. Configurations are restored on a per user basis from ".user_config".

Parameters

NAME TYPE DESCRIPTION

component string component = basic | mailer | nms | nmc | auto-snap | auto-scrub | auto-sync | auto-tier. Use 'basic' to restore the basic appliance settings: hostname, domainname, etc. Use 'mailer' to restore Mailer setting: SMTP server, username, password, etc. Use 'nms' to restore NMS configuration options, 'nmc' - to restore NMC configuration options. You can use the other components to restore service parameters for the corresponsing automated (auto-) service.

overwrite_newer bool overwrite_newer = 0 | 1, 1 - override the existing saved configuration with a newer configuration, 0 - do not override the old configuration.

check_only bool check_only = 0 | 1, 1 - dry run the operation without actually making changes, 0 - change the configuration

vol_name string Optional argument which defines the volume name

Return Value

TYPE DESCRIPTION

array of (string) System messages

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

15.85 com.nexenta.nms.Appliance::user_restore_volume_services

(bool) user_restore_volume_services (string volume_name) Restore volume services

Parameters

NAME TYPE DESCRIPTION

volume_name string The name of the volume to restore. This method is similar to "user_restore_volume_services". The difference is that the configurations are saved by user and not automatically. Configurations are restored on a per user basis from ".user_config".

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - success, 0 - failed

Previous Section: Folder and Snapshot Indexing Facility (Search Engine) Table Of Contents Next Section: Groups of Appliances Management

16 Groups of Appliances Management

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/ApplGroup com.nexenta.nms.ApplGroup Virtual Container Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION

info string wi General information about the object ipc_name string e Interface class name of the associated interface object name string ri The name of the object

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Container::destroy ['string', 'string'], [] com.nexenta.nms.Container::get_child_prop ['string', 'string'], ['string'] com.nexenta.nms.Container::get_child_props ['string', 'string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::get_names ['string'], [['array', 'string']] com.nexenta.nms.Container::get_names_by_prop ['string', 'string', 'string'], [['array', 'string']] com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::object_exists ['string'], ['bool'] com.nexenta.nms.Container::set_child_prop ['string', 'string', 'string'], [] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Container::trylock ['string', 'int32'], ['bool'] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Container::unlock ['string', 'int32'], [] com.nexenta.nms.Object::unlock_self ['int32'], [] 16.1 com.nexenta.nms.ApplGroup::create

(void) create (string group_name, dictionary {string => string} group_desc, array of (string) group_members)

Create a new group of two or more NexentaStor appliances. Verify that NexentaStor has network connection to remote appliance(s), and/or run com.nexenta.nms.Appliance::ssh_bind to create new ssh- binding(s).

Parameters

NAME TYPE DESCRIPTION

group_name string Name of the group

group_desc dictionary {string Description of group. This parameter is a simple dictionary { string => string }, for => string} example: { 'description' => 'storage 1 group' } group_members array of (string) Group members. An array of appliances' hostnames or IP addresses, for example: ('thost.mycorp.com', 'zhost.mycorp.com')

No return values

Usage Examples

3. create('storage_1', {'description' => 'storage 1 group'}, ('thost.mycorp.com', 'zhost.mycorp.com')) create a group of two appliances, and name this group 'storage_1'

See Also

Method Short Description

com.nexenta.nms.ApplGroup::get_group_types Get the list of supported group types, for example ['basic']. ... com.nexenta.nms.ApplGroup::get_members Get the list of members of the specified group. ...

Previous Section: General Appliance Management Table Of Contents Next Section: JBOD Management

16.2 com.nexenta.nms.ApplGroup::get_all

(array of (dictionary {string => string})) get_all (string pattern)

Get the list of all supported groups of all types.

Parameters

NAME TYPE DESCRIPTION

pattern string A pattern that selects a matching subset of groups. An empty string matches all groups

Return Value

TYPE DESCRIPTION

array of (dictionary {string => string}) List of all groups of appliances

Previous Section: General Appliance Management Table Of Contents Next Section: JBOD Management 16.3 com.nexenta.nms.ApplGroup::get_all_members

(array of (string)) get_all_members (void)

Get the list of members of all groups.

No parameters

Return Value

TYPE DESCRIPTION

array of (string) List of members in all groups

Previous Section: General Appliance Management Table Of Contents Next Section: JBOD Management

16.4 com.nexenta.nms.ApplGroup::get_group_types

(array of (string)) get_group_types (void)

Get the list of supported group types, for example ['basic'].

No parameters

Return Value

TYPE DESCRIPTION

array of (string) List of groups

See Also

Method Short Description

com.nexenta.nms.ApplGroup::create Create a new group of two or more NexentaStor appliances. ... com.nexenta.nms.ApplGroup::get_members Get the list of members of the specified group. ...

Previous Section: General Appliance Management Table Of Contents Next Section: JBOD Management

16.5 com.nexenta.nms.ApplGroup::get_members

(array of (string)) get_members (string group_name)

Get the list of members of the specified group.

Parameters

NAME TYPE DESCRIPTION

group_name string The name of group

Return Value

TYPE DESCRIPTION array of (string) List of group members

Usage Examples

3. get_members('storage_1')

Get members of the group 'storage_1'. A sample result: ('thost.mycorp.com', 'zhost.mycorp.com')

See Also

Method Short Description

com.nexenta.nms.ApplGroup::get_group_types Get the list of supported group types, for example ['basic']. ... com.nexenta.nms.ApplGroup::get_members Get the list of members of the specified group. ...

Previous Section: General Appliance Management Table Of Contents Next Section: JBOD Management

17 JBOD Management

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/Jbod com.nexenta.nms.Jbod Virtual Base Object Virtual Container

Properties

NAME TYPE ACCESS DESCRIPTION

alias string rc blink_via_ses string rc blinking string rc Identifies if LED on JBOD is blinking. 0 - no, 1 - yes busy_slots string rc Number of slots with inserted disks chassis string rc check_slotmap string rc info string wi General information about the object ipc_name string e Interface class name of the associated interface object model string rc Combination of vendor and product special symbols in one string name string ri The name of the object part string rc picture_types string rc List of supported picture types. They can be fetched using method 'get_picture' product string rc Product name. Unique for every vendor rename_model string rc serial string rc Serial number of JBOD. Unique for each vendor and product ses_product string rc

ses_vendor string rc

slot_ids string rc

total_slots string rc Number of total slots available in the JBOD

vendor string rc Vendor name

Inherited Methods NAME PROTOTYPE

com.nexenta.nms.Container::destroy ['string', 'string'], [] com.nexenta.nms.Container::get_child_prop ['string', 'string'], ['string'] com.nexenta.nms.Container::get_child_props ['string', 'string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::get_names ['string'], [['array', 'string']] com.nexenta.nms.Container::get_names_by_prop ['string', 'string', 'string'], [['array', 'string']] com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::object_exists ['string'], ['bool'] com.nexenta.nms.Container::set_child_prop ['string', 'string', 'string'], [] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Container::trylock ['string', 'int32'], ['bool'] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Container::unlock ['string', 'int32'], [] com.nexenta.nms.Object::unlock_self ['int32'], []

17.1 com.nexenta.nms.Jbod::get_all_indicators

(dictionary {string => string}) get_all_indicators (string jbod)

Get the status of the LED for each element in the JBOD

Parameters

NAME TYPE DESCRIPTION

jbod string JBOD name

Return Value

TYPE DESCRIPTION

dictionary {string => string} Dictionary where keys are element names and values are LED statuses (1 - on, 0 - off)

Previous Section: Groups of Appliances Management Table Of Contents Next Section: Job Management

17.2 com.nexenta.nms.Jbod::get_elements

(array of (string)) get_elements (string not set)

Get the list of elements. For type 'slot' all elements are included. For the elements of other types with type 'not-installed' are excluded

Parameters

NAME TYPE DESCRIPTION

not set string JBOD name

Return Value TYPE DESCRIPTION

array of (string) List of elements. Each element is a string in format of :

Previous Section: Groups of Appliances Management Table Of Contents Next Section: Job Management

17.3 com.nexenta.nms.Jbod::get_failed_sensors

(array of (string)) get_failed_sensors (string not set)

Get the list of sensors with failures. To get more information about failure type, use method 'get_sensors'

Parameters

NAME TYPE DESCRIPTION

not set string Jbod name

Return Value

TYPE DESCRIPTION

array of (string) List of sensor names. Each element is a combination of an element name and a sensor name

Previous Section: Groups of Appliances Management Table Of Contents Next Section: Job Management

17.4 com.nexenta.nms.Jbod::get_picture

(string) get_picture (string not set, string not set, string not set)

Get a picture or an exception, if no item with a given type is found. Note that JPEG and SVG pictures are encoded using the 'base64' method. To get the list of supported pictures for each JBOD, see property 'picture_types'

Parameters

NAME TYPE DESCRIPTION

not set string JBOD name not set string Picture type. Supported formats: 'txt', 'svg', 'jpg' not set string not set

Return Value

TYPE DESCRIPTION

string Bytes of the picture

Previous Section: Groups of Appliances Management Table Of Contents Next Section: Job Management

17.5 com.nexenta.nms.Jbod::get_sensors

(array of (dictionary {string => string})) get_sensors (string not set)

Get the list of sensors for a JBOD. Parameters

NAME TYPE DESCRIPTION

not set string JBOD name

Return Value

TYPE DESCRIPTION

array of List of sensors. Each sensor is a dictionary with the following values: {dev} - element name {name} - name (dictionary of a sensor. Each element can have 1 or more sensors. {type} - sensor type: state, speed, temperature, {string voltage, current {state} - state of the sensor. For example, 'ok' - all sensors are healthy, 'not-isntalled' - => element or sensor is not installed and so on. May also return the failure states. {value} - value of the sensor. string}) For some sensors it can be missed. In this case it equals '-'. {units} - unit type for the returned value.

Previous Section: Groups of Appliances Management Table Of Contents Next Section: Job Management

17.6 com.nexenta.nms.Jbod::ident_off

(void) ident_off (string not set, string not set)

Turn off the identification LED for a given element

Parameters

NAME TYPE DESCRIPTION

not set string JBOD name not set string Element name

No return values

Previous Section: Groups of Appliances Management Table Of Contents Next Section: Job Management

17.7 com.nexenta.nms.Jbod::ident_on

(void) ident_on (string not set, string not set)

Turn on the identification LED for a given element

Parameters

NAME TYPE DESCRIPTION

not set string JBOD's name not set string Element name

No return values

Previous Section: Groups of Appliances Management Table Of Contents Next Section: Job Management

17.8 com.nexenta.nms.Jbod::ident_state (string) ident_state (string not set, string not set)

Return the current status of an identification LED for a given element

Parameters

NAME TYPE DESCRIPTION

not set string JBOD's name not set string Name of the element

Return Value

TYPE DESCRIPTION

string return= 1 | 0, 1 - LED is on, 0 - LED is off

Previous Section: Groups of Appliances Management Table Of Contents Next Section: Job Management

17.9 com.nexenta.nms.Jbod::ident_toggle

(void) ident_toggle (string not set, string not set, bool not set)

Switch the identification LED on a given element. It is a wrapper for ident_on, ident_off functions

Parameters

NAME TYPE DESCRIPTION

not set string JBOD's name not set string Name of the element not set bool 1 - turn on, 0 - turn off

No return values

Previous Section: Groups of Appliances Management Table Of Contents Next Section: Job Management

17.10 com.nexenta.nms.Jbod::jbod_set_alias

(bool) jbod_set_alias (string jbod_id, string prefix)

Set user friendly name for a JBOD ID.

Parameters

NAME TYPE DESCRIPTION

jbod_id string JBOD ID received from a JBOD by the SES protocol.

prefix string Alias, or prefix, name. Example: If you set prefix for JBOD "jbod:1" as "test", the JBOD's name changes to "test:1".

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - True, 0 - False. Previous Section: Groups of Appliances Management Table Of Contents Next Section: Job Management

17.11 com.nexenta.nms.Jbod::list_supported

(array of (dictionary {string => string})) list_supported (void)

Collect the information about the supported JBODs

No parameters

Return Value

TYPE DESCRIPTION

array of (dictionary {string => string}) List of supported JBODS in a form of hash: {vendor => ..., model => ...}

Previous Section: Groups of Appliances Management Table Of Contents Next Section: Job Management

17.12 com.nexenta.nms.Jbod::rename_model

(bool) rename_model (string name, string vendor, string product)

Rename JBOD's model

Parameters

NAME TYPE DESCRIPTION

name string JBOD's ID vendor string New value for JBOD's vendor. If you set an empty string, no changes are made product string New value for product name. If you set an empty string, no changes are made

Return Value

TYPE DESCRIPTION

bool return= 1 | 0, 1 - the parameter was changed, 0 - no changes are made

Previous Section: Groups of Appliances Management Table Of Contents Next Section: Job Management

17.13 com.nexenta.nms.Jbod::rescan

(void) rescan (void)

Update and re-read JBODs and disks. Use this method after the hot swap

No parameters

No return values

Previous Section: Groups of Appliances Management Table Of Contents Next Section: Job Management 18 Job Management

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/Job com.nexenta.nms.Job Virtual Container Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION

autocleanup string c Determines whether to delete the information about the Job, after Job is finished. Determines the time interval after which the information must be deleted (in seconds) component string c Determines the system component to which the specified Job belongs description string c Job's description errstr string wc In case of error, shows the error details finish_time string wc Job's finish time info string wi General information about the object ipc_name string e Interface class name of the associated interface object keeptime string c Shows the elapsed time before deleting the information about the Job, if 'autocleanup' is enabled name string ri The name of the object progress string wc Shows the percentage of completed Job retcode string wc Return code. Shows the information about the Job completion: successfully or with errors retdata string wc Job returns the data in-line for the variable shortdesc string c Short Job description. Added as a comment to Job list start_time string wc Job's start time state string wc Current Job's state type string c The type of Job visible string c Determines whether Job is visible or hidden

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Container::destroy ['string', 'string'], [] com.nexenta.nms.Container::get_child_prop ['string', 'string'], ['string'] com.nexenta.nms.Container::get_child_props ['string', 'string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::get_names ['string'], [['array', 'string']] com.nexenta.nms.Container::get_names_by_prop ['string', 'string', 'string'], [['array', 'string']] com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::object_exists ['string'], ['bool'] com.nexenta.nms.Container::set_child_prop ['string', 'string', 'string'], [] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Container::trylock ['string', 'int32'], ['bool'] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Container::unlock ['string', 'int32'], [] com.nexenta.nms.Object::unlock_self ['int32'], [] 18.1 com.nexenta.nms.Job::cleanup_jobs

(void) cleanup_jobs (void)

Delete the information aboioout the completed Jobs with expired 'autocleanup' and 'keeptime' parameters

No parameters

No return values

Previous Section: JBOD Management Table Of Contents Next Section: Log Viewing Facility

18.2 com.nexenta.nms.Job::destroy_job

(void) destroy_job (int32 pid, int32 force)

Delete/Cancel Job.

Parameters

NAME TYPE DESCRIPTION

pid int32 Job's Proccess identificator force int32 Force operation. Delete even if proccess is still running

No return values

Previous Section: JBOD Management Table Of Contents Next Section: Log Viewing Facility

18.3 com.nexenta.nms.Job::get_jobparams

(dictionary {string => string}) get_jobparams (string pid)

Get the parameters of current Job

Parameters

NAME TYPE DESCRIPTION

pid string Job's Proccess identificator

Return Value

TYPE DESCRIPTION

dictionary {string => string} Dictionary with start parameters

Previous Section: JBOD Management Table Of Contents Next Section: Log Viewing Facility 18.4 com.nexenta.nms.Job::get_jobs

(string) get_jobs (void)

Get the list of current Jobs in a JSON format (JSON - a format which facilitates the data processing in NMV )

No parameters

Return Value

TYPE DESCRIPTION

string List of Jobs in a JSON format

Previous Section: JBOD Management Table Of Contents Next Section: Log Viewing Facility

18.5 com.nexenta.nms.Job::get_jobtype_param_descs

(dictionary {string => dictionary {string => string}}) get_jobtype_param_descs (string jobtype)

Get the descriptions of the start parameters for the Job type

Parameters

NAME TYPE DESCRIPTION

jobtype string Job type

Return Value

TYPE DESCRIPTION

dictionary {string => dictionary {string => string}} List of descriptions of the start paramters for the specified Job type

Previous Section: JBOD Management Table Of Contents Next Section: Log Viewing Facility

18.6 com.nexenta.nms.Job::get_jobtypes

(array of (string)) get_jobtypes (void)

Get the list of registered Job types

No parameters

Return Value

TYPE DESCRIPTION

array of (string) Get the list of registered Job types

Previous Section: JBOD Management Table Of Contents Next Section: Log Viewing Facility

18.7 com.nexenta.nms.Job::get_pid_by_unique_param (int32) get_pid_by_unique_param (string jobtype, string key, string value, bool incl_terminated)

Get the list of Jobs for the specified unique startup parameter

Parameters

NAME TYPE DESCRIPTION

jobtype string Type of Job key string Parameter identificator value string Unique value incl_terminated bool Include the search results from finished, but not terminated Jobs

Return Value

TYPE DESCRIPTION

int32 Process Identificator (PID)

Previous Section: JBOD Management Table Of Contents Next Section: Log Viewing Facility

18.8 com.nexenta.nms.Job::get_pids_by_param

(array of (int32)) get_pids_by_param (string jobtype, string key, string value_regexp, bool exact_match, bool incl_terminated)

Get the list of Jobs for the specified startup parameter

Parameters

NAME TYPE DESCRIPTION

jobtype string Job type key string Parameter identificator value_regexp string Parameter's value in a format of a regular expression exact_match bool Filter the results which match 'value_regexp' incl_terminated bool Include the search results from finished, but not yet terminated Jobs

Return Value

TYPE DESCRIPTION

array of (int32) List of Process Identificators(PID)s of active processes

Previous Section: JBOD Management Table Of Contents Next Section: Log Viewing Facility

18.9 com.nexenta.nms.Job::start_job

(int32) start_job (string jobtype_name, dictionary {string => string} params)

Start the Job with the specified parameters

Parameters

NAME TYPE DESCRIPTION jobtype_name string Job's type params dictionary {string => string} startup parameters

Return Value

TYPE DESCRIPTION

int32 Process Identificator (PID) of the process that has been started.

Previous Section: JBOD Management Table Of Contents Next Section: Log Viewing Facility

19 Log Viewing Facility

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/LogViewer com.nexenta.nms.LogViewer Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION

info string wi General information about the object ipc_name string e Interface class name of the associated interface object name string ri The name of the object

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Object::unlock_self ['int32'], []

19.1 com.nexenta.nms.LogViewer::get_linecount

(int32) get_linecount (string logfile)

Get the current position (line number) in the file

Parameters

NAME TYPE DESCRIPTION

logfile string The name of the log file

Return Value

TYPE DESCRIPTION

int32 Line number See Also

Method Short Description

com.nexenta.nms.LogViewer::get_lines Get the specified number of lines from the log file ... com.nexenta.nms.LogViewer::get_tail Get the specified number of lines from the end of ...

Previous Section: Job Management Table Of Contents Next Section: Logical and Physical Disk Management

19.2 com.nexenta.nms.LogViewer::get_lines

(array of (string)) get_lines (string logfile, int32 linecount, int32 offset)

Get the specified number of lines from the log file

Parameters

NAME TYPE DESCRIPTION

logfile string The name of the log file linecount int32 Number of lines to retrieve offset int32 Line number that specifies the offset in the log file from which to start reading.

Return Value

TYPE DESCRIPTION

array of (string) List of lines

See Also

Method Short Description

com.nexenta.nms.LogViewer::get_linecount Get the current position (line number) in the file ... com.nexenta.nms.LogViewer::get_tail Get the specified number of lines from the end of ...

Previous Section: Job Management Table Of Contents Next Section: Logical and Physical Disk Management

19.3 com.nexenta.nms.LogViewer::get_tail

(array of (string)) get_tail (string logfile, int32 linecount)

Get the specified number of lines from the end of the log file's

Parameters

NAME TYPE DESCRIPTION

logfile string The name of the log file

linecount int32 Number of lines to retrieve from the end of file

Return Value

TYPE DESCRIPTION

array of (string) Specified number of lines from the tail of the logfile See Also

Method Short Description

com.nexenta.nms.LogViewer::get_linecount Get the current position (line number) in the file ... com.nexenta.nms.LogViewer::get_lines Get the specified number of lines from the log file ...

Previous Section: Job Management Table Of Contents Next Section: Logical and Physical Disk Management

20 Logical and Physical Disk Management

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/Lun com.nexenta.nms.Lun Virtual Container Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION

assignment string rc assignment_variants string rc List of options for disk assignement. You can select one of th efollowing assignment types: log, disk, cache. However, you can set log or cache assignment only for SSD drives. blinking string rc Set to 0 when not-blinking, and non-zero when blinking. caching_supported string rc Set this value to 'yes' or 'no' depending on whether LUN has caching support or not. ddi_parent string rc The ddi parent of the device. device_id string rc System-level device ID, for example 'id1,sd@f0000000047f07e6d0003c10f0000'. Internal use only. device_type string rc The type of the LUN device (Ex: 'disk'). driver string rc The driver used to access LUN. driver_instance string rc The instance of the driver. guid string rc The Global unique ID of the LUN. info string wi General information about the object ipc_name string e Interface class name of the associated interface object is_ssd string rc jbod string rc JBOD or just a bunch of disks media_present string rc Set to 'yes' if LUN media is present. model string rc Disk model. If a LUN is a physical disk, NexentaStor automatically determines the model, for example: ST320414A indicates s Seagate disk drive, WD7500AAKS - a Western Digital disk drive, and so on. mountpoint string rc Defines the mountpoint, if the LUN is mounted. name string ri The name of the object product string rc Defines the LUN product. removable string rc removable = 'yes' | 'no'. The value of the property is 'yes' for USB attached devices and CD-ROMs. Otherwise, the value is 'no'.

revision string rc Device revision, for example '1.0'.

rpm string rc

serial string rc

size string rc The size of the LUN, for example: "498GB", "1TB", "80GB". size_bytes string rc The LUN size, in bytes (integer value). For example, 1073741824 - for 1TB drive. size_str string rc Provides the size of the LUN in a readable format. For example if size is 1073479680, size_str is 1023.8MB. slot_comment string rc A comment for slot_id, wich can be used for search slot_id string rc The slot ID to which the LUN is connected subtype string rc A subtype of a SCSI-compliant device. subtype = 'sas' | 'sata' | 'scsi' | 'zvol'. target_ports string rc Target ports vendor string rc Device vendor. If you use physical disk, the property's value is a hardware vendor. If you use VMDK virtual disks this property has value 'VMware'.

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Container::destroy ['string', 'string'], [] com.nexenta.nms.Container::get_child_prop ['string', 'string'], ['string'] com.nexenta.nms.Container::get_child_props ['string', 'string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::get_names ['string'], [['array', 'string']] com.nexenta.nms.Container::get_names_by_prop ['string', 'string', 'string'], [['array', 'string']] com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::object_exists ['string'], ['bool'] com.nexenta.nms.Container::set_child_prop ['string', 'string', 'string'], [] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Container::trylock ['string', 'int32'], ['bool'] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Container::unlock ['string', 'int32'], [] com.nexenta.nms.Object::unlock_self ['int32'], []

20.1 com.nexenta.nms.Lun::blink_running

(bool) blink_running (string lun_name)

Verify that LED on a LUN blikns

Parameters

NAME TYPE DESCRIPTION

lun_name string The name of the LUN

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 0 - does not blink, 1 - blink

Previous Section: Log Viewing Facility Table Of Contents Next Section: NMS Pool Management

20.2 com.nexenta.nms.Lun::blink_start

(int32) blink_start (string lun, dictionary {string => string} attempts) Start the LED blinking on a specified LUN

Parameters

NAME TYPE DESCRIPTION

lun string LUN name attempts dictionary {string => string} Parameters: { 'attempts' => '', 'pause' => '', 'blink_time' => '' }

Return Value

TYPE DESCRIPTION

int32 Proccess Identificator (PID) of a blink job

Previous Section: Log Viewing Facility Table Of Contents Next Section: NMS Pool Management

20.3 com.nexenta.nms.Lun::blink_stop

(void) blink_stop (string lun)

Stop LED blinking on a specified LUN

Parameters

NAME TYPE DESCRIPTION

lun string LUN name

No return values

Previous Section: Log Viewing Facility Table Of Contents Next Section: NMS Pool Management

20.4 com.nexenta.nms.Lun::cache

(string) cache (string disk_name, string cache_type, string action)

Retrieve, enable and disable on-disk read and write cache. The method enables you to get, or change (enable or disable) write-cache and/or read-cache on the device. You can use this functionality on the drives that provide on-disk read and write caches and support SCSI compliant way to enable and disable them.

Parameters

NAME TYPE DESCRIPTION

disk_name string The name of the physical or virtual disk (LUN). For example: 'c5t3d0' or 'c0d1' (the latter for IDE). cache_type string cache_type = write_cache | read_cache. The paramemeter can have one of the following string values: "write_cache" - to get the current setting or enable/disable write-cache on the device, or "read_cache" - to get the current setting or enable/disable read-cache

action string action = display | enable | disable. Use "display" to simply retrieve the current setting. Use "enable" to enable the specified cache on the specified device. Finally, use "disable" to disable the specified cache on the specified device.

Return Value TYPE DESCRIPTION

string The possible return values: 'enabled', 'disabled', 'unsupported'

Usage Examples

3. cache('c1t2d0', 'write_cache', 'disable')

Disable write cache on the 'c1t2d0'

6. cache('c3t4d0', 'write_cache', 'display')

Get the current write-cache settings for disk 'c1t2d0'.

Previous Section: Log Viewing Facility Table Of Contents Next Section: NMS Pool Management

20.5 com.nexenta.nms.Lun::clear_slotmap

(void) clear_slotmap (void)

Clear the slotmap file content

No parameters

No return values

Previous Section: Log Viewing Facility Table Of Contents Next Section: NMS Pool Management

20.6 com.nexenta.nms.Lun::disk_is_avail

(bool) disk_is_avail (string disk_name)

1) Availability of all disk slices, see com.nexenta.nms.Lun::slice_is_availDetermine whether the specified disk (LUN) is available for usage, and in particular, for creating the new volumes. This method verifies a number of conditions: 2) Existence of storage services such as auto-cdp 3) Is the disk already in use by one of the appliance's volumes 4) Is the disk used as a swap area

Parameters

NAME TYPE DESCRIPTION

disk_name string The name of the physical or virtual disk (LUN). For example: 'c5t3d0' or 'c0d1' (IDE).

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - unavailable, 0 - available

Usage Examples

3. disk_is_avail('c5t3d0') Verify if the specified disk is not allocated and can be use to create a new volume, or grow or attach to an existing volume.

See Also

Method Short Description

com.nexenta.nms.Volume::vol_grow Grow a volume com.nexenta.nms.Volume::vol_create Create a volume com.nexenta.nms.Volume::attach_lun Attach a to an existing mirror. Otherwise, if mirror ...

Previous Section: Log Viewing Facility Table Of Contents Next Section: NMS Pool Management

20.7 com.nexenta.nms.Lun::get_lun_replacement_info

(string) get_lun_replacement_info (void)

Get the LUN replacement information

No parameters

Return Value

TYPE DESCRIPTION

string LUN replacement information

Previous Section: Log Viewing Facility Table Of Contents Next Section: NMS Pool Management

20.8 com.nexenta.nms.Lun::get_slotmap

(string) get_slotmap (string type)

Get slot mapping information

Parameters

NAME TYPE DESCRIPTION

type string You must set the type in which you want to receive the slot mapping information. Possible values: '' | 'txt' | 'jpg'

Return Value

TYPE DESCRIPTION

string Slot mapping information

Previous Section: Log Viewing Facility Table Of Contents Next Section: NMS Pool Management

20.9 com.nexenta.nms.Lun::have_slotmap (bool) have_slotmap (string type)

Check the existence of the slotmap file by type

Parameters

NAME TYPE DESCRIPTION

type string Possible values: '' | 'txt' | 'jpg'

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 0 - no slotmap, 1 - slotmap exists

Previous Section: Log Viewing Facility Table Of Contents Next Section: NMS Pool Management

20.10 com.nexenta.nms.Lun::hba_command

(void) hba_command (string ap_regexp, string operation)

Execute the 'cfgadm -c operation' on each hbas

Parameters

NAME TYPE DESCRIPTION

ap_regexp string Filter hbas by pattern operation string Operation to be executed

No return values

Previous Section: Log Viewing Facility Table Of Contents Next Section: NMS Pool Management

20.11 com.nexenta.nms.Lun::hba_list

(dictionary {string => array of (string)}) hba_list (bool not set)

Get the list of all HBAs by executing 'cfgadm -anl'

Parameters

NAME TYPE DESCRIPTION

not set bool if 1 - then all, if '' - then used filter by pattern '^c\d+'

Return Value

TYPE DESCRIPTION

dictionary {string => array of (string)} List of all available HBAs

Previous Section: Log Viewing Facility Table Of Contents Next Section: NMS Pool Management 20.12 com.nexenta.nms.Lun::lunsync

(void) lunsync (bool cleanup)

Synchronize the LUNs and re-enumerate the devices in the appliance. You can use this method to synchronize the LUNs, if the system does not discover newly attached LUNs automatically.

Parameters

NAME TYPE DESCRIPTION

cleanup bool cleanup = 0 | 1. If true (non-zero), cleanup obsolete (dangling) device links

No return values

Usage Examples

3. lunsync(1) re-enumerate devices in the appliance and cleanup dangling device links

Previous Section: Log Viewing Facility Table Of Contents Next Section: NMS Pool Management

20.13 com.nexenta.nms.Lun::mounted_disks

(array of (string)) mounted_disks (void)

Get the list of all mounted disks. The disk is considered mounted, if any of its slices is mounted.

No parameters

Return Value

TYPE DESCRIPTION

array of (string) List of all mounted disks

Usage Examples

3. mounted_disks()

Get the list of all mounted physical and virtual disks (LUNs).

See Also

Method Short Description

com.nexenta.nms.Lun::disk_is_avail Determine whether the specified disk (LUN) is available for usage, ...

com.nexenta.nms.Volume::vol_grow Grow a volume com.nexenta.nms.Volume::vol_create Create a volume com.nexenta.nms.Volume::attach_lun Attach a to an existing mirror. Otherwise, if mirror ...

Previous Section: Log Viewing Facility Table Of Contents Next Section: NMS Pool Management 20.14 com.nexenta.nms.Lun::rescan

(void) rescan (void)

Refresh the states of LUNs.

No parameters

No return values

Previous Section: Log Viewing Facility Table Of Contents Next Section: NMS Pool Management

20.15 com.nexenta.nms.Lun::resolve_to_vdevs

(array of (dictionary {string => string})) resolve_to_vdevs (string lun_name)

Retrieve the information about vdev that includes a specified LUN.

Parameters

NAME TYPE DESCRIPTION

lun_name string Name of LUN

Return Value

TYPE DESCRIPTION

array of (dictionary {string => string}) Hash: {vdev_index =>..., volume =>..., vdev_type =>...}

Previous Section: Log Viewing Facility Table Of Contents Next Section: NMS Pool Management

20.16 com.nexenta.nms.Lun::set_assignment

(void) set_assignment (string lun_name, string assignment)

Set the assignment of a disk drive. Assignment defines the type of device that will be used for the disk drive. NexentaStor supports the following types of disk assignments: log, cache, pool. You can set log and cache assignements only for SSD drives.

Parameters

NAME TYPE DESCRIPTION

lun_name string Name of LUN assignment string The options are: data, cache, log

No return values

Previous Section: Log Viewing Facility Table Of Contents Next Section: NMS Pool Management 20.17 com.nexenta.nms.Lun::set_slotmap

(void) set_slotmap (string guid, int32 slot, string comment)

Set the slotmap parameters.

Parameters

NAME TYPE DESCRIPTION

guid string GUID parameter for which you need to create a slotmap slot int32 Slot number comment string Optional parameter. Any descriptive information about the slotmap

No return values

Previous Section: Log Viewing Facility Table Of Contents Next Section: NMS Pool Management

21 NMS Pool Management

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/SrvPool com.nexenta.nms.SrvPool Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION

info string wi General information about the object ipc_name string e Interface class name of the associated interface object name string ri The name of the object

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Object::unlock_self ['int32'], []

21.1 com.nexenta.nms.SrvPool::disable

(void) disable (bool stop_dbus)

Disable NMS Pool support

Parameters NAME TYPE DESCRIPTION

stop_dbus bool Kill/leave DBus sessions for all NMS Pool instances, but main NMS pool

No return values

Previous Section: Logical and Physical Disk Management Table Of Contents Next Section: Network Interface Management

21.2 com.nexenta.nms.SrvPool::enable

(void) enable (void)

Enable NMS Pool support

No parameters

No return values

Previous Section: Logical and Physical Disk Management Table Of Contents Next Section: Network Interface Management

21.3 com.nexenta.nms.SrvPool::get_pool

(dictionary {int32 => dictionary {string => string}}) get_pool (void)

Get additional information about NMS Pool

No parameters

Return Value

TYPE DESCRIPTION

dictionary {int32 => Information about the NMS pool in a form of hash: pool ID = NMS entry ('dbus_port' => NMS D- dictionary {string => bus port, 'name' => NMS service instance name, 'pool_id' => ID of the NMS server instance, 'pid' string}} => PID of the NMS server instance)

Previous Section: Logical and Physical Disk Management Table Of Contents Next Section: Network Interface Management

21.4 com.nexenta.nms.SrvPool::kill_nms

(bool) kill_nms (int32 not set)

Kill the process with specified PID

Parameters

NAME TYPE DESCRIPTION

not set int32 PID of the nms process

Return Value

TYPE DESCRIPTION bool 1 | 0, 1 - success, 0 - failed

Previous Section: Logical and Physical Disk Management Table Of Contents Next Section: Network Interface Management

21.5 com.nexenta.nms.SrvPool::start_nms

(int32) start_nms (dictionary {string => string} nms_creation_props)

Starts new NMS instance

Parameters

NAME TYPE DESCRIPTION

nms_creation_props dictionary {string => Dictionary { 'pool_id' => int32, 'output_to_logfile' => string } that contains string} new NMS properties

Return Value

TYPE DESCRIPTION

int32 Server pool ID

Previous Section: Logical and Physical Disk Management Table Of Contents Next Section: Network Interface Management

22 Network Interface Management

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/Network/Interface com.nexenta.nms.NetworkInterface Virtual Container Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION

aggr string c Space delimited IPv4 interfaces that you specified to create 802.3ad aggregated interface. The property has an empty value, if the interface is not aggregated broadcast string c Broadcast address info string wi General information about the object ipc_name string e Interface class name of the associated interface object ipmp_group_name string c ipmpg string c ipv4addr string c IPv4 address ipv4mask string c IPv4 netmask. Specifies part of the address to reserve the network as a subnetwork.

lacpactivity string c

macaddr string c MAC address of the interface

method string c method = 'static' | 'dhcp' | 'unconfigured'. The method used to configure the interface.

mtu string c Maximum Transmission Unit (MTU), size (in bytes) of the largest Ethernet frame. name string ri The name of the object netdev_type string c netdev_type = one of NETDEV_TYPE_* constants over string c passive string c policy string c state string c state = 'up' | 'down' | 'unknown'. State of the interface. vid string c

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Container::destroy ['string', 'string'], [] com.nexenta.nms.Container::get_child_prop ['string', 'string'], ['string'] com.nexenta.nms.Container::get_child_props ['string', 'string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::get_names ['string'], [['array', 'string']] com.nexenta.nms.Container::get_names_by_prop ['string', 'string', 'string'], [['array', 'string']] com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::object_exists ['string'], ['bool'] com.nexenta.nms.Container::set_child_prop ['string', 'string', 'string'], [] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Container::trylock ['string', 'int32'], ['bool'] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Container::unlock ['string', 'int32'], [] com.nexenta.nms.Object::unlock_self ['int32'], []

22.1 com.nexenta.nms.NetworkInterface::change_aggr_props

(void) change_aggr_props (string device, dictionary {string => string} property)

Change the network agregation properties

Parameters

NAME TYPE DESCRIPTION

device string Name of the aggregated netwrok interface property dictionary {string => string} Hash of the network interface properties

No return values

Previous Section: NMS Pool Management Table Of Contents Next Section: Network Management

22.2 com.nexenta.nms.NetworkInterface::check_static

(string) check_static (string ifname, string ip, string mask)

Check the static network interface

Parameters NAME TYPE DESCRIPTION

ifname string Interface name ip string IP address mask string Network mask

Return Value

TYPE DESCRIPTION

string Current netmask

Previous Section: NMS Pool Management Table Of Contents Next Section: Network Management

22.3 com.nexenta.nms.NetworkInterface::create_aggr

(string) create_aggr (string if_names, string mode, string link_name)

Create an 802.3ad aggregated network interface (link).

Parameters

NAME TYPE DESCRIPTION

if_names string Space separated list of network interface names, for example: 'e1000g0 e1000g1' mode string LACP mode = 'off' | 'active' | 'passive'. Defines whether to use LACP, and its mode of operation. The supported values are 'off', 'active' and 'passive'. The default value is 'off' - LACP is not used.

link_name string Optional link name for the new aggregated network interface. Default value is aggrN, where N is the first unused integer.

Return Value

TYPE DESCRIPTION

string Name of the aggregation interface

See Also

Method Short Description

com.nexenta.nms.NetworkInterface::destroy_aggr Destroy the specified aggregated link. This operation reverses the result ...

com.nexenta.nms.NetworkInterface::is_drv_locked The method evaluates the following condition: determines if one or ...

com.nexenta.nms.NetworkInterface::is_drv_reload_required The method that determines whether the network interface driver must ...

com.nexenta.nms.NetworkInterface::get_other_drv_ifaces Get the list of all network interfaces, that use the ... com.nexenta.nms.NetworkInterface::is_capable The method determines whether a given network interface driver has ...

com.nexenta.nms.NetworkInterface::get_min_mtu Get the minimum MTU size supported by a given network ... com.nexenta.nms.NetworkInterface::get_max_mtu Get the maximum MTU size supported by a given network ...

com.nexenta.nms.NetworkInterface::set_static Statically configure a network interface. Compare with com.nexenta.nms.NetworkInterface::set_dhcp. Use ...

Previous Section: NMS Pool Management Table Of Contents Next Section: Network Management 22.4 com.nexenta.nms.NetworkInterface::create_aggr_with_props

(string) create_aggr_with_props (string if_names, string mode, string link_name, dictionary {string => string} props)

Create link aggregation with specified parameters

Parameters

NAME TYPE DESCRIPTION

if_names string Space separated list of network interface names, for example 'e1000g0 e1000g1' mode string LACP mode = 'off' | 'active' | 'passive'. Defines whether to use LACP, and its mode of operation. The supported values are 'off', 'active' and 'passive'. The default value is 'off' - LACP is not used.

link_name string Optional link name fort the new aggregated network interface. Default value is aggrN where N is the first unused integer. props dictionary Hash with user-defined properties {string => string}

Return Value

TYPE DESCRIPTION

string Name of the created aggregation interface

Previous Section: NMS Pool Management Table Of Contents Next Section: Network Management

22.5 com.nexenta.nms.NetworkInterface::create_ipalias

(string) create_ipalias (string ifname, int32 idx)

Create an IP alias (aka "logical IP interface").

Parameters

NAME TYPE DESCRIPTION

ifname string The name of the network interface that needs to be "aliased". This may be a physical interface, VLAN or an aggregated link.

idx int32 IP alias ID, for example: 1, 2, etc.

Return Value

TYPE DESCRIPTION

string Name of the IP alias

Previous Section: NMS Pool Management Table Of Contents Next Section: Network Management

22.6 com.nexenta.nms.NetworkInterface::create_ipmp_group

(string) create_ipmp_group (string ifs_str, string standby)

Create an IPMP group

Parameters NAME TYPE DESCRIPTION

ifs_str string Names of interfaces that you want to include in the IPMP group. standby string Names of iterfaces that must be in state standby.

Return Value

TYPE DESCRIPTION

string String that contains the name of the created IPMI group.

Previous Section: NMS Pool Management Table Of Contents Next Section: Network Management

22.7 com.nexenta.nms.NetworkInterface::create_vlan

(string) create_vlan (string if_name, int32 vid, bool force, string extra_options)

Create a VLAN interface.

Parameters

NAME TYPE DESCRIPTION

if_name string The name of the network interface. This may be a physical interface or an aggregated link. vid int32 VLAN ID, example: 1, 2, etc. force bool Force creation of the VLAN extra_options string Extra options to pass to 'dladm create-vlan'

Return Value

TYPE DESCRIPTION

string Name of the VLAN interface

Previous Section: NMS Pool Management Table Of Contents Next Section: Network Management

22.8 com.nexenta.nms.NetworkInterface::destroy_aggr

(void) destroy_aggr (string ifname)

Destroy the specified aggregated link. This operation reverses the result of execution of com.nexenta.nms.NetworkInterface::create_aggr

Parameters

NAME TYPE DESCRIPTION

ifname string The name of the aggregated network interface, for example: 'aggr1'

No return values

Usage Examples

3. destroy_aggr('aggr1') Destroy an aggregated link 'aggr1'.

See Also

Method Short Description

com.nexenta.nms.NetworkInterface::create_aggr Create an 802.3ad aggregated network interface (link). com.nexenta.nms.NetworkInterface::is_drv_locked The method evaluates the following condition: determines if one or ...

com.nexenta.nms.NetworkInterface::is_drv_reload_required The method that determines whether the network interface driver must ...

com.nexenta.nms.NetworkInterface::get_other_drv_ifaces Get the list of all network interfaces, that use the ... com.nexenta.nms.NetworkInterface::is_capable The method determines whether a given network interface driver has ...

com.nexenta.nms.NetworkInterface::get_min_mtu Get the minimum MTU size supported by a given network ... com.nexenta.nms.NetworkInterface::get_max_mtu Get the maximum MTU size supported by a given network ...

com.nexenta.nms.NetworkInterface::set_static Statically configure a network interface. Compare with com.nexenta.nms.NetworkInterface::set_dhcp. Use ...

Previous Section: NMS Pool Management Table Of Contents Next Section: Network Management

22.9 com.nexenta.nms.NetworkInterface::destroy_ipalias

(void) destroy_ipalias (string ifname)

Destroy an IP alias.

Parameters

NAME TYPE DESCRIPTION

ifname string The name of the logical network interface

No return values

Usage Examples

3. destroy_ipalias('e1000g0:1')

Destroy logical interface 'e1000g0:1'.

See Also

Method Short Description

com.nexenta.nms.NetworkInterface::create_aggr Create an 802.3ad aggregated network interface (link). com.nexenta.nms.NetworkInterface::is_drv_locked The method evaluates the following condition: determines if one or ...

com.nexenta.nms.NetworkInterface::is_drv_reload_required The method that determines whether the network interface driver must ...

com.nexenta.nms.NetworkInterface::get_other_drv_ifaces Get the list of all network interfaces, that use the ...

com.nexenta.nms.NetworkInterface::is_capable The method determines whether a given network interface driver has ...

com.nexenta.nms.NetworkInterface::get_min_mtu Get the minimum MTU size supported by a given network ... com.nexenta.nms.NetworkInterface::get_max_mtu Get the maximum MTU size supported by a given network ... com.nexenta.nms.NetworkInterface::set_static Statically configure a network interface. Compare with com.nexenta.nms.NetworkInterface::set_dhcp. Use ...

Previous Section: NMS Pool Management Table Of Contents Next Section: Network Management

22.10 com.nexenta.nms.NetworkInterface::destroy_ipmp_group

(void) destroy_ipmp_group (string name)

Destroys and IPMP group

Parameters

NAME TYPE DESCRIPTION

name string Name of the IPMP group.

No return values

Previous Section: NMS Pool Management Table Of Contents Next Section: Network Management

22.11 com.nexenta.nms.NetworkInterface::destroy_vlan

(void) destroy_vlan (string ifname)

Destroy a VLAN interface.

Parameters

NAME TYPE DESCRIPTION

ifname string The name of the logical network interface

No return values

Usage Examples

3. destroy_vlan('e1000g2000')

Destroy VLAN interface 'e1000g2000'.

See Also

Method Short Description

com.nexenta.nms.NetworkInterface::create_aggr Create an 802.3ad aggregated network interface (link).

com.nexenta.nms.NetworkInterface::is_drv_locked The method evaluates the following condition: determines if one or ...

com.nexenta.nms.NetworkInterface::is_drv_reload_required The method that determines whether the network interface driver must ...

com.nexenta.nms.NetworkInterface::get_other_drv_ifaces Get the list of all network interfaces, that use the ... com.nexenta.nms.NetworkInterface::is_capable The method determines whether a given network interface driver has ... com.nexenta.nms.NetworkInterface::get_min_mtu Get the minimum MTU size supported by a given network ... com.nexenta.nms.NetworkInterface::get_max_mtu Get the maximum MTU size supported by a given network ...

com.nexenta.nms.NetworkInterface::set_static Statically configure a network interface. Compare with com.nexenta.nms.NetworkInterface::set_dhcp. Use ...

Previous Section: NMS Pool Management Table Of Contents Next Section: Network Management

22.12 com.nexenta.nms.NetworkInterface::get_aggr_props

(dictionary {string => dictionary {string => string}}) get_aggr_props (void)

Get the parameters of the aggregated interface

No parameters

Return Value

TYPE DESCRIPTION

dictionary {string => dictionary {string => string}} Hash of { name => Hash of { policy => value, mode => value }

Previous Section: NMS Pool Management Table Of Contents Next Section: Network Management

22.13 com.nexenta.nms.NetworkInterface::get_linkprops

(dictionary {string => dictionary {string => string}}) get_linkprops (string linkname)

Get the properties of the specified aggregated interface

Parameters

NAME TYPE DESCRIPTION

linkname string Aggregation interface name

Return Value

TYPE DESCRIPTION

dictionary {string => dictionary {string hash of { prop_name => hash of { perm ->value, val -> value, def -> value, => string}} possible ->value } }

Previous Section: NMS Pool Management Table Of Contents Next Section: Network Management

22.14 com.nexenta.nms.NetworkInterface::get_max_mtu

(string) get_max_mtu (string ifname)

Get the maximum MTU size supported by a given network interface

Parameters NAME TYPE DESCRIPTION

ifname string The name of the network interface, for example: 'e1000g0'

Return Value

TYPE DESCRIPTION

string Maximum MTU size

Usage Examples

3. get_max_mtu('chxge0')

Returns 9582, the maximum MTU size supported by Chelsio 10GE driver

See Also

Method Short Description

com.nexenta.nms.NetworkInterface::is_drv_locked The method evaluates the following condition: determines if one or ...

com.nexenta.nms.NetworkInterface::get_other_drv_ifaces Get the list of all network interfaces, that use the ... com.nexenta.nms.NetworkInterface::is_capable The method determines whether a given network interface driver has ...

com.nexenta.nms.NetworkInterface::get_min_mtu Get the minimum MTU size supported by a given network ... com.nexenta.nms.NetworkInterface::set_dhcp Configure the specified network interface using DHCP. Note that unlike ...

com.nexenta.nms.NetworkInterface::set_static Statically configure a network interface. Compare with com.nexenta.nms.NetworkInterface::set_dhcp. Use ...

Previous Section: NMS Pool Management Table Of Contents Next Section: Network Management

22.15 com.nexenta.nms.NetworkInterface::get_min_mtu

(string) get_min_mtu (string ifname)

Get the minimum MTU size supported by a given network interface

Parameters

NAME TYPE DESCRIPTION

ifname string The name of the network interface, for example: 'e1000g0'

Return Value

TYPE DESCRIPTION

string Minimum MTU size

Previous Section: NMS Pool Management Table Of Contents Next Section: Network Management

22.16 com.nexenta.nms.NetworkInterface::get_names_by_type (array of (string)) get_names_by_type (string type)

Get the list of network interface names with the specified TYPE

Parameters

NAME TYPE DESCRIPTION

type string NETDEV_TYPE constant

Return Value

TYPE DESCRIPTION

array of (string) List of the interfaces with the specified type

Usage Examples

3. netif->get_names_by_type($NZA::NETDEV_TYPE_AGGR)

Returns the list of aggregated interfaces. The output does not include VLANS or IP Aliases)

See Also

Method Short Description

com.nexenta.nms.Container::get_names Get the list of names of all child objects that ... com.nexenta.nms.NetworkInterface::create_aggr Create an 802.3ad aggregated network interface (link). com.nexenta.nms.NetworkInterface::create_ipalias Create an IP alias (aka "logical IP interface"). com.nexenta.nms.NetworkInterface::create_vlan Create a VLAN interface.

Previous Section: NMS Pool Management Table Of Contents Next Section: Network Management

22.17 com.nexenta.nms.NetworkInterface::get_other_drv_ifaces

(array of (string)) get_other_drv_ifaces (string ifname)

Get the list of all network interfaces, that use the same network interface driver as the network interface specified as a paramter.

Parameters

NAME TYPE DESCRIPTION

ifname string The name of the network interface, for example: 'e1000g0'

Return Value

TYPE DESCRIPTION

array of (string) List of interfaces which uses the same driver, as the specified interface

Usage Examples

3. get_other_drv_ifaces('e1000g0')

Get the list of all e1000 network interfcaces. The result may include ('e1000g0', 'e1000g1', 'e1000g2', ...) See Also

Method Short Description

com.nexenta.nms.NetworkInterface::is_drv_locked The method evaluates the following condition: determines if one or ...

com.nexenta.nms.NetworkInterface::get_other_drv_ifaces Get the list of all network interfaces, that use the ... com.nexenta.nms.NetworkInterface::is_capable The method determines whether a given network interface driver has ...

com.nexenta.nms.NetworkInterface::get_min_mtu Get the minimum MTU size supported by a given network ... com.nexenta.nms.NetworkInterface::get_max_mtu Get the maximum MTU size supported by a given network ... com.nexenta.nms.NetworkInterface::set_static Statically configure a network interface. Compare with com.nexenta.nms.NetworkInterface::set_dhcp. Use ...

Previous Section: NMS Pool Management Table Of Contents Next Section: Network Management

22.18 com.nexenta.nms.NetworkInterface::ipaddr_to_dev

(string) ipaddr_to_dev (string ipaddr)

Get the interface name by IP address

Parameters

NAME TYPE DESCRIPTION

ipaddr string IP address

Return Value

TYPE DESCRIPTION

string Name of the interface

Previous Section: NMS Pool Management Table Of Contents Next Section: Network Management

22.19 com.nexenta.nms.NetworkInterface::is_capable

(bool) is_capable (string ifname, string capname)

The method determines whether a given network interface driver has the specified capability. You must specify the capability as an argument.

Parameters

NAME TYPE DESCRIPTION

ifname string The name of the network interface, for example: 'e1000g0'

capname string The name of the capability, for example: "mtu".

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - capable, 0 - not capable Usage Examples

3. is_capable('xge0', 'mtu')

Determine whether xge driver supports changing the MTU operation. The return value is 'true'.

See Also

Method Short Description

com.nexenta.nms.NetworkInterface::is_drv_locked The method evaluates the following condition: determines if one or ...

com.nexenta.nms.NetworkInterface::get_other_drv_ifaces Get the list of all network interfaces, that use the ... com.nexenta.nms.NetworkInterface::is_capable The method determines whether a given network interface driver has ...

com.nexenta.nms.NetworkInterface::get_min_mtu Get the minimum MTU size supported by a given network ... com.nexenta.nms.NetworkInterface::get_max_mtu Get the maximum MTU size supported by a given network ... com.nexenta.nms.NetworkInterface::set_static Statically configure a network interface. Compare with com.nexenta.nms.NetworkInterface::set_dhcp. Use ...

Previous Section: NMS Pool Management Table Of Contents Next Section: Network Management

22.20 com.nexenta.nms.NetworkInterface::is_drv_locked

(bool) is_drv_locked (string ifname)

The method evaluates the following condition: determines if one or more network interfaces that uses the same driver are the part of an existing link-aggregated network interface. The method returns 'True', if a network interface which you specify as an argument is a part of an existing link aggregation.

Parameters

NAME TYPE DESCRIPTION

ifname string The name of the network interface, for example: 'e1000g0'

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - locked, 0 - unlocked

See Also

Method Short Description

com.nexenta.nms.NetworkInterface::create_aggr Create an 802.3ad aggregated network interface (link). com.nexenta.nms.NetworkInterface::is_drv_reload_required The method that determines whether the network interface driver must ...

com.nexenta.nms.NetworkInterface::get_other_drv_ifaces Get the list of all network interfaces, that use the ...

com.nexenta.nms.NetworkInterface::is_capable The method determines whether a given network interface driver has ...

com.nexenta.nms.NetworkInterface::get_min_mtu Get the minimum MTU size supported by a given network ...

com.nexenta.nms.NetworkInterface::get_max_mtu Get the maximum MTU size supported by a given network ...

com.nexenta.nms.NetworkInterface::set_static Statically configure a network interface. Compare with com.nexenta.nms.NetworkInterface::set_dhcp. Use ... Previous Section: NMS Pool Management Table Of Contents Next Section: Network Management

22.21 com.nexenta.nms.NetworkInterface::is_drv_reload_required

(bool) is_drv_reload_required (string ifname, uint32 mtu)

The method that determines whether the network interface driver must be re-loaded for the specified MTU size to take an affect

Parameters

NAME TYPE DESCRIPTION

ifname string The name of the network interface, for example 'e1000g0' mtu uint32 MTU size in bytes, for example: 9000 (for jumbo frames)

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - required, 0 - not required

See Also

Method Short Description

com.nexenta.nms.NetworkInterface::is_capable The method determines whether a given network interface driver has ...

com.nexenta.nms.NetworkInterface::is_drv_locked The method evaluates the following condition: determines if one or ...

com.nexenta.nms.NetworkInterface::get_other_drv_ifaces Get the list of all network interfaces, that use the ... com.nexenta.nms.NetworkInterface::is_capable The method determines whether a given network interface driver has ...

com.nexenta.nms.NetworkInterface::get_min_mtu Get the minimum MTU size supported by a given network ... com.nexenta.nms.NetworkInterface::get_max_mtu Get the maximum MTU size supported by a given network ... com.nexenta.nms.NetworkInterface::set_static Statically configure a network interface. Compare with com.nexenta.nms.NetworkInterface::set_dhcp. Use ...

Previous Section: NMS Pool Management Table Of Contents Next Section: Network Management

22.22 com.nexenta.nms.NetworkInterface::refresh

(void) refresh (string timestamp)

Refresh the network interface object

Parameters

NAME TYPE DESCRIPTION

timestamp string Timestamp of the last refresh

No return values

Previous Section: NMS Pool Management Table Of Contents Next Section: Network Management 22.23 com.nexenta.nms.NetworkInterface::set_dhcp

(void) set_dhcp (string ifname)

Configure the specified network interface using DHCP. Note that unlike com.nexenta.nms.NetworkInterface::set_static, this method does not require to specify the additional parameters, such as IP address and subnet mask. These parameters are automatically set by DHCP. Use com.nexenta.nms.NetworkInterface::set_unconfigure to unconfigure the network interface.

Parameters

NAME TYPE DESCRIPTION

ifname string The name of the network interface, for exmaple: 'e1000g0'

No return values

Usage Examples

3. set_dhcp('bnx0')

Configure using DHCP Broadcom NetXtreme II Gigabit network interface instance '0'

See Also

Method Short Description

com.nexenta.nms.NetworkInterface::is_drv_locked The method evaluates the following condition: determines if one or ...

com.nexenta.nms.NetworkInterface::get_other_drv_ifaces Get the list of all network interfaces, that use the ... com.nexenta.nms.NetworkInterface::is_capable The method determines whether a given network interface driver has ...

com.nexenta.nms.NetworkInterface::get_min_mtu Get the minimum MTU size supported by a given network ... com.nexenta.nms.NetworkInterface::get_max_mtu Get the maximum MTU size supported by a given network ... com.nexenta.nms.NetworkInterface::set_static Statically configure a network interface. Compare with com.nexenta.nms.NetworkInterface::set_dhcp. Use ...

Previous Section: NMS Pool Management Table Of Contents Next Section: Network Management

22.24 com.nexenta.nms.NetworkInterface::set_linkprop

(void) set_linkprop (string ifname, string propname, string new_value)

Set the property of the network interface

Parameters

NAME TYPE DESCRIPTION

ifname string Network interface which properties you want to configure

propname string Name of the property that you want to configure new_value string New value of the network interface property No return values

Previous Section: NMS Pool Management Table Of Contents Next Section: Network Management

22.25 com.nexenta.nms.NetworkInterface::set_macaddr

(void) set_macaddr (string ifname, string mac)

Set a MAC address for a given network interface.

Parameters

NAME TYPE DESCRIPTION

ifname string The name of the network interface, for example: 'e1000g0' mac string The MAC address to assign to the specified network interface, for example: '0:c:29:f4:c5:1d'.

No return values

Previous Section: NMS Pool Management Table Of Contents Next Section: Network Management

22.26 com.nexenta.nms.NetworkInterface::set_mtu

(void) set_mtu (string ifname, string mtu)

Set the MTU for specified network interface.

Parameters

NAME TYPE DESCRIPTION

ifname string Network interface name mtu string MTU value, for example: 1500, 9000, etc.

No return values

Previous Section: NMS Pool Management Table Of Contents Next Section: Network Management

22.27 com.nexenta.nms.NetworkInterface::set_static

(void) set_static (string ifname, string ip, string mask, string mtu)

Statically configure a network interface. Compare with com.nexenta.nms.NetworkInterface::set_dhcp. Use com.nexenta.nms.NetworkInterface::set_unconfigure to unconfigure the network interface.

Parameters

NAME TYPE DESCRIPTION

ifname string The name of the network interface, for example: 'e1000g0' ip string IPv4 address mask string IPv4 netmask. Specifies the part of the address to reserve a subnetwork. mtu string MTU size in bytes, for example: 9000 (for jumbo frames)

No return values

See Also

Method Short Description

com.nexenta.nms.NetworkInterface::is_drv_locked The method evaluates the following condition: determines if one or ...

com.nexenta.nms.NetworkInterface::get_other_drv_ifaces Get the list of all network interfaces, that use the ... com.nexenta.nms.NetworkInterface::is_capable The method determines whether a given network interface driver has ...

com.nexenta.nms.NetworkInterface::get_min_mtu Get the minimum MTU size supported by a given network ... com.nexenta.nms.NetworkInterface::get_max_mtu Get the maximum MTU size supported by a given network ... com.nexenta.nms.NetworkInterface::set_dhcp Configure the specified network interface using DHCP. Note that unlike ...

Previous Section: NMS Pool Management Table Of Contents Next Section: Network Management

22.28 com.nexenta.nms.NetworkInterface::set_static_extended

(void) set_static_extended (string ifname, string ip, string mask, string mtu, int32 flags)

Statically configure the specified network interface with the additional parameters.

Parameters

NAME TYPE DESCRIPTION

ifname string The name of the network interface, for example: 'e1000g0' ip string IPv4 address mask string IPv4 netmask. Specifies part of the address to reserve a subnetwork. mtu string MTU size in bytes, for exmaple: 9000 (for jumbo frames) flags int32 Netif flags

No return values

Previous Section: NMS Pool Management Table Of Contents Next Section: Network Management

22.29 com.nexenta.nms.NetworkInterface::set_unconfigure

(void) set_unconfigure (string ifname)

Unconfigure a network interface. This operation reverses the results of execution of com.nexenta.nms.NetworkInterface::set_dhcp and com.nexenta.nms.NetworkInterface::set_static

Parameters

NAME TYPE DESCRIPTION

ifname string The name of the network interface, for example: 'e1000g0' No return values

Usage Examples

3. set_unconfigure('bnx0')

Unconfigure Broadcom NetXtreme II Gigabit network interface instance '0'

See Also

Method Short Description

com.nexenta.nms.NetworkInterface::set_dhcp Configure the specified network interface using DHCP. Note that unlike ...

com.nexenta.nms.NetworkInterface::get_other_drv_ifaces Get the list of all network interfaces, that use the ... com.nexenta.nms.NetworkInterface::is_capable The method determines whether a given network interface driver has ...

com.nexenta.nms.NetworkInterface::get_min_mtu Get the minimum MTU size supported by a given network ... com.nexenta.nms.NetworkInterface::get_max_mtu Get the maximum MTU size supported by a given network ... com.nexenta.nms.NetworkInterface::set_static Statically configure a network interface. Compare with com.nexenta.nms.NetworkInterface::set_dhcp. Use ...

Previous Section: NMS Pool Management Table Of Contents Next Section: Network Management

23 Network Management

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/Network com.nexenta.nms.Network Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION

info string wi General information about the object ipc_name string e Interface class name of the associated interface object name string ri The name of the object

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Object::unlock_self ['int32'], []

23.1 com.nexenta.nms.Network::add_route (void) add_route (string dest, string gateway)

Add a route to a given destination using the specified gateway.

Parameters

NAME TYPE DESCRIPTION

dest string Destination (string) gateway string Gateway (string)

No return values

Previous Section: Network Interface Management Table Of Contents Next Section: Network Services Management

23.2 com.nexenta.nms.Network::delete_route

(void) delete_route (string dest, string gateway)

Delete a route, a destination and a gateway.

Parameters

NAME TYPE DESCRIPTION

dest string Destination (string) gateway string Gateway (string)

No return values

Previous Section: Network Interface Management Table Of Contents Next Section: Network Services Management

23.3 com.nexenta.nms.Network::find_gateway_hostname

(string) find_gateway_hostname (string rem_ipv4addr)

Find the corresponding gateway for a given remote IP address.

Parameters

NAME TYPE DESCRIPTION

rem_ipv4addr string Remote IPv4 address.

Return Value

TYPE DESCRIPTION

string Gateway host name

Usage Examples

3. gateway = rem_ipv4addr("192.168.1.10") Returns a string which the gateway used to reach the hostname, for example: "192.168.1.1".

Previous Section: Network Interface Management Table Of Contents Next Section: Network Services Management

23.4 com.nexenta.nms.Network::gateway

(string) gateway (void)

Get the appliance's default gateway.

No parameters

Return Value

TYPE DESCRIPTION

string Host name of the default gateway

Previous Section: Network Interface Management Table Of Contents Next Section: Network Services Management

23.5 com.nexenta.nms.Network::get_netmasks

(dictionary {string => string}) get_netmasks (void)

Get the list of netmasks configured on the NexentaStor appliance.

No parameters

Return Value

TYPE DESCRIPTION

dictionary {string => string} List of netmasks

Previous Section: Network Interface Management Table Of Contents Next Section: Network Services Management

23.6 com.nexenta.nms.Network::get_nmv_props

(dictionary {string => string}) get_nmv_props (void)

Get the list of the Nexenta Management View (NMV) properties

No parameters

Return Value

TYPE DESCRIPTION

dictionary {string => string} Dictionary: { 'site' => '', 'mode' => '', 'port' => '' }

Previous Section: Network Interface Management Table Of Contents Next Section: Network Services Management 23.7 com.nexenta.nms.Network::get_nmv_url

(string) get_nmv_url (void)

Get the Nexenta Management View (NMV) URL for the appliance.

No parameters

Return Value

TYPE DESCRIPTION

string NMV URL

Previous Section: Network Interface Management Table Of Contents Next Section: Network Services Management

23.8 com.nexenta.nms.Network::get_routes

(dictionary {string => dictionary {string => string}}) get_routes (void)

Get all routes.

No parameters

Return Value

TYPE DESCRIPTION

dictionary {string => dictionary List of all available routes. Parameters: destination | netmask | gateway | device {string => string}} | mtu | ref | flags | use | fwd.

Previous Section: Network Interface Management Table Of Contents Next Section: Network Services Management

23.9 com.nexenta.nms.Network::host_to_ipaddr

(string) host_to_ipaddr (string host)

Get the IP address by hosname

Parameters

NAME TYPE DESCRIPTION

host string Hostname

Return Value

TYPE DESCRIPTION

string IP address

Previous Section: Network Interface Management Table Of Contents Next Section: Network Services Management 23.10 com.nexenta.nms.Network::is_port_free

(string) is_port_free (string port)

Verify that the specified port is free

Parameters

NAME TYPE DESCRIPTION

port string Port

Return Value

TYPE DESCRIPTION

string return = 1 | 0, 1 - free, 0 - busy

Previous Section: Network Interface Management Table Of Contents Next Section: Network Services Management

23.11 com.nexenta.nms.Network::nameservers

(string, string, string) nameservers (void)

Get name servers.

No parameters

Return Value

TYPE DESCRIPTION

string IP address for DNS 1 string IP address for DNS 2 string IP address for DNS 3

See Also

Method Short Description

com.nexenta.nms.Appliance::set_etchosts_rec Add, replace or delete a record from the appliance's local ... com.nexenta.nms.Appliance::get_etchosts_rec Get the record from the appliance's local host table for ... com.nexenta.nms.Network::set_nameservers Set the name servers. Appliance may have up to 3 ...

Previous Section: Network Interface Management Table Of Contents Next Section: Network Services Management

23.12 com.nexenta.nms.Network::primary

(string) primary (void)

Get the primary network interface.

No parameters

Return Value TYPE DESCRIPTION

string Name of the primary network interface

Previous Section: Network Interface Management Table Of Contents Next Section: Network Services Management

23.13 com.nexenta.nms.Network::remote_ipaddr_to_local_dev

(dictionary {string => dictionary {string => string}}) remote_ipaddr_to_local_dev (array of (string) ip-addr)

Map a remote IP address to a local NIC for Auto-Sync multipathing.

Parameters

NAME TYPE DESCRIPTION

ip-addr array of (string) List of IP addresses on the remote NexentaStor appliance.

Return Value

TYPE DESCRIPTION

dictionary {string => Returns a hash with the key 'IP address' from the list of remote IP addresses and the value dictionary {string => consists of two parameters: 'device' - name of the NIC and 'type' - type of the NIC. string}}

Previous Section: Network Interface Management Table Of Contents Next Section: Network Services Management

23.14 com.nexenta.nms.Network::set_gateway

(void) set_gateway (string gateway)

Set the appliance's default gateway.

Parameters

NAME TYPE DESCRIPTION

gateway string Default gateway

No return values

Previous Section: Network Interface Management Table Of Contents Next Section: Network Services Management

23.15 com.nexenta.nms.Network::set_nameservers

(void) set_nameservers (string dns1, string dns2, string dns3)

Set the name servers. Appliance may have up to 3 configured name servers. Empty string indicates that the corresponding name server is not being specified.

Parameters NAME TYPE DESCRIPTION

dns1 string IP address of the name server 1. dns2 string IP address of the name server 2. dns3 string IP address of the name server 3.

No return values

Usage Examples

3. set_nameservers('192.168.1.1', '', '')

Specify a single name server for IP address '192.168.1.1'.

See Also

Method Short Description

com.nexenta.nms.Appliance::set_etchosts_rec Add, replace or delete a record from the appliance's local ... com.nexenta.nms.Appliance::get_etchosts_rec Get the record from the appliance's local host table for ... com.nexenta.nms.Network::nameservers Get name servers.

Previous Section: Network Interface Management Table Of Contents Next Section: Network Services Management

23.16 com.nexenta.nms.Network::set_netmasks

(void) set_netmasks (dictionary {string => string} name, dictionary {string => string} netmask)

Set netmasks on the NexentaStor appliance,

Parameters

NAME TYPE DESCRIPTION

name dictionary {string => string} Subnet netmask dictionary {string => string} Netmask

No return values

Previous Section: Network Interface Management Table Of Contents Next Section: Network Services Management

23.17 com.nexenta.nms.Network::set_nmv_props

(void) set_nmv_props (dictionary {string => string} new_props)

Set the NMV specific properties

Parameters

NAME TYPE DESCRIPTION

new_props dictionary {string => string} Dictionary: { 'site' => '', 'mode' => '', 'port' => '' } No return values

Previous Section: Network Interface Management Table Of Contents Next Section: Network Services Management

23.18 com.nexenta.nms.Network::set_primary

(void) set_primary (string if_name)

Set the primary network interface.

Parameters

NAME TYPE DESCRIPTION

if_name string Name of interface to set as primary, for example: "eth0".

No return values

Previous Section: Network Interface Management Table Of Contents Next Section: Network Services Management

24 Network Services Management

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/Smf/NetworkService com.nexenta.nms.SmfNetworkService Service Management Facility (SMF) Virtual Container Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION

general/enabled string c svc.startd(1m): If value is set to true, the restarter tries to start the service, when all its dependencies are satisfied. If set to false, the service remains in the disabled state. info string wi General information about the object ipc_name string e Interface class name of the associated interface object name string ri The name of the object restarter/logfile string c A logfile of the service (filename). restarter/start_method_timestamp string c The start time of an SMF service restarter/start_method_waitstatus string c not inherited restarter/start_pid string c The process identificator (PID) of an SMF service restarter/state string c svc.startd(1m): The current state. restarter/state_timestamp string c svc.startd(1m): The time when the current state was reached.

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Smf::clear ['string'], [] com.nexenta.nms.Container::destroy ['string', 'string'], [] com.nexenta.nms.Smf::disable ['string'], [] com.nexenta.nms.Smf::enable ['string'], [] com.nexenta.nms.Container::get_child_prop ['string', 'string'], ['string'] com.nexenta.nms.Container::get_child_props ['string', 'string'], [['dict', 'string', 'string']] com.nexenta.nms.Smf::get_logfile ['string'], ['string'] com.nexenta.nms.Container::get_names ['string'], [['array', 'string']] com.nexenta.nms.Container::get_names_by_prop ['string', 'string', 'string'], [['array', 'string']] com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Smf::get_state ['string'], ['string'] com.nexenta.nms.Container::object_exists ['string'], ['bool'] com.nexenta.nms.Smf::reread_config ['string'], [] com.nexenta.nms.Smf::restart ['string'], [] com.nexenta.nms.Container::set_child_prop ['string', 'string', 'string'], [] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Container::trylock ['string', 'int32'], ['bool'] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Container::unlock ['string', 'int32'], [] com.nexenta.nms.Object::unlock_self ['int32'], [] com.nexenta.nms.Smf::wait_for ['string', 'string', 'int32'], ['bool']

24.1 com.nexenta.nms.SmfNetworkService::confcheck

(dictionary {string => string}) confcheck (string name)

Check service state and configuration

Parameters

NAME TYPE DESCRIPTION

name string Network service name

Return Value

TYPE DESCRIPTION

dictionary {string Dictionary that describes the current service state: status - check result: passed OK or failed => string} message - additional information on current service state

Previous Section: Network Management Table Of Contents Next Section: Network Storage Service

24.2 com.nexenta.nms.SmfNetworkService::get_conffiles_

(dictionary {string => string}) get_conffiles_ (string name)

List of service configuration files

Parameters

NAME TYPE DESCRIPTION name string Network service name

Return Value

TYPE DESCRIPTION

dictionary {string List of service configuration files and their descriptions in a form of 'Full path to a configuration => string} file' => 'Configuration file description'

Previous Section: Network Management Table Of Contents Next Section: Network Storage Service

24.3 com.nexenta.nms.SmfNetworkService::get_confmethods

(array of (string)) get_confmethods (string name)

The list of the available network service methods

Parameters

NAME TYPE DESCRIPTION

name string Service name

Return Value

TYPE DESCRIPTION

array of (string) Returns the list of available methods

Previous Section: Network Management Table Of Contents Next Section: Network Storage Service

24.4 com.nexenta.nms.SmfNetworkService::get_confmethods_desc

(dictionary {string => dictionary {string => string}}) get_confmethods_desc (string name)

Get the list of the available network service methods and their descriptions

Parameters

NAME TYPE DESCRIPTION

name string Service name

Return Value

TYPE DESCRIPTION

dictionary {string => dictionary {string => string}} Returns the list of available methods and their descriptions

Previous Section: Network Management Table Of Contents Next Section: Network Storage Service

24.5 com.nexenta.nms.SmfNetworkService::get_confopts

(dictionary {string => dictionary {string => string}}) get_confopts (string name, string method_name) Returns the list of possible commands for setting up the current network service

Parameters

NAME TYPE DESCRIPTION

name string The name of the Network service method_name string The name of the method

Return Value

TYPE DESCRIPTION

dictionary {string => dictionary {string => string}} Returns the current settings

Previous Section: Network Management Table Of Contents Next Section: Network Storage Service

24.6 com.nexenta.nms.SmfNetworkService::get_logfiles_

(dictionary {string => string}) get_logfiles_ (string name)

List of service log files

Parameters

NAME TYPE DESCRIPTION

name string The name of the Network service

Return Value

TYPE DESCRIPTION

dictionary {string => List of service log files and their descriptions in a form of 'Full path to a log file' => 'Log file string} description

Previous Section: Network Management Table Of Contents Next Section: Network Storage Service

24.7 com.nexenta.nms.SmfNetworkService::get_smbadmlist

(dictionary {string => dictionary {string => string}}) get_smbadmlist (string name)

Returns information about the current workgroup or domain

Parameters

NAME TYPE DESCRIPTION

name string The name of the Network service

Return Value

TYPE DESCRIPTION

dictionary {string => dictionary {string => string}} List of current workgroups/domains with their properties

Previous Section: Network Management Table Of Contents Next Section: Network Storage Service 24.8 com.nexenta.nms.SmfNetworkService::set_confopts

(void) set_confopts (string name, string method, dictionary {string => string} not set)

Setup configuration method.

Parameters

NAME TYPE DESCRIPTION

name string The name of the Network service method string Method name not set dictionary {string => string} List of new method settings

No return values

Previous Section: Network Management Table Of Contents Next Section: Network Storage Service

25 Network Storage Service

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/NetworkStorageService com.nexenta.nms.NetworkStorageService Virtual Container Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION

info string wi General information about the object ipc_name string e Interface class name of the associated interface object name string ri The name of the object shortname string c Short name for network storage service

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Container::destroy ['string', 'string'], [] com.nexenta.nms.Container::get_child_prop ['string', 'string'], ['string'] com.nexenta.nms.Container::get_child_props ['string', 'string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::get_names ['string'], [['array', 'string']] com.nexenta.nms.Container::get_names_by_prop ['string', 'string', 'string'], [['array', 'string']] com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::object_exists ['string'], ['bool'] com.nexenta.nms.Container::set_child_prop ['string', 'string', 'string'], [] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Container::trylock ['string', 'int32'], ['bool'] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Container::unlock ['string', 'int32'], [] com.nexenta.nms.Object::unlock_self ['int32'], []

25.1 com.nexenta.nms.NetworkStorageService::get_share_confopts

(dictionary {string => dictionary {string => string}}) get_share_confopts (string fmri)

Get the static configuration options associated with the specified storage access protocol. These are the options that are the default paramters for all shares, unless specifically overridden.

Parameters

NAME TYPE DESCRIPTION

fmri string The name of the service: fmri = 'svc:/network/smb/server:default' | 'svc:/network/rsync:default' | 'svc:/network/nfs/server:default' | 'svc:/network/ftp:default' | 'svc:/network/apache2:default'. The service => fmri mapping is as follows: 'cifs' => 'svc:/network/smb/server:default', 'rsync' => 'svc:/network/rsync:default', 'nfs' => 'svc:/network/nfs/server:default', 'ftp' => 'svc:/network/ftp:default', 'webdav' => 'svc:/network/apache2:default'

Return Value

TYPE DESCRIPTION

dictionary {string => dictionary {string => string}} Hash: key => value

Usage Examples

3. get_share_confopts('svc:/network/rsync:default', 'vol1/a')

This fetches rsync-specific (default) sharing options, including 'port', 'max_connections', 'read_only'.

See Also

Method Short Description

com.nexenta.nms.NetworkStorageService::get_shareopts Get configuration options associated with the specified share

com.nexenta.nms.NetworkStorageService::share_folder Share the specified folder using the specified storage access protocol ...

com.nexenta.nms.NetworkStorageService::unshare_folder Unshare the specified folder from access using the specified storage ...

com.nexenta.nms.NetworkStorageService::is_folder_shared Find out whether the specified folder is shared using the ...

com.nexenta.nms.NetworkStorageService::get_shared_folders Get all folders that are shared using the specified storage ...

com.nexenta.nms.NetworkStorageService::unshare_all Unshare the specified folder globally, as far as all or ...

Previous Section: Network Services Management Table Of Contents Next Section: Nexenta Management Server

25.2 com.nexenta.nms.NetworkStorageService::get_shared_folders

(array of (string)) get_shared_folders (string fmri, string pattern)

Get all folders that are shared using the specified storage access protocol and match the specified pattern Parameters

NAME TYPE DESCRIPTION

fmri string The name of the service: fmri = 'svc:/network/smb/server:default' | 'svc:/network/rsync:default' | 'svc:/network/nfs/server:default' | 'svc:/network/ftp:default' | 'svc:/network/apache2:default'. The service => fmri mapping is as follows: 'cifs' => 'svc:/network/smb/server:default', 'rsync' => 'svc:/network/rsync:default', 'nfs' => 'svc:/network/nfs/server:default', 'ftp' => 'svc:/network/ftp:default', 'webdav' => 'svc:/network/apache2:default'

pattern string Pattern to select a subset of folders. An empty string matches all folders

Return Value

TYPE DESCRIPTION

array of (string) List of shared folders according to specified parameters

Usage Examples

3. get_shared_folders('svc:/network/nfs/server:default', '')

Get all NFS shares. The result may look like: ('vol1/a', 'vol1/a/b', 'vol2/foo')

6. get_shared_folders('svc:/network/nfs/server:default', '^vol1')

Get all NFS shares with names that start with "vol1"

See Also

Method Short Description

com.nexenta.nms.NetworkStorageService::get_shareopts Get configuration options associated with the specified share

com.nexenta.nms.NetworkStorageService::share_folder Share the specified folder using the specified storage access protocol ...

com.nexenta.nms.NetworkStorageService::unshare_folder Unshare the specified folder from access using the specified storage ...

com.nexenta.nms.NetworkStorageService::is_folder_shared Find out whether the specified folder is shared using the ...

com.nexenta.nms.NetworkStorageService::get_share_confopts Get the static configuration options associated with the specified storage ...

com.nexenta.nms.NetworkStorageService::unshare_all Unshare the specified folder globally, as far as all or ...

Previous Section: Network Services Management Table Of Contents Next Section: Nexenta Management Server

25.3 com.nexenta.nms.NetworkStorageService::get_shareopts

(dictionary {string => string}) get_shareopts (string fmri, string zname)

Get configuration options associated with the specified share

Parameters

NAME TYPE DESCRIPTION

fmri string The name of the service: fmri = 'svc:/network/smb/server:default' | 'svc:/network/rsync:default' | 'svc:/network/nfs/server:default' | 'svc:/network/ftp:default' | 'svc:/network/apache2:default'. The service => fmri mapping is as follows: 'cifs' => 'svc:/network/smb/server:default', 'rsync' => 'svc:/network/rsync:default', 'nfs' => 'svc:/network/nfs/server:default', 'ftp' => 'svc:/network/ftp:default', 'webdav' => 'svc:/network/apache2:default'

zname string The name of the folder

Return Value

TYPE DESCRIPTION

dictionary {string => string} List of properties in a form of hash: key => value

Usage Examples

3. get_shareopts('svc:/network/rsync:default', 'vol1/a')

Returns the rsync sharing options including the defaults, unless they have been overridden - see com.nexenta.nms.NetworkStorageService::get_share_confopts. A sample result: 'name', 'comment', 'use_chroot', 'readonly', 'writeonly', 'allow_hosts', 'deny_hosts'

See Also

Method Short Description

com.nexenta.nms.NetworkStorageService::get_share_confopts Get the static configuration options associated with the specified storage ...

com.nexenta.nms.NetworkStorageService::share_folder Share the specified folder using the specified storage access protocol ...

com.nexenta.nms.NetworkStorageService::unshare_folder Unshare the specified folder from access using the specified storage ...

com.nexenta.nms.NetworkStorageService::is_folder_shared Find out whether the specified folder is shared using the ...

com.nexenta.nms.NetworkStorageService::get_shared_folders Get all folders that are shared using the specified storage ...

com.nexenta.nms.NetworkStorageService::unshare_all Unshare the specified folder globally, as far as all or ...

Previous Section: Network Services Management Table Of Contents Next Section: Nexenta Management Server

25.4 com.nexenta.nms.NetworkStorageService::get_smf_netserv_services

(array of (string)) get_smf_netserv_services (void)

Get the list of SMF network services that has any status, except 'error'.

No parameters

Return Value

TYPE DESCRIPTION

array of (string) List of SMF network services

Previous Section: Network Services Management Table Of Contents Next Section: Nexenta Management Server

25.5 com.nexenta.nms.NetworkStorageService::is_folder_shared (bool) is_folder_shared (string fmri, string zname)

Find out whether the specified folder is shared using the specified storage access protocol

Parameters

NAME TYPE DESCRIPTION

fmri string The name of the service: fmri = 'svc:/network/smb/server:default' | 'svc:/network/rsync:default' | 'svc:/network/nfs/server:default' | 'svc:/network/ftp:default' | 'svc:/network/apache2:default'. The service => fmri mapping is as follows: 'cifs' => 'svc:/network/smb/server:default', 'rsync' => 'svc:/network/rsync:default', 'nfs' => 'svc:/network/nfs/server:default', 'ftp' => 'svc:/network/ftp:default', 'webdav' => 'svc:/network/apache2:default'

zname string The name of the folder

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - shared, 0 - not shared

Usage Examples

3. is_folder_shared('svc:/network/smb/server:default', 'vol1/a')

Determine whether 'vol1/a' is shared using CIFS.

See Also

Method Short Description

com.nexenta.nms.NetworkStorageService::get_shareopts Get configuration options associated with the specified share

com.nexenta.nms.NetworkStorageService::share_folder Share the specified folder using the specified storage access protocol ...

com.nexenta.nms.NetworkStorageService::unshare_folder Unshare the specified folder from access using the specified storage ...

com.nexenta.nms.NetworkStorageService::get_share_confopts Get the static configuration options associated with the specified storage ...

com.nexenta.nms.NetworkStorageService::get_shared_folders Get all folders that are shared using the specified storage ...

com.nexenta.nms.NetworkStorageService::unshare_all Unshare the specified folder globally, as far as all or ...

Previous Section: Network Services Management Table Of Contents Next Section: Nexenta Management Server

25.6 com.nexenta.nms.NetworkStorageService::share_folder

(void) share_folder (string fmri, string zname, dictionary {string => string} options)

Share the specified folder using the specified storage access protocol

Parameters

NAME TYPE DESCRIPTION

fmri string The name of the service: fmri = 'svc:/network/smb/server:default' | 'svc:/network/rsync:default' | 'svc:/network/nfs/server:default' | 'svc:/network/ftp:default' | 'svc:/network/apache2:default'. The service => fmri mapping is as follows: 'cifs' => 'svc:/network/smb/server:default', 'rsync' => 'svc:/network/rsync:default', 'nfs' => 'svc:/network/nfs/server:default', 'ftp' => 'svc:/network/ftp:default', 'webdav' => 'svc:/network/apache2:default' zname string The name of the folder options dictionary dictionary { name => value } specifying the sharing options. Use {string com.nexenta.nms.NetworkStorageService::get_shareopts to read existing sharing options => string}

No return values

Usage Examples

3. share_folder('svc:/network/smb/server:default', 'vol1/a', {})

Share folder 'vol1/a' using CIFS.

See Also

Method Short Description

com.nexenta.nms.NetworkStorageService::get_shareopts Get configuration options associated with the specified share

com.nexenta.nms.NetworkStorageService::get_share_confopts Get the static configuration options associated with the specified storage ...

com.nexenta.nms.NetworkStorageService::unshare_folder Unshare the specified folder from access using the specified storage ...

com.nexenta.nms.NetworkStorageService::is_folder_shared Find out whether the specified folder is shared using the ...

com.nexenta.nms.NetworkStorageService::get_shared_folders Get all folders that are shared using the specified storage ...

com.nexenta.nms.NetworkStorageService::unshare_all Unshare the specified folder globally, as far as all or ...

Previous Section: Network Services Management Table Of Contents Next Section: Nexenta Management Server

25.7 com.nexenta.nms.NetworkStorageService::smf_netserv_status

(string) smf_netserv_status (string name)

Get the status of SMF network services.

Parameters

NAME TYPE DESCRIPTION

name string Name of a

Return Value

TYPE DESCRIPTION

string The status of the network service. The list of statuses include: 'UNINITIALIZED' 'MAINTENANCE' 'DISABLED' 'DEGRADED' 'ONLINE' 'OFFLINE' 'LEGACY-RUN' 'ERROR'

Previous Section: Network Services Management Table Of Contents Next Section: Nexenta Management Server

25.8 com.nexenta.nms.NetworkStorageService::unshare_all (void) unshare_all (string zname, array of (string) services)

Unshare the specified folder globally, as far as all or some existing sharing methods are concerned. The list of networking storage services that can be used to share folders include: 'cifs','nfs', 'rsync', 'ftp', 'webdav', 'samba'.

Parameters

NAME TYPE DESCRIPTION

zname string The name of the folder

services array of Array of network service names including one or more names from the following list: 'cifs','nfs', (string) 'rsync', 'ftp', 'webdav', 'samba'. Example: services = ('cifs', 'nfs')

No return values

Usage Examples

3. unshare_all('vol1/a', ('ftp', 'webdav')) unshare 'vol1/a' from accessing via ftp and webdav

See Also

Method Short Description

com.nexenta.nms.NetworkStorageService::get_shareopts Get configuration options associated with the specified share

com.nexenta.nms.NetworkStorageService::share_folder Share the specified folder using the specified storage access protocol ...

com.nexenta.nms.NetworkStorageService::unshare_folder Unshare the specified folder from access using the specified storage ...

com.nexenta.nms.NetworkStorageService::is_folder_shared Find out whether the specified folder is shared using the ...

com.nexenta.nms.NetworkStorageService::get_shared_folders Get all folders that are shared using the specified storage ...

com.nexenta.nms.NetworkStorageService::get_share_confopts Get the static configuration options associated with the specified storage ...

Previous Section: Network Services Management Table Of Contents Next Section: Nexenta Management Server

25.9 com.nexenta.nms.NetworkStorageService::unshare_folder

(bool) unshare_folder (string fmri, string zname, bool recursive)

Unshare the specified folder from access using the specified storage access protocol. This operation reverses the results of execution of com.nexenta.nms.NetworkStorageService::share_folder. Use com.nexenta.nms.NetworkStorageService::unshare_all to unshare the specified folder from accessing using the multiple storage access methods

Parameters

NAME TYPE DESCRIPTION

fmri string The name of the service: fmri = 'svc:/network/smb/server:default' | 'svc:/network/rsync:default' | 'svc:/network/nfs/server:default' | 'svc:/network/ftp:default' | 'svc:/network/apache2:default'. The service => fmri mapping is as follows: 'cifs' => 'svc:/network/smb/server:default', 'rsync' => 'svc:/network/rsync:default', 'nfs' => 'svc:/network/nfs/server:default', 'ftp' => 'svc:/network/ftp:default', 'webdav' => 'svc:/network/apache2:default' zname string The name of the folder recursive bool recursive = 0 | 1. If true (non-zero), recursively unshares all descendent sub-folders

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - success, 0 - failed

Usage Examples

3. unshare_folder('svc:/network/smb/server:default', 'vol1/a', 0)

Remove CIFS share 'vol1/a'

6. unshare_folder('svc:/network/nfs/server:default', 'vol1/a', 0)

Unshare NFS folder 'vol1/a' and its sub-folders

See Also

Method Short Description

com.nexenta.nms.NetworkStorageService::get_shareopts Get configuration options associated with the specified share

com.nexenta.nms.NetworkStorageService::share_folder Share the specified folder using the specified storage access protocol ...

com.nexenta.nms.NetworkStorageService::get_share_confopts Get the static configuration options associated with the specified storage ...

com.nexenta.nms.NetworkStorageService::is_folder_shared Find out whether the specified folder is shared using the ...

com.nexenta.nms.NetworkStorageService::get_shared_folders Get all folders that are shared using the specified storage ...

com.nexenta.nms.NetworkStorageService::unshare_all Unshare the specified folder globally, as far as all or ...

Previous Section: Network Services Management Table Of Contents Next Section: Nexenta Management Server

26 Nexenta Management Server

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/Server com.nexenta.nms.Server Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION

info string wi General information about the object

ipc_name string e Interface class name of the associated interface object

name string ri The name of the object

Inherited Methods NAME PROTOTYPE

com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Object::unlock_self ['int32'], []

26.1 com.nexenta.nms.Server::append_log

(void) append_log (string title, array of (string) lines)

Add lines to Server log

Parameters

NAME TYPE DESCRIPTION

title string The title of specified log block lines array of (string) Lines of log block

No return values

Previous Section: Network Storage Service Table Of Contents Next Section: Plugin

26.2 com.nexenta.nms.Server::event_broadcast

(void) event_broadcast (dictionary {string => string} props)

Create event broadcast message

Parameters

NAME TYPE DESCRIPTION

props dictionary {string => string} Possible parameters are: {'type' => '', 'name' => '', 'fqdn' => '', 'time' => ''}

No return values

Previous Section: Network Storage Service Table Of Contents Next Section: Plugin

26.3 com.nexenta.nms.Server::fma_event_callback

(void) fma_event_callback (string event)

Passthrough fma event to report a fault

Parameters

NAME TYPE DESCRIPTION event string Returns the parameters: { 'source' => '', 'uuid' => '', 'problem_in' => '', 'affects' => '', 'fru' => '', 'location' => '', }

No return values

Previous Section: Network Storage Service Table Of Contents Next Section: Plugin

26.4 com.nexenta.nms.Server::get_const

(string) get_const (string name)

Get predefined system constants

Parameters

NAME TYPE DESCRIPTION

name string The format of a constant name is ::.

Return Value

TYPE DESCRIPTION

string Value of a specified constant

Previous Section: Network Storage Service Table Of Contents Next Section: Plugin

26.5 com.nexenta.nms.Server::get_extended_lock_info

(dictionary {string => array of (string)}) get_extended_lock_info (void)

Get an extended lock information.

No parameters

Return Value

TYPE DESCRIPTION

dictionary {string => array Table which contains information about the clients (for example NMV or NMC), such as PID, of (string)} name and time of client's registration

Previous Section: Network Storage Service Table Of Contents Next Section: Plugin

26.6 com.nexenta.nms.Server::get_locks

(dictionary {string => dictionary {string => array of (string)}}) get_locks (void)

Get all existing NMS locks.

No parameters

Return Value TYPE DESCRIPTION

dictionary {string => dictionary {string => Table with the current locks, which contains the following parameters: array of (string)}} lock_id, caller, lock_type, timestamp

Previous Section: Network Storage Service Table Of Contents Next Section: Plugin

26.7 com.nexenta.nms.Server::get_reply_timeout

(int32) get_reply_timeout (void)

Get Nexenta Management Server D-Bus reply timeout.

No parameters

Return Value

TYPE DESCRIPTION

int32 NMS D-Bus timeout value.

Previous Section: Network Storage Service Table Of Contents Next Section: Plugin

26.8 com.nexenta.nms.Server::is_locked_by_client

(bool) is_locked_by_client (string client_name, int32 client_pid)

Check if Server is locked by client

Parameters

NAME TYPE DESCRIPTION

client_name string Client name client_pid int32 Client PID

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - locked, 0 - not locked

Previous Section: Network Storage Service Table Of Contents Next Section: Plugin

26.9 com.nexenta.nms.Server::list_props

(dictionary {string => array of (string)}) list_props (void)

Get all NMS properties (name, value pairs) and their descriptions.

No parameters

Return Value TYPE DESCRIPTION

dictionary {string => array of (string)} List of NMS properties with descriptions

Previous Section: Network Storage Service Table Of Contents Next Section: Plugin

26.10 com.nexenta.nms.Server::nmdtrace_status

(string) nmdtrace_status (void)

Get the status of the Nexenta DTrace statistic service.

No parameters

Return Value

TYPE DESCRIPTION

string Status of the Nexenta DTrace service

Previous Section: Network Storage Service Table Of Contents Next Section: Plugin

26.11 com.nexenta.nms.Server::register_local_client

(int32) register_local_client (string client_name, int32 client_pid)

Register a local NMS client - an external local process that uses SA-API.

Parameters

NAME TYPE DESCRIPTION

client_name string Name of a local process.

client_pid int32 Process Identificator (PID).

Return Value

TYPE DESCRIPTION

int32 Nexenta Management Server client Process Identificator (PID).

Previous Section: Network Storage Service Table Of Contents Next Section: Plugin

26.12 com.nexenta.nms.Server::reread_config

(void) reread_config (void)

Re-read server configuration.

No parameters

No return values Previous Section: Network Storage Service Table Of Contents Next Section: Plugin

26.13 com.nexenta.nms.Server::restart_nmcd

(void) restart_nmcd (void)

Restart Nexenta Management Console daemon.

No parameters

No return values

Previous Section: Network Storage Service Table Of Contents Next Section: Plugin

26.14 com.nexenta.nms.Server::restart_nmdtrace

(void) restart_nmdtrace (void)

Restart Nexenta DTrace daemon. Nexenta DTrace Service is a daemon which creates and manages D-script sessions, and adds statistic information to SQL databases.

No parameters

No return values

Previous Section: Network Storage Service Table Of Contents Next Section: Plugin

26.15 com.nexenta.nms.Server::set_reply_timeout

(void) set_reply_timeout (int32 timeout)

Set the reply timeout for Nexenta Management Server D-Bus.

Parameters

NAME TYPE DESCRIPTION

timeout int32 Timeout in seconds.

No return values

Usage Examples

3. set_reply_timeout(20)

Sets the reply timeout to 20 seconds.

Previous Section: Network Storage Service Table Of Contents Next Section: Plugin 26.16 com.nexenta.nms.Server::unregister_local_client

(void) unregister_local_client (string client_name, int32 client_pid)

Unregister a local NMS client.

Parameters

NAME TYPE DESCRIPTION

client_name string Name of the local process. client_pid int32 Process identiificator (PID).

No return values

Previous Section: Network Storage Service Table Of Contents Next Section: Plugin

27 Plugin

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/Plugin com.nexenta.nms.Plugin Virtual Container Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION

author string c Author of the plugin. classname string c TODO description string c Describes the plugin function. group string c Group that the plugin belongs to. A group may consist of multiple plugins. group_master string c The master plugin in the group (usually the NMS component) to which the plugin belongs. info string wi General information about the object ipc_multi string c Indicates that the plugin publishes more than a single D-Bus interface. For instance , SCSI Target plugin provides the following interfaces: '/Root/Stmf', '/Root/Stmf/ScsiDisk', '/Root/Stmf/IscsiTarget', '/Root/Stmf/FcTarget'. ipc_name string e Interface class name of the associated interface object ipc_path string c D-Bus name of this plugin interface, eg.: '/Root/Stmf' , '/Root/AutoCdp', '/Root/SimpleFailover'. The generic com.nexenta.nms.Plugin interface itself has D-Bus name (aka "ipc_path") '/Root/Plugin'. ipc_srvpool string c Define if specified plugin can work with Server Pool ipc_suffix string c The suffix of the IPC plugin. license string c The license under which the plugin is released. Ex: 'CDDL'

loader string c The subroutine in the main plugin module to be called when the plugin is loaded.

name string ri The name of the object

plugindir string c Directory the plugin is installed in.

size string c Size of the plugin in bytes.

type string c Type of the plugin version string c The version of the plugin Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Container::destroy ['string', 'string'], [] com.nexenta.nms.Container::get_child_prop ['string', 'string'], ['string'] com.nexenta.nms.Container::get_child_props ['string', 'string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::get_names ['string'], [['array', 'string']] com.nexenta.nms.Container::get_names_by_prop ['string', 'string', 'string'], [['array', 'string']] com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::object_exists ['string'], ['bool'] com.nexenta.nms.Container::set_child_prop ['string', 'string', 'string'], [] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Container::trylock ['string', 'int32'], ['bool'] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Container::unlock ['string', 'int32'], [] com.nexenta.nms.Object::unlock_self ['int32'], []

27.1 com.nexenta.nms.Plugin::get_group_names

(array of (string)) get_group_names (string pattern)

Get the array of all, or filtered group names.

Parameters

NAME TYPE DESCRIPTION

pattern string Optional string that specifies the pattern to filter the result.

Return Value

TYPE DESCRIPTION

array of (string) List of all group names

Usage Examples

3. get_group_names()

Returns all group names

6. get_group_names('benchmark')

Returns all group names with the 'benchmark' in their name.

Previous Section: Nexenta Management Server Table Of Contents Next Section: Reporting Facility (Services, Performance, Capacity) 27.2 com.nexenta.nms.Plugin::get_group_plugins

(array of (string)) get_group_plugins (string groupname)

Get the list of all plugins in a group

Parameters

NAME TYPE DESCRIPTION

groupname string A string that specifies the group

Return Value

TYPE DESCRIPTION

array of (string) List of plugins in a group

Usage Examples

3. plugins_in_group=get_group_plugins('delorean')

Returns all plugins that belong to group 'delorean'

Previous Section: Nexenta Management Server Table Of Contents Next Section: Reporting Facility (Services, Performance, Capacity)

27.3 com.nexenta.nms.Plugin::get_group_props

(dictionary {string => string}) get_group_props (string groupname, string pattern)

Get the dictionary with all the properties of a group, or optionally only properties that matches a pattern.

Parameters

NAME TYPE DESCRIPTION

groupname string String that specifies the plugin group. pattern string Optional string that specifies the pattern that filters the result.

Return Value

TYPE DESCRIPTION

dictionary {string => string} List of properties for the specified group in a form of hash: key => value

Usage Examples

3. mygroup_props=get_group_props('delorean')

Gets all the list of properties for gorup 'delorean'

6. mygroup_props_des=get_group_props('delorean','description')

Gets the 'description' property from 'delorean' group Previous Section: Nexenta Management Server Table Of Contents Next Section: Reporting Facility (Services, Performance, Capacity)

27.4 com.nexenta.nms.Plugin::get_ipc_info

(dictionary {string => array of (string)}) get_ipc_info (string plugin)

Get the interface dicitonary { ipc_name => (name, suffix)} for a given plugin.

Parameters

NAME TYPE DESCRIPTION

plugin string The name of the plugin object

Return Value

TYPE DESCRIPTION

dictionary {string => array of (string)} Hash: {ipc_path => array [ipc_name, ipc_suffix]}

Usage Examples

3. get_ipc_info('plugin')

Get the IPC information about the plugin.

Previous Section: Nexenta Management Server Table Of Contents Next Section: Reporting Facility (Services, Performance, Capacity)

27.5 com.nexenta.nms.Plugin::get_ipc_srvpool

(bool) get_ipc_srvpool (string plugin)

Determines if a specified plugin can work with Server Pool

Parameters

NAME TYPE DESCRIPTION

plugin string The name of the plugin object

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - can work, 0 - cannot work

Previous Section: Nexenta Management Server Table Of Contents Next Section: Reporting Facility (Services, Performance, Capacity)

27.6 com.nexenta.nms.Plugin::get_plugins_by_caps (array of (string)) get_plugins_by_caps (int32 capability)

Get all the plugins with required capability

Parameters

NAME TYPE DESCRIPTION

capability int32 Integer variable with capability bits set. Currently only PLUGIN_CAP_CONFIG_SYNC is defined, signifying configuration sync between applainces.

Return Value

TYPE DESCRIPTION

array of (string) List of plugins

Usage Examples

3. get_plugins_by_caps($NZA::PLUGIN_CAP_CONFIG_SYNC)

Returns the list of plugins, as array an of strings, for which has PLUGIN_CAP_CONFIG_SYNC set.

Previous Section: Nexenta Management Server Table Of Contents Next Section: Reporting Facility (Services, Performance, Capacity)

27.7 com.nexenta.nms.Plugin::get_restorable_plugins

(dictionary {string => string}) get_restorable_plugins (void)

Get all plugins, which can be restored from the saved configuration

No parameters

Return Value

TYPE DESCRIPTION

dictionary {string => List of plugins in a form of hash: key => value, where key is a plugin group, value is a string} description

Previous Section: Nexenta Management Server Table Of Contents Next Section: Reporting Facility (Services, Performance, Capacity)

27.8 com.nexenta.nms.Plugin::list_remote_

(dictionary {string => dictionary {string => string}}) list_remote_ (string plugintype, bool grouponly, bool skip_installed)

Get { plugin => plugin_properties } dictionary of all available plugins.

Parameters

NAME TYPE DESCRIPTION

plugintype string Optional string that specifies the type of packages to return. Can be among (NMS_PLUGIN_TYPE_NMS | NMS_PLUGIN_TYPE_NMC | NMS_PLUGIN_TYPE_NMV)

grouponly bool Optional parameter that you can specify if you want to receive the information about the groups. skip_installed bool Optional parameter, that you can specifiy if you want to skip the versions.

Return Value

TYPE DESCRIPTION

dictionary {string => List of remotely-available plugins in a form of hash: key => value, whre key is the name of the dictionary {string => plugin package, and the value is a hash of various parameters, such as 'name', 'group', string}} 'group_master', 'version', 'size, 'type', 'description''

Usage Examples

3. list_remote()

Get the dictionary of plugins and their properties.

6. listremote(NMS_PLUGIN_TYPE_NMS)

Get the dictionary of of plugions and properties of all NMS plugins.

Previous Section: Nexenta Management Server Table Of Contents Next Section: Reporting Facility (Services, Performance, Capacity)

27.9 com.nexenta.nms.Plugin::preinst_check

(struct) preinst_check (string plugin_name)

Plugin pre-installation verification, determines, if a reboot is required or apt-get error occured, and the output of the installation command.

Parameters

NAME TYPE DESCRIPTION

plugin_name string String that specifies the plugin that needs a pre-installation check.

Return Value

TYPE DESCRIPTION

struct Output of the apt-get system utility

Usage Examples

3. preinst_check('myplugin')

Checks if installing 'myplugin' requires a reboot and returns an output of the backend apt-get install command.

Previous Section: Nexenta Management Server Table Of Contents Next Section: Reporting Facility (Services, Performance, Capacity)

27.10 com.nexenta.nms.Plugin::resolve_lun_to_services (array of (string)) resolve_lun_to_services (string lun_name)

Get the list of all services available for a given zvol.

Parameters

NAME TYPE DESCRIPTION

lun_name string String specifying the zvol.

Return Value

TYPE DESCRIPTION

array of (string) List of services

Usage Examples

3. resolve_lun_to_services('c2t0d0')

List of all services available on 'c2t0d0'.

Previous Section: Nexenta Management Server Table Of Contents Next Section: Reporting Facility (Services, Performance, Capacity)

27.11 com.nexenta.nms.Plugin::resolve_zfsname_to_services

(array of (string)) resolve_zfsname_to_services (string zname)

Get the list of services that run on a ZFS object.

Parameters

NAME TYPE DESCRIPTION

zname string String that specifies the zfs folder/volume name.

Return Value

TYPE DESCRIPTION

array of (string) List of services

Usage Examples

3. resolve_zfsname_to_services('vol1/a/b/c')

The list of all services that run on the zfs filesystem 'vol1/a/b/c'

Previous Section: Nexenta Management Server Table Of Contents Next Section: Reporting Facility (Services, Performance, Capacity)

28 Reporting Facility (Services, Performance, Capacity) SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/Runner/Reporter com.nexenta.nms.Reporter Virtual Runner Virtual Container Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION

flags string c flags = none = 0 | is_daemon = 1 | maintenance_on_max_fail = 2 | clear_old_faults = 4 | notify_on_first_fail = 8 | notify_never = 16 | schedule_never = 32 | schedule_later = 64. This creation time property defines the runner's behavior and is a bitwise combination of the listed enumerated values. For instance, flags = 3 indicates that the runner is a daemon and that when the maximum number of failures is reached, the runner changes the state to 'maintenance'. freq_day string wc The numeric value depends on the freq_type property. For the freq_type = 'weekly', the day of the week freq_day = 0 | 1 | 2 | 3 | 4 | 5 | 6. Days of the week are numbered as follows: 0 - 'Sun', 1 - 'Mon', 2 - 'Tue', 3 - 'Wed', 4 - 'Thu', 5 - 'Fri', 6 - 'Sat'. For the freq_type = 'monthly', the day of the month freq_day = 1 .. 31 freq_hour string wc freq_hour = 0 .. 23. Specifies the hour of a day. For example, freq_hour = 1 specifies 1am. freq_minute string wc freq_minute = 0 .. 59. Specifies the minute in an hour. For example, freq_minute = 30 specifies 30 minutes past a given hour. freq_period string wc freq_period = [1, max]. The maximum value depends on the freq_type. For example, if the freq_type is 'hourly', the freq_period may have any value in the range [1, 23], and if freq_type is 'monthly', the valid range is [1, 11], etc. freq_type string wc freq_type = 'minute' | 'hourly' | 'daily' | 'weekly' | 'monthly'. You set the period of execution in the units of freq_type. For example, if freq_type = 'hourly', you can schedule the runner every 1, .. or 23 hours. See related com.nexenta.nms.Runner::freq_period info string wi General information about the object ipc_name string e Interface class name of the associated interface object name string ri The name of the object period string c Human-readable description of the periodic runner's execution. The description effectively consolidates freq_type, freq_day and the rest frequency related properties into single human-readable string, for example: "every two hours", "every Saturday at 3am", "every 3rd day of each month at 12:45am", etc. state string c state = 'unknown' | 'ready' | 'running' | 'starting' | 'pending' | 'missing'. Under normal circumstances the runner's state is 'ready', or 'running' status string wc status = 'not-registered' | 'disabled' | 'enabled' | 'maintenance'. trace_level string wc trace_level = none = 0 | default = 1 | verbose = 10 | verbose-verbose = 20 | verbose- verbose-verbose. Specifies the levels of detail of the logging information for the runner, from 0 (none) to 20 (the most detailed). type string c type = 'trigger' | 'collector' | 'reporter' | 'indexer'

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Container::destroy ['string', 'string'], []

com.nexenta.nms.Runner::disable ['string'], [] com.nexenta.nms.Runner::enable ['string'], [] com.nexenta.nms.Runner::execute ['string'], []

com.nexenta.nms.Container::get_child_prop ['string', 'string'], ['string'] com.nexenta.nms.Container::get_child_props ['string', 'string'], [['dict', 'string', 'string']] com.nexenta.nms.Runner::get_init_params ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Runner::get_init_tunables ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::get_names ['string'], [['array', 'string']] com.nexenta.nms.Container::get_names_by_prop ['string', 'string', 'string'], [['array', 'string']] com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Runner::get_tunables ['string', 'string', 'bool'], [['dict', 'string', 'string']] com.nexenta.nms.Runner::is_registered ['string'], ['bool'] com.nexenta.nms.Container::object_exists ['string'], ['bool'] com.nexenta.nms.Runner::register ['string', ['dict', 'string', 'string'], ['dict', 'string', 'string']], [] com.nexenta.nms.Runner::reset ['string'], [] com.nexenta.nms.Container::set_child_prop ['string', 'string', 'string'], [] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Runner::set_tunable ['string', 'string', 'string'], [] com.nexenta.nms.Container::trylock ['string', 'int32'], ['bool'] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Container::unlock ['string', 'int32'], [] com.nexenta.nms.Object::unlock_self ['int32'], [] com.nexenta.nms.Runner::unregister ['string'], []

28.1 com.nexenta.nms.Reporter::send

(void) send (string reporter_name, dictionary {string => string} params)

Send a report to the general e-mail address

Parameters

NAME TYPE DESCRIPTION

reporter_name string The name of the reporter params dictionary {string => string} Parameters: { 'shortname' => '', 'description' => '', 'attachment-*' => ''}

No return values

Previous Section: Plugin Table Of Contents Next Section: SMTP Mailer

29 SMTP Mailer

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/Mailer com.nexenta.nms.Mailer Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION

info string wi General information about the object

ipc_name string e Interface class name of the associated interface object

name string ri The name of the object smtp_addresses string wi Destination e-mail address(es) separated by comma. This is the main e-mail address that the NexentaStor use to send the notifications and reports. smtp_addresses_faults string wi Destination e-mail address(es) for fault notifications separated by comma. Optional paramter. If you do not specify a separate e-mail address(es) for statistics, notification system sends the reports to deafault smtp_addresses. smtp_addresses_stats string wi Destination e-mail address(es) for statistic information separated by comma. Optional paramter. If you do not specify a separate e-mail address(es) for faults, notification system sends the reports to default smtp_addresses. smtp_auth string wi SMTP authentification protocol: Plain or SSL smtp_cc string wi E-mail address(es0 to which you want to send the copies of the reports and notifications. Optional parameter. smtp_from string wi E-mail address(es) of the NexentaStor Appliance. You receive the reports and notifications from this e-mail address, for example: [email protected] smtp_keep_time string wi smtp_max_size string wi smtp_password string wi SMTP login/user password smtp_server string wi SMTP server hostname or IPv4 address smtp_timeout string wi SMTP send timeout smtp_to string wi E-mail address on which you want to send the support e-mails. The default value is '[email protected]'. smtp_user string wi SMTP login/user

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Object::unlock_self ['int32'], []

29.1 com.nexenta.nms.Mailer::check_support_request_ready

(bool) check_support_request_ready (string from_email)

Check if the diagnostic logs are collected to be send to support

Parameters

NAME TYPE DESCRIPTION

from_email string Sender's e-mail

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - ready, 0 not ready

Previous Section: Reporting Facility (Services, Performance, Capacity) Table Of Contents Next Section: Service Account Management

29.2 com.nexenta.nms.Mailer::prepare_support_request

(void) prepare_support_request (string from_email, int32 level) Collect the diagnostic messages and prepare the support request

Parameters

NAME TYPE DESCRIPTION

from_email string Sender's e-mail level int32 There are five possible levels: 0 - none, 1 - minimum, 2 - typical (default), 3 - verbose, 4 - debug

No return values

Previous Section: Reporting Facility (Services, Performance, Capacity) Table Of Contents Next Section: Service Account Management

29.3 com.nexenta.nms.Mailer::save_support_request

(array of (string)) save_support_request (dictionary {string => string} props)

Save the support request in a specified folder

Parameters

NAME TYPE DESCRIPTION

props dictionary Properties: { 'company' => '', 'from_email' => '', 'save_to_dir' => '', 'top_category' => '', {string => 'sub_category' => '', 'subject' => '', 'level' => '', 'comment' => '' } string}

Return Value

TYPE DESCRIPTION

array of (string) The paths to saved support files

Previous Section: Reporting Facility (Services, Performance, Capacity) Table Of Contents Next Section: Service Account Management

29.4 com.nexenta.nms.Mailer::send_support_request

(bool) send_support_request (dictionary {string => string} props)

Prepare and send support request

Parameters

NAME TYPE DESCRIPTION

props dictionary {string Properties: { 'company' => '', 'from_email' => '', 'top_category' => '', 'sub_category' => '', => string} 'subject' => '', 'level' => '', 'comment' => '' }

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - success, 0 - not ready

Previous Section: Reporting Facility (Services, Performance, Capacity) Table Of Contents Next Section: Service Account Management 29.5 com.nexenta.nms.Mailer::send_test

(void) send_test (void)

Send test e-mail

No parameters

No return values

Previous Section: Reporting Facility (Services, Performance, Capacity) Table Of Contents Next Section: Service Account Management

30 Service Account Management

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/RemoteAppAccount com.nexenta.nms.RemoteAppAccount Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION

info string wi General information about the object ipc_name string e Interface class name of the associated interface object name string ri The name of the object

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Object::unlock_self ['int32'], []

31 Service Management Facility (SMF)

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/Smf com.nexenta.nms.Smf Virtual Container Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION

general/enabled string c svc.startd(1m): If value is set to true, the restarter tries to start the service, when all its dependencies are satisfied. If set to false, the service remains in the disabled state. info string wi General information about the object ipc_name string e Interface class name of the associated interface object name string ri The name of the object restarter/logfile string c A logfile of the service (filename). restarter/start_method_timestamp string c The start time of an SMF service restarter/start_method_waitstatus string c not inherited restarter/start_pid string c The process identificator (PID) of an SMF service restarter/state string c svc.startd(1m): The current state. restarter/state_timestamp string c svc.startd(1m): The time when the current state was reached.

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Container::destroy ['string', 'string'], [] com.nexenta.nms.Container::get_child_prop ['string', 'string'], ['string'] com.nexenta.nms.Container::get_child_props ['string', 'string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::get_names ['string'], [['array', 'string']] com.nexenta.nms.Container::get_names_by_prop ['string', 'string', 'string'], [['array', 'string']] com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::object_exists ['string'], ['bool'] com.nexenta.nms.Container::set_child_prop ['string', 'string', 'string'], [] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Container::trylock ['string', 'int32'], ['bool'] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Container::unlock ['string', 'int32'], [] com.nexenta.nms.Object::unlock_self ['int32'], []

31.1 com.nexenta.nms.Smf::clear

(void) clear (string fmri)

Clear maintaince state of a service

Parameters

NAME TYPE DESCRIPTION

fmri string The name of the service

No return values

Previous Section: Service Account Management Table Of Contents Next Section: Snapshot Management

31.2 com.nexenta.nms.Smf::disable (void) disable (string fmri)

Disable an SMF service

Parameters

NAME TYPE DESCRIPTION

fmri string Name of the service

No return values

Usage Examples

3. disable('svc:/system/filesystem/zfs/auto-tier:vol1-a-000')

Disable the 'auto-tier' service instance

See Also

Method Short Description

com.nexenta.nms.Smf::enable Enable an SMF service. Clears the maintenance state, if a ... com.nexenta.nms.Smf::restart Restart an SMF service. The operation is equivalent to com.nexenta.nms.Smf::enable ...

com.nexenta.nms.Smf::reread_config Re-read and re-apply a service configuration. The operation updates the ... com.nexenta.nms.Smf::get_state Get the current state of the specified SMF service ... com.nexenta.nms.Smf::get_logfile Get the logfile path for an SMF service

Previous Section: Service Account Management Table Of Contents Next Section: Snapshot Management

31.3 com.nexenta.nms.Smf::enable

(void) enable (string fmri)

Enable an SMF service. Clears the maintenance state, if a service is in state 'maintenance', otherwise, simply enables the service and re-reads its persistent configuration. For the list of all appliance's services that inherit Virtual Service Management Facility (SMF) Object, see Object Model

Parameters

NAME TYPE DESCRIPTION

fmri string Name of the service. Note: FMRI stands for Fault Management Resource Identifier.

No return values

Usage Examples

3. enable('svc:/system/filesystem/zfs/auto-tier:vol1-a-000')

Enable the 'auto-tier' service instance

See Also Method Short Description

com.nexenta.nms.Smf::disable Disable an SMF service com.nexenta.nms.Smf::restart Restart an SMF service. The operation is equivalent to com.nexenta.nms.Smf::enable ...

com.nexenta.nms.Smf::reread_config Re-read and re-apply a service configuration. The operation updates the ... com.nexenta.nms.Smf::get_state Get the current state of the specified SMF service ... com.nexenta.nms.Smf::get_logfile Get the logfile path for an SMF service

Previous Section: Service Account Management Table Of Contents Next Section: Snapshot Management

31.4 com.nexenta.nms.Smf::fmri_validate

(bool) fmri_validate (string fmri)

Check, if a service exists

Parameters

NAME TYPE DESCRIPTION

fmri string Name of the service.

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - exist, 0 - does not exist.

Previous Section: Service Account Management Table Of Contents Next Section: Snapshot Management

31.5 com.nexenta.nms.Smf::get_logfile

(string) get_logfile (string fmri)

Get the logfile path for an SMF service

Parameters

NAME TYPE DESCRIPTION

fmri string Name of the service

Return Value

TYPE DESCRIPTION

string Path to SMF logfile

Usage Examples

3. get_logfile('svc:/system/filesystem/zfs/auto-tier:vol1-a-000')

Get logfile name of the specified 'auto-tier' service. A sample result: '/var/svc/log/system-filesystem-zfs- auto-tier:vol1-a-000.log' See Also

Method Short Description

com.nexenta.nms.Smf::disable Disable an SMF service com.nexenta.nms.Smf::restart Restart an SMF service. The operation is equivalent to com.nexenta.nms.Smf::enable ...

com.nexenta.nms.Smf::reread_config Re-read and re-apply a service configuration. The operation updates the ... com.nexenta.nms.Smf::get_state Get the current state of the specified SMF service ... com.nexenta.nms.Smf::enable Enable an SMF service. Clears the maintenance state, if a ...

Previous Section: Service Account Management Table Of Contents Next Section: Snapshot Management

31.6 com.nexenta.nms.Smf::get_state

(string) get_state (string fmri)

Get the current state of the specified SMF service

Parameters

NAME TYPE DESCRIPTION

fmri string Name of the service

Return Value

TYPE DESCRIPTION

string State of an SMF service

Usage Examples

3. get_state('svc:/system/filesystem/zfs/auto-tier:vol1-a-000')

Get runtime state of the 'auto-tier' service 'vol1-a-000'

See Also

Method Short Description

com.nexenta.nms.Smf::disable Disable an SMF service com.nexenta.nms.Smf::restart Restart an SMF service. The operation is equivalent to com.nexenta.nms.Smf::enable ...

com.nexenta.nms.Smf::reread_config Re-read and re-apply a service configuration. The operation updates the ... com.nexenta.nms.Smf::enable Enable an SMF service. Clears the maintenance state, if a ... com.nexenta.nms.Smf::get_logfile Get the logfile path for an SMF service

Previous Section: Service Account Management Table Of Contents Next Section: Snapshot Management

31.7 com.nexenta.nms.Smf::reread_config

(void) reread_config (string fmri) Re-read and re-apply a service configuration. The operation updates the service configuration with the values from the current persistent configuration. For the list of all appliance's services that inherit Virtual Service Management Facility (SMF) Object, see Object Model

Parameters

NAME TYPE DESCRIPTION

fmri string Name of the service

No return values

Usage Examples

3. reread_config('svc:/system/filesystem/zfs/auto-tier:vol1-a-000')

Reread the 'auto-tier' service configuration

See Also

Method Short Description

com.nexenta.nms.Smf::disable Disable an SMF service com.nexenta.nms.Smf::restart Restart an SMF service. The operation is equivalent to com.nexenta.nms.Smf::enable ...

com.nexenta.nms.Smf::enable Enable an SMF service. Clears the maintenance state, if a ... com.nexenta.nms.Smf::get_state Get the current state of the specified SMF service ... com.nexenta.nms.Smf::get_logfile Get the logfile path for an SMF service

Previous Section: Service Account Management Table Of Contents Next Section: Snapshot Management

31.8 com.nexenta.nms.Smf::restart

(void) restart (string fmri)

Restart an SMF service. The operation is equivalent to com.nexenta.nms.Smf::enable and com.nexenta.nms.Smf::disable executed in a sequence. For the list of all appliance's services that inherit Virtual Service Management Facility (SMF) Object, see Object Model

Parameters

NAME TYPE DESCRIPTION

fmri string Name of the service

No return values

Usage Examples

3. restart('svc:/system/filesystem/zfs/auto-tier:vol1-a-000')

Restart the specified 'auto-tier' service instance

See Also Method Short Description

com.nexenta.nms.Smf::disable Disable an SMF service com.nexenta.nms.Smf::enable Enable an SMF service. Clears the maintenance state, if a ... com.nexenta.nms.Smf::reread_config Re-read and re-apply a service configuration. The operation updates the ... com.nexenta.nms.Smf::get_state Get the current state of the specified SMF service ... com.nexenta.nms.Smf::get_logfile Get the logfile path for an SMF service

Previous Section: Service Account Management Table Of Contents Next Section: Snapshot Management

31.9 com.nexenta.nms.Smf::wait_for

(bool) wait_for (string fmri, string state, int32 timeout)

Wait for the specific state of service

Parameters

NAME TYPE DESCRIPTION

fmri string Name of the service state string State of the service timeout int32 Waiting time

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - successful, 0 - unsuccessful

Previous Section: Service Account Management Table Of Contents Next Section: Snapshot Management

32 Snapshot Management

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/Snapshot com.nexenta.nms.Snapshot Virtual Container Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION

casesensitivity string ri Determines if the algorithm used by the to compare file names is case- sensitive, case-insensitive or combination of these two types clones string ri A list of all folders that are clones of this snapshot

compressratio string ri The ratio of data compression in the dataset

creation string ri A human readable string of the time when the dataset was created

creation_seconds string c Snapshot creation time as a number of seconds since the start of epoch (00:00:00 UTC Jan 1st, 1970)

defer_destroy string ri Indicates if the snapshot has been marked for deferred destroying or not devices string wi Determines the possibility to open device nodes withing the file system exec string wi Determines the possibility to execute process from the file system info string wi General information about the object ipc_name string e Interface class name of the associated interface object logicalreferenced string ri logicalused string ri mlslabel string wi Security label attribute, that contains the label of the data in the dataset name string ri The name of the object nbmand string wi If this property is "on", then the file system should be mounted with non-blocking mandatory locks nms:clonetarget string ri Target snapshot for clone operations nms:dedup-dirty string ri nms:service string ri The name of automatic service which creates this snapshot normalization string ri The algorithm used by the file system to normalize file names before comparing primarycache string wi Determines what can be cached in the primary cache refcompressratio string ri The compression ratio achieved for the referenced space of this dataset. S compressratio. referenced string ri Shows the amount of data referenced by the dataset secondarycache string wi Determines what can be cached in the secondary cache setuid string wi Controls if the file system should respect the set-UID bit specialclass string ri type string ri The type of dataset: filesystem, volume, or snapshot used string ri Shows how many space is used by the dataset and all its descendants userrefs string ri Shows the number of user holds on this snapshot utf8only string ri Controls whether only characters from UTF-8 code set are acceptable in the file name version string wi The actual version of the file system. It can be different from the pool version written string ri The amount of referenced space written to this dataset since the creation of the previous snapshot xattr string wi Determines the possibility to use extended attributes within this file system zpl_to_metadev string ri

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Container::destroy ['string', 'string'], [] com.nexenta.nms.Container::get_child_prop ['string', 'string'], ['string'] com.nexenta.nms.Container::get_child_props ['string', 'string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::get_names ['string'], [['array', 'string']] com.nexenta.nms.Container::get_names_by_prop ['string', 'string', 'string'], [['array', 'string']] com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::object_exists ['string'], ['bool'] com.nexenta.nms.Container::set_child_prop ['string', 'string', 'string'], [] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Container::trylock ['string', 'int32'], ['bool'] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Container::unlock ['string', 'int32'], [] com.nexenta.nms.Object::unlock_self ['int32'], [] 32.1 com.nexenta.nms.Snapshot::create

(void) create (string zname_snapname, bool recursive)

Create (ie, take) snapshots, recursively or non-recursively, depending on the 2nd parameter

Parameters

NAME TYPE DESCRIPTION

zname_snapname string Fully qualified snapshot name of the following layout: zname@snapname. The part of the snapshot name is the folder that is to be snapshotted. For instance, create('vol1/a@today', '') would mean taking snapshot of the folder vol1/a and naming it 'vol1/a@today'

recursive bool recursive = 0 | 1. True (non-zero): snapshot the specified folder and its sub-folders, false (zero): snapshot only the specified folder

No return values

Usage Examples

3. create('vol1/a@today', 1)

Recursively take '@today' snapshot of the folder 'vol1/a' and its sub-folders

See Also

Method Short Description

com.nexenta.nms.Folder::create Create "paths" to folders com.nexenta.nms.Folder::create_snapshot Snapshot a given folder and possibly its sub-folders com.nexenta.nms.Folder::create_with_props Create a "path" of folders. This API method enables you ...

Previous Section: Service Management Facility (SMF) Table Of Contents Next Section: Statistic Collection

32.2 com.nexenta.nms.Snapshot::get_groupspace

(dictionary {string => dictionary {string => string}}) get_groupspace (string zname, string group, string type)

Get groupspace for specified parameters

Parameters

NAME TYPE DESCRIPTION

zname string Snapshot name, for example: 'trunk/fol2@snap3' group string Group name, ex: 'other' type string Optional parameter, which is get by 'get_groupspace_types'

Return Value

TYPE DESCRIPTION

dictionary {string => dictionary {string => string}} Groupspace parameters. Parameters: 'type', 'used', and 'quota'

Previous Section: Service Management Facility (SMF) Table Of Contents Next Section: Statistic Collection 32.3 com.nexenta.nms.Snapshot::get_groupspace_types

(array of (string)) get_groupspace_types (void)

Get available groupspace types

No parameters

Return Value

TYPE DESCRIPTION

array of (string) List of available groupspace types

Previous Section: Service Management Facility (SMF) Table Of Contents Next Section: Statistic Collection

32.4 com.nexenta.nms.Snapshot::get_snapshot_names

(array of (string)) get_snapshot_names (string zname, bool recursive)

Get the list of existing snapshots for the specified folder, and its sub-folders, if any

Parameters

NAME TYPE DESCRIPTION

zname string The name of the folder recursive bool recursive = 0 | 1. True (non-zero value): include snapshots of the specified folder and its sub-folders; otherwise (zero): return only existing snapshots of the specified folder

Return Value

TYPE DESCRIPTION

array of (string) List of snapshots for the specified folder

Usage Examples

3. get_snapshot_names('vol1/a', 1)

Recursively get all snapshots of the folder 'vol1/a' and its descendent sub-folders

See Also

Method Short Description

com.nexenta.nms.Container::get_names Get the list of names of all child objects that ...

com.nexenta.nms.Container::get_names_by_prop Get the list of all child objects that have a ...

Previous Section: Service Management Facility (SMF) Table Of Contents Next Section: Statistic Collection

32.5 com.nexenta.nms.Snapshot::get_userspace (dictionary {string => dictionary {string => string}}) get_userspace (string zname, string user, string type)

Get userspace specified parameters

Parameters

NAME TYPE DESCRIPTION

zname string Snapshot name, for example: 'trunk/fol2@snap3' user string User name, ex: 'sveta' type string Optional parameter, which is get by 'get_userspace_types'

Return Value

TYPE DESCRIPTION

dictionary {string => dictionary {string => string}} Userspace parameters

Previous Section: Service Management Facility (SMF) Table Of Contents Next Section: Statistic Collection

32.6 com.nexenta.nms.Snapshot::get_userspace_types

(array of (string)) get_userspace_types (void)

Get available userspace types

No parameters

Return Value

TYPE DESCRIPTION

array of (string) The list of available userspace types

Previous Section: Service Management Facility (SMF) Table Of Contents Next Section: Statistic Collection

32.7 com.nexenta.nms.Snapshot::has_zfs_prop

(bool) has_zfs_prop (string zname, string prop)

Determine whether zfs property exists or not

Parameters

NAME TYPE DESCRIPTION

zname string ZFS name

prop string Property name

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - zfs property exists, 0 - zfs property does not exist Previous Section: Service Management Facility (SMF) Table Of Contents Next Section: Statistic Collection

32.8 com.nexenta.nms.Snapshot::rename

(void) rename (string zname, string zname, dictionary {string => string} not set)

Give a new name to snapthot

Parameters

NAME TYPE DESCRIPTION

zname string Snapshot name, for example: 'trunk/fol2@snap3' zname string New name snapshot not set dictionary {string => string} Properties: { 'recurs' => '' }

No return values

Previous Section: Service Management Facility (SMF) Table Of Contents Next Section: Statistic Collection

32.9 com.nexenta.nms.Snapshot::rollback

(void) rollback (string zname_snapname, string extra_options)

Rollback a folder to a given snapshot

Parameters

NAME TYPE DESCRIPTION

zname_snapname string Fully qualified snapshot name of the following layout: zname@snapname. The part is the name of the corresponding folder. For instance, rollback('vol1/a@today', '') will roll the folder 'vol1/a' back to its vol1/a@today state

extra_options string Additional option are: "-r" (recursive): recursively destroy snapshots more recent than the one specified; "-R": recursively destroy more recent snapshots and clones of those snapshots, if any; "-f": used with the -R option to force unmounts of cloned folders that are to be destroyed.

No return values

Usage Examples

3. rollback('vol1/a@today', '-r')

Rollback the folder 'vol1/a' to its 'vol1/a@today' state and destroy snapshots more recent than 'vol1/a@today'

Previous Section: Service Management Facility (SMF) Table Of Contents Next Section: Statistic Collection

33 Statistic Collection SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/Runner/Collector com.nexenta.nms.Collector Virtual Runner Virtual Container Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION

flags string c flags = none = 0 | is_daemon = 1 | maintenance_on_max_fail = 2 | clear_old_faults = 4 | notify_on_first_fail = 8 | notify_never = 16 | schedule_never = 32 | schedule_later = 64. This creation time property defines the runner's behavior and is a bitwise combination of the listed enumerated values. For instance, flags = 3 indicates that the runner is a daemon and that when the maximum number of failures is reached, the runner changes the state to 'maintenance'. freq_day string wc The numeric value depends on the freq_type property. For the freq_type = 'weekly', the day of the week freq_day = 0 | 1 | 2 | 3 | 4 | 5 | 6. Days of the week are numbered as follows: 0 - 'Sun', 1 - 'Mon', 2 - 'Tue', 3 - 'Wed', 4 - 'Thu', 5 - 'Fri', 6 - 'Sat'. For the freq_type = 'monthly', the day of the month freq_day = 1 .. 31 freq_hour string wc freq_hour = 0 .. 23. Specifies the hour of a day. For example, freq_hour = 1 specifies 1am. freq_minute string wc freq_minute = 0 .. 59. Specifies the minute in an hour. For example, freq_minute = 30 specifies 30 minutes past a given hour. freq_period string wc freq_period = [1, max]. The maximum value depends on the freq_type. For example, if the freq_type is 'hourly', the freq_period may have any value in the range [1, 23], and if freq_type is 'monthly', the valid range is [1, 11], etc. freq_type string wc freq_type = 'minute' | 'hourly' | 'daily' | 'weekly' | 'monthly'. You set the period of execution in the units of freq_type. For example, if freq_type = 'hourly', you can schedule the runner every 1, .. or 23 hours. See related com.nexenta.nms.Runner::freq_period info string wi General information about the object ipc_name string e Interface class name of the associated interface object keep_days string c keep_days = number of days. Deafult value is 60 days. The property specifies the number of days to keep the runner's information. After keep_days period expires, the information is deleted from the database. name string ri The name of the object period string c Human-readable description of the periodic runner's execution. The description effectively consolidates freq_type, freq_day and the rest frequency related properties into single human-readable string, for example: "every two hours", "every Saturday at 3am", "every 3rd day of each month at 12:45am", etc. state string c state = 'unknown' | 'ready' | 'running' | 'starting' | 'pending' | 'missing'. Under normal circumstances the runner's state is 'ready', or 'running' status string wc status = 'not-registered' | 'disabled' | 'enabled' | 'maintenance'. trace_level string wc trace_level = none = 0 | default = 1 | verbose = 10 | verbose-verbose = 20 | verbose- verbose-verbose. Specifies the levels of detail of the logging information for the runner, from 0 (none) to 20 (the most detailed). type string c type = 'trigger' | 'collector' | 'reporter' | 'indexer'

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Container::destroy ['string', 'string'], [] com.nexenta.nms.Runner::disable ['string'], [] com.nexenta.nms.Runner::enable ['string'], [] com.nexenta.nms.Runner::execute ['string'], [] com.nexenta.nms.Container::get_child_prop ['string', 'string'], ['string'] com.nexenta.nms.Container::get_child_props ['string', 'string'], [['dict', 'string', 'string']] com.nexenta.nms.Runner::get_init_params ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Runner::get_init_tunables ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::get_names ['string'], [['array', 'string']] com.nexenta.nms.Container::get_names_by_prop ['string', 'string', 'string'], [['array', 'string']] com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Runner::get_tunables ['string', 'string', 'bool'], [['dict', 'string', 'string']] com.nexenta.nms.Runner::is_registered ['string'], ['bool'] com.nexenta.nms.Container::object_exists ['string'], ['bool'] com.nexenta.nms.Runner::register ['string', ['dict', 'string', 'string'], ['dict', 'string', 'string']], [] com.nexenta.nms.Runner::reset ['string'], [] com.nexenta.nms.Container::set_child_prop ['string', 'string', 'string'], [] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Runner::set_tunable ['string', 'string', 'string'], [] com.nexenta.nms.Container::trylock ['string', 'int32'], ['bool'] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Container::unlock ['string', 'int32'], [] com.nexenta.nms.Object::unlock_self ['int32'], [] com.nexenta.nms.Runner::unregister ['string'], []

34 Support information collector

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/Support com.nexenta.nms.Support Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION

info string wi General information about the object ipc_name string e Interface class name of the associated interface object name string ri The name of the object

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Object::unlock_self ['int32'], []

34.1 com.nexenta.nms.Support::get_sub_categories

(array of (string)) get_sub_categories (string top_category) Get sub categories

Parameters

NAME TYPE DESCRIPTION

top_category string Name of the top category

Return Value

TYPE DESCRIPTION

array of (string) List of sub categories

Previous Section: Statistic Collection Table Of Contents Next Section: System Upgrade, Rollback and Checkpoint Management

34.2 com.nexenta.nms.Support::get_top_categories

(array of (string)) get_top_categories (void)

Get top categories

No parameters

Return Value

TYPE DESCRIPTION

array of (string) List of top categories

Previous Section: Statistic Collection Table Of Contents Next Section: System Upgrade, Rollback and Checkpoint Management

35 System Upgrade, Rollback and Checkpoint Management

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/Syspool com.nexenta.nms.Syspool Virtual Container Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION

allocated string c Used storage space, the size of storage within the volume occupied by data autoexpand string wc Controls automatic pool expansion when the underlying LUN is grown autoreplace string wc This property controls automatic device replacement available string c Obsolete. See "free"

bootfs string c Read-only property that specifies the default bootable dataset for the system volume

cachefile string c This property allows to store the volume's configuration in a non-default location, which may be useful in some environments such as clustering. Advanced usage only.

capacity string c Percentage total volume space used. Roughly: (allocated * 100 / size)

current_rootfs string e The name of the current (active) root filesystem a.k.a system checkpoint. The appliance's boot manager will load the default root (see com.nexenta.nms.Syspool::default_rootfs), which may not necessarily be identical to the currently active Operating System. If the defaut != current, you could continue using your current OS until the reboot time, at which point the system will switch to the default. Normally though the default and current properties have the same value. dedupditto string wc Specifies a threshold on when a reference count for a deduped block goes above the threshold, another ditto copy of the block is stored automatically dedupratio string c Ratio on how much of physical size deduplication actually saved default_rootfs string e The name of the default root filesystem.The boot manager will load the default root, which may not necessarily be identical to the currently active Operating System as per com.nexenta.nms.Syspool::current_rootfs. If the defaut != current, you could continue using your current OS until the reboot time, at which point the system will switch to the default. Normally though the default and current properties have the same value. failmode string c failmode = wait | continue | panic. The default value is "wait". This property specifies the behavior in the event of catastrophic failure resulting from failure of some/all devices in the volume. By default ("wait"), all I/O access is blocked until the failed device(s) are recovered and errors cleared. Setting this property to "continue" allows read operations to any remaining healthy devices in the volume. Finally, the "panic" value causes generation of system crash dump. free string c Available storage space within the volume. Or, same: amount of storage that can be used health string c The volume's health. The property may have one of the following 6 enumerated values: "ONLINE", "DEGRADED", "FAULTED", "OFFLINE", "REMOVED", "UNAVAIL" info string wi General information about the object ipc_name string e Interface class name of the associated interface object name string ri The name of the object size string c Total size of the volume sync string wc sync = standard | always | disabled. The default value is "standard". Provide administrators of zfs with the ability to control the behavior of synchronous requests (e.g. fsync, O_DSYNC). upgradeinfo string e Checkpoint from which the current system was upgraded used string c Obsolete. See "allocated" version string c The current on-disk ZFS version of the volume

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Container::destroy ['string', 'string'], [] com.nexenta.nms.Container::get_child_prop ['string', 'string'], ['string'] com.nexenta.nms.Container::get_child_props ['string', 'string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::get_names ['string'], [['array', 'string']] com.nexenta.nms.Container::get_names_by_prop ['string', 'string', 'string'], [['array', 'string']] com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::object_exists ['string'], ['bool'] com.nexenta.nms.Container::set_child_prop ['string', 'string', 'string'], [] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Container::trylock ['string', 'int32'], ['bool'] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Container::unlock ['string', 'int32'], [] com.nexenta.nms.Object::unlock_self ['int32'], []

35.1 com.nexenta.nms.Syspool::activate_rootfs

(void) activate_rootfs (string zname) Activate, that is make default, the specified system checkpoint. This API method effectively changes the default root filesystem, with the available choice being any existing system checkpoint. Once an existing checkpoint is marked default via com.nexenta.nms.Syspool::activate_rootfs, this particular root will be used by the boot manager to boot the appliance (the next time the appliance is booted). See also: com.nexenta.nms.Syspool::current_rootfs and com.nexenta.nms.Syspool::default_rootfs

Parameters

NAME TYPE DESCRIPTION

zname string The name of the root filesystem folder, for example: 'syspool/rootfs-nmu-003'

No return values

Usage Examples

3. activate_rootfs('syspool/rootfs-nmu-003') activate the checkpoint #3

See Also

Method Short Description

com.nexenta.nms.Syspool::destroy_rootfs Destroy the specified system checkpoint. Note that the appliance will ... com.nexenta.nms.Syspool::get_rootfs_names Get the names of all existing root filesystems a.k.a system ... com.nexenta.nms.Syspool::get_rootfs_props Get properties of the specified system checkpoint com.nexenta.nms.Syspool::get_upgrade_info Get detailed appliance software upgrade status

Previous Section: Support information collector Table Of Contents Next Section: User scripts Management

35.2 com.nexenta.nms.Syspool::destroy_rootfs

(void) destroy_rootfs (string zname)

Destroy the specified system checkpoint. Note that the appliance will fail request to destroy the default root filesystem (see com.nexenta.nms.Syspool::default_rootfs)

Parameters

NAME TYPE DESCRIPTION

zname string The name of the root filesystem folder, for example: 'syspool/rootfs-nmu-003'

No return values

Usage Examples

3. destroy_rootfs('syspool/rootfs-nmu-003') destroy the checkpoint #3

See Also

Method Short Description com.nexenta.nms.Syspool::get_rootfs_names Get the names of all existing root filesystems a.k.a system ... com.nexenta.nms.Syspool::activate_rootfs Activate, that is make default, the specified system checkpoint. This ... com.nexenta.nms.Syspool::get_rootfs_props Get properties of the specified system checkpoint com.nexenta.nms.Syspool::get_upgrade_info Get detailed appliance software upgrade status

Previous Section: Support information collector Table Of Contents Next Section: User scripts Management

35.3 com.nexenta.nms.Syspool::get_rootfs_names

(array of (string)) get_rootfs_names (void)

Get the names of all existing root filesystems a.k.a system checkpoints

No parameters

Return Value

TYPE DESCRIPTION

array of (string) List of existing system checkpoints

Usage Examples

3. get_rootfs_names() get the names of all existing root filesystems a.k.a system checkpoints. The returned array of strings contains the name of current (active) root filesystem. To find out which one is current, query 'current_rootfs' property of the interface object or use com.nexenta.nms.Syspool::current_rootfs

See Also

Method Short Description

com.nexenta.nms.Syspool::destroy_rootfs Destroy the specified system checkpoint. Note that the appliance will ... com.nexenta.nms.Syspool::activate_rootfs Activate, that is make default, the specified system checkpoint. This ... com.nexenta.nms.Syspool::get_rootfs_props Get properties of the specified system checkpoint com.nexenta.nms.Syspool::get_upgrade_info Get detailed appliance software upgrade status

Previous Section: Support information collector Table Of Contents Next Section: User scripts Management

35.4 com.nexenta.nms.Syspool::get_rootfs_prop

(string) get_rootfs_prop (string zname, string propname)

Get the value of specified property of the system checkpoint

Parameters

NAME TYPE DESCRIPTION

zname string The name of the root filesystem folder, for example: 'syspool/rootfs-nmu-006' propname string The name of the property, for example 'nms:version' Return Value

TYPE DESCRIPTION

string Value of the specified system checkpoint property

Usage Examples

3. get_rootfs_prop('syspool/rootfs-nmu-006', 'nms:ustatus') get the type of the specified system checkpoint. This can have one of the following enumerated values: 'upgrade-checkpoint' | 'rollback-checkpoint' | 'active-upgrade-checkpoint' | 'active-rollback-checkpoint'

See Also

Method Short Description

com.nexenta.nms.Syspool::destroy_rootfs Destroy the specified system checkpoint. Note that the appliance will ... com.nexenta.nms.Syspool::activate_rootfs Activate, that is make default, the specified system checkpoint. This ... com.nexenta.nms.Syspool::get_rootfs_props Get properties of the specified system checkpoint com.nexenta.nms.Syspool::get_upgrade_info Get detailed appliance software upgrade status

Previous Section: Support information collector Table Of Contents Next Section: User scripts Management

35.5 com.nexenta.nms.Syspool::get_rootfs_props

(dictionary {string => string}) get_rootfs_props (string zname, string pattern)

Get properties of the specified system checkpoint

Parameters

NAME TYPE DESCRIPTION

zname string The name of the root filesystem folder, for example: 'syspool/rootfs-nmu-006' pattern string Pattern to select a matching subset of properties. An empty string will match all properties

Return Value

TYPE DESCRIPTION

dictionary {string => string} List of properties for the specified system checkpoint

Usage Examples

3. get_rootfs_props('syspool/rootfs-nmu-006', '') get all properties of the specified root filesystem (a.k.a. checkpoint). An example of the returned dictionary follows: { 'reservation' => 'none', 'setuid' => 'on', 'referenced' => '1.23G', 'checksum' => 'on', 'grub:description' => 'Nexenta Storage Appliance', 'readonly' => 'off', 'aclinherit' => 'secure', 'mounted' => 'yes', 'exec' => 'on', 'ipc_name' => 'com.nexenta.nms.Folder', 'name' => 'syspool/rootfs-nmu-006', 'canmount' => 'on', 'devices' => 'on', 'nms:creation' => '1211933889', 'xattr' => 'on', 'vscan' => 'off', 'nms:description' => '', 'casesensitivity' => 'sensitive', 'used' => '1.68G', 'atime' => 'on', 'type' => 'filesystem', 'normalization' => 'none', 'quota' => 'none', 'copies' => '1', 'refquota' => 'none', 'mountpoint' => 'legacy', 'zoned' => 'off', 'compression' => 'off', 'kind' => 'NZA::Folder', 'compressratio' => '1.00x', 'sharenfs' => 'off', 'nms:version' => '1.0.1b85', 'refcnt' => '1', 'nbmand' => 'off', 'nms:ustatus' => 'active-upgrade-checkpoint', 'available' => '1.74G', 'info' => '', 'ptr' => '0x9312f48', 'version' => '3', 'utf8only' => 'off', 'refreservation' => 'none', 'snapdir' => 'hidden', 'recordsize' => '128K', 'sharesmb' => 'off', 'creation' => 'Tue May 27 17:18 2008' }

See Also

Method Short Description

com.nexenta.nms.Syspool::destroy_rootfs Destroy the specified system checkpoint. Note that the appliance will ... com.nexenta.nms.Syspool::activate_rootfs Activate, that is make default, the specified system checkpoint. This ... com.nexenta.nms.Syspool::get_rootfs_names Get the names of all existing root filesystems a.k.a system ... com.nexenta.nms.Syspool::get_upgrade_info Get detailed appliance software upgrade status

Previous Section: Support information collector Table Of Contents Next Section: User scripts Management

35.6 com.nexenta.nms.Syspool::get_upgrade_info

(dictionary {string => string}) get_upgrade_info (bool zname)

Get detailed appliance software upgrade status

Parameters

NAME TYPE DESCRIPTION

zname bool The name of the root filesystem folder, for example: 'syspool/rootfs-nmu-006'

Return Value

TYPE DESCRIPTION

dictionary {string => string} Information about system checkpoints

Usage Examples

3. get_upgrade_info('syspool/rootfs-nmu-006') get detailed upgrade status of the specified ('syspool/rootfs-nmu-006') checkpoint. The returned dictionary may look like: { 'current_rootfs' => 'syspool/rootfs-nmu-006', 'svcs_status' => '0', 'default_rootfs' => 'syspool/rootfs-nmu-006', 'status' => '0', 'current_ustatus' => 'active-upgrade-checkpoint', 'default_ustatus' => 'active-upgrade-checkpoint' }

See Also

Method Short Description

com.nexenta.nms.Syspool::destroy_rootfs Destroy the specified system checkpoint. Note that the appliance will ... com.nexenta.nms.Syspool::activate_rootfs Activate, that is make default, the specified system checkpoint. This ... com.nexenta.nms.Syspool::get_rootfs_props Get properties of the specified system checkpoint com.nexenta.nms.Syspool::get_rootfs_names Get the names of all existing root filesystems a.k.a system ...

Previous Section: Support information collector Table Of Contents Next Section: User scripts Management

36 User scripts Management SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/Runner/ScriptRunner com.nexenta.nms.ScriptRunner Virtual Runner Virtual Container Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION

flags string c flags = none = 0 | is_daemon = 1 | maintenance_on_max_fail = 2 | clear_old_faults = 4 | notify_on_first_fail = 8 | notify_never = 16 | schedule_never = 32 | schedule_later = 64. This creation time property defines the runner's behavior and is a bitwise combination of the listed enumerated values. For instance, flags = 3 indicates that the runner is a daemon and that when the maximum number of failures is reached, the runner changes the state to 'maintenance'. freq_day string wc The numeric value depends on the freq_type property. For the freq_type = 'weekly', the day of the week freq_day = 0 | 1 | 2 | 3 | 4 | 5 | 6. Days of the week are numbered as follows: 0 - 'Sun', 1 - 'Mon', 2 - 'Tue', 3 - 'Wed', 4 - 'Thu', 5 - 'Fri', 6 - 'Sat'. For the freq_type = 'monthly', the day of the month freq_day = 1 .. 31 freq_hour string wc freq_hour = 0 .. 23. Specifies the hour of a day. For example, freq_hour = 1 specifies 1am. freq_minute string wc freq_minute = 0 .. 59. Specifies the minute in an hour. For example, freq_minute = 30 specifies 30 minutes past a given hour. freq_period string wc freq_period = [1, max]. The maximum value depends on the freq_type. For example, if the freq_type is 'hourly', the freq_period may have any value in the range [1, 23], and if freq_type is 'monthly', the valid range is [1, 11], etc. freq_type string wc freq_type = 'minute' | 'hourly' | 'daily' | 'weekly' | 'monthly'. You set the period of execution in the units of freq_type. For example, if freq_type = 'hourly', you can schedule the runner every 1, .. or 23 hours. See related com.nexenta.nms.Runner::freq_period info string wi General information about the object ipc_name string e Interface class name of the associated interface object name string ri The name of the object period string c Human-readable description of the periodic runner's execution. The description effectively consolidates freq_type, freq_day and the rest frequency related properties into single human-readable string, for example: "every two hours", "every Saturday at 3am", "every 3rd day of each month at 12:45am", etc. state string c state = 'unknown' | 'ready' | 'running' | 'starting' | 'pending' | 'missing'. Under normal circumstances the runner's state is 'ready', or 'running' status string wc status = 'not-registered' | 'disabled' | 'enabled' | 'maintenance'. trace_level string wc trace_level = none = 0 | default = 1 | verbose = 10 | verbose-verbose = 20 | verbose- verbose-verbose. Specifies the levels of detail of the logging information for the runner, from 0 (none) to 20 (the most detailed). type string c type = 'trigger' | 'collector' | 'reporter' | 'indexer'

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Container::destroy ['string', 'string'], [] com.nexenta.nms.Runner::disable ['string'], [] com.nexenta.nms.Runner::enable ['string'], [] com.nexenta.nms.Runner::execute ['string'], [] com.nexenta.nms.Container::get_child_prop ['string', 'string'], ['string'] com.nexenta.nms.Container::get_child_props ['string', 'string'], [['dict', 'string', 'string']] com.nexenta.nms.Runner::get_init_params ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Runner::get_init_tunables ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::get_names ['string'], [['array', 'string']] com.nexenta.nms.Container::get_names_by_prop ['string', 'string', 'string'], [['array', 'string']] com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Runner::get_tunables ['string', 'string', 'bool'], [['dict', 'string', 'string']] com.nexenta.nms.Runner::is_registered ['string'], ['bool'] com.nexenta.nms.Container::object_exists ['string'], ['bool'] com.nexenta.nms.Runner::register ['string', ['dict', 'string', 'string'], ['dict', 'string', 'string']], [] com.nexenta.nms.Runner::reset ['string'], [] com.nexenta.nms.Container::set_child_prop ['string', 'string', 'string'], [] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Runner::set_tunable ['string', 'string', 'string'], [] com.nexenta.nms.Container::trylock ['string', 'int32'], ['bool'] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Container::unlock ['string', 'int32'], [] com.nexenta.nms.Object::unlock_self ['int32'], [] com.nexenta.nms.Runner::unregister ['string'], []

36.1 com.nexenta.nms.ScriptRunner::create

(void) create (string pathname, dictionary {string => string} params, dictionary {string => string} tunables)

Create a new user defined script

Parameters

NAME TYPE DESCRIPTION

pathname string A full path to a user defined script params dictionary {string => string} Parameters which are get by 'get_init_params' method tunables dictionary {string => string} Tunables which are get by 'get_init_tunables' method

No return values

Previous Section: System Upgrade, Rollback and Checkpoint Management Table Of Contents Next Section: Virtual Automatic Storage Service

37 Virtual Automatic Storage Service

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/Smf/AutoService com.nexenta.nms.SmfAutoService Service Management Facility (SMF) Virtual Container Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION

general/enabled string c svc.startd(1m): If value is set to true, the restarter tries to start the service, when all its dependencies are satisfied. If set to false, the service remains in the disabled state. info string wi General information about the object instance string c Suffix of the service's fmri. FMRI stands for Fault Management Resource Identifier; in this document FMRI or fmri is used to label the name of the service. Examples of FMRIs: 'svc:/system/filesystem/zfs/auto-tier:vol1-a-000', 'svc:/system/filesystem/zfs/auto- sync:vol2-b-001', etc. All auto-services has the following naming structure: :, where com.nexenta.nms.SmfAutoService::instance is a combination of com.nexenta.nms.SmfAutoService::instance_fs_name and com.nexenta.nms.SmfAutoService::instance_fs_id. In other words, fmri of an auto-service has the following outline: com.nexenta.nms.SmfAutoService::path:com.nexenta.nms.SmfAutoService::instance. For the list of auto-services that inherit Virtual Automatic Storage Service Object, see Object Model instance_fs_id string c The numeric portion of the com.nexenta.nms.SmfAutoService::instance. For example, instance_fs_id = 0 for the following FMRIs: 'svc:/system/filesystem/zfs/auto-tier:vol1-a- 000', 'svc:/system/filesystem/zfs/auto-sync:vol1-b-000'. The following is an example of an auto-service's name for which instance_fs_id = 10: 'svc:/system/filesystem/zfs/auto- tier:vol1-a-010'. All auto-services have the following naming structure: :, where com.nexenta.nms.SmfAutoService::instance is a combination of com.nexenta.nms.SmfAutoService::instance_fs_name and com.nexenta.nms.SmfAutoService::instance_fs_id. For the list of auto-services that inherit Virtual Automatic Storage Service Object, see Object Model instance_fs_name string c Part of the com.nexenta.nms.SmfAutoService::instance that reflects the path to source filesystem (folder). For example, instance_fs_name = 'vol1-a' for the following FMRIs: 'svc:/system/filesystem/zfs/auto-tier:vol1-a-000', 'svc:/system/filesystem/zfs/auto- sync:vol1-a-123'. All auto-services have the following naming structure: :, where com.nexenta.nms.SmfAutoService::instance is a combination of com.nexenta.nms.SmfAutoService::instance_fs_name and com.nexenta.nms.SmfAutoService::instance_fs_id. For the list of auto-services that inherit Virtual Automatic Storage Service Object, see Object Model ipc_name string e Interface class name of the associated interface object name string ri The name of the object path string c The prefix of an auto-service's name, or fmri. FMRI is a Fault Management Resource Identifier; in this document FMRI or fmri is conventionally used to label the name of the service. Examples of FMRI services: 'svc:/system/filesystem/zfs/auto-tier:vol1-a-000', 'svc:/system/filesystem/zfs/auto-sync:vol2-b-001', etc. All auto-services have the following naming structure: :, where com.nexenta.nms.SmfAutoService::instance is a combination of com.nexenta.nms.SmfAutoService::instance_fs_name and com.nexenta.nms.SmfAutoService::instance_fs_id. In other words, fmri of a given auto- service has the following outline: com.nexenta.nms.SmfAutoService::path:com.nexenta.nms.SmfAutoService::instance. For the list of auto-services that inherit Virtual Automatic Storage Service Object, see Object Model restarter/logfile string c A logfile of the service (filename). restarter/start_method_timestamp string c The start time of an SMF service restarter/start_method_waitstatus string c not inherited restarter/start_pid string c The process identificator (PID) of an SMF service restarter/state string c svc.startd(1m): The current state. restarter/state_timestamp string c svc.startd(1m): The time when the current state was reached. service string c service = 'auto-snap' | 'auto-scrub' | 'auto-sync' | 'auto-tier'. The type of the auto-service. For the list of auto-services that inherit Virtual Automatic Storage Service Object, see Object Model zfs/comment string c Information about filesystem. zfs/day string c The numeric value that depends on the com.nexenta.nms.SmfAutoService::type property. For the type = 'weekly', the day of the week is numbered as follows: 0 - 'Sun', 1 - 'Mon', 2 - 'Tue', 3 - 'Wed', 4 - 'Thu', 5 - 'Fri', 6 - 'Sat'. For the com.nexenta.nms.SmfAutoService::type = 'monthly', the day of the month is a number in the range of 1 .. 31. See also: com.nexenta.nms.Runner::freq_day zfs/flags string c Flags for auto-services that are defined in common.pm. zfs/fs-name string c Same as com.nexenta.nms.SmfAutoService::instance_fs_name. Part of the service's fmri that reflects the name of the source filesystem (folder). For example, zfs/fs-name = 'vol1- a' for the following FMRIs: 'svc:/system/filesystem/zfs/auto-tier:vol1-a-000', 'svc:/system/filesystem/zfs/auto-sync:vol1-a-123', while zfs/fs-name = 'syspool' for the service named 'svc:/system/filesystem/zfs/auto-scrub:syspool-000'. For the list of auto- services that inherit Virtual Automatic Storage Service Object, see Object Model . See also: com.nexenta.nms.SmfAutoService::instance_fs_name zfs/hour string c zfs/hour = 0 .. 23. Specifies the hour of a day. For example, zfs/hour = 1 specifies 1am. See also: com.nexenta.nms.Runner::freq_hour zfs/last_replic_time string c The last time when the replication service was executed. zfs/minute string c zfs/minute = 0 .. 59. Specifies the minute of an hour. For example, zfs/minute = 30 specifies 30 minutes past a given hour. See also: com.nexenta.nms.Runner::freq_minute zfs/retry string c zfs/retry = 0 | 1. Defines whether to run the service once the remote host becomes reachable. Non-zero (true) - run the service immediately after the remote host becomes reachable. If you set the option to 1: when a service fails during execution because the connection is lost, NexentaStor re-runs the service before the expiration of the next scheduled interval. If you set this option to zero (false): when a service fails during execution because the connection is lost, NexentaStor does not retry to execute the service, the service executes according to schedule. zfs/retry-timestamp string c zfs/retry-timestamp = time of the last retry, as a number of seconds since the start of epoch (00:00:00 UTC Jan 1st, 1970). Note: this variable is updated by service at a run- time, after it has been scheduled to re-run (after the remote host becomes reachable - see com.nexenta.nms.SmfAutoService::zfs/retry). zfs/time_started string c The time when the service was started. zfs/trace_level string c Defines trace level for auto-services. zfs/type string c zfs/type = 'minute' | 'hourly' | 'daily' | 'weekly' | 'monthly'. The period of execution is set in the units of zfs/type. For example, zfs/type = 'hourly' enables you to schedule the service every 1, ... or 23 hours.

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Smf::clear ['string'], [] com.nexenta.nms.Container::destroy ['string', 'string'], [] com.nexenta.nms.Smf::disable ['string'], [] com.nexenta.nms.Smf::enable ['string'], [] com.nexenta.nms.Container::get_child_prop ['string', 'string'], ['string'] com.nexenta.nms.Container::get_child_props ['string', 'string'], [['dict', 'string', 'string']] com.nexenta.nms.Smf::get_logfile ['string'], ['string'] com.nexenta.nms.Container::get_names ['string'], [['array', 'string']] com.nexenta.nms.Container::get_names_by_prop ['string', 'string', 'string'], [['array', 'string']] com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Smf::get_state ['string'], ['string'] com.nexenta.nms.Container::object_exists ['string'], ['bool'] com.nexenta.nms.Smf::reread_config ['string'], [] com.nexenta.nms.Smf::restart ['string'], [] com.nexenta.nms.Container::set_child_prop ['string', 'string', 'string'], [] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Container::trylock ['string', 'int32'], ['bool'] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Container::unlock ['string', 'int32'], [] com.nexenta.nms.Object::unlock_self ['int32'], [] com.nexenta.nms.Smf::wait_for ['string', 'string', 'int32'], ['bool']

37.1 com.nexenta.nms.SmfAutoService::can_tier_copy_acls (bool, string) can_tier_copy_acls (dictionary {string => string} args)

Checks if you can copy the ACLs using RSYNC

Parameters

NAME TYPE DESCRIPTION

args dictionary {string => string} Arguments: { 'proto' => '' 'direction' => '' 'from-host' => '' 'to-host' => '' }

Return Value

TYPE DESCRIPTION

bool Answer = 1 | 0 string Cause = tail of the string "Can't because ..."

Previous Section: User scripts Management Table Of Contents Next Section: Virtual Runner

37.2 com.nexenta.nms.SmfAutoService::execute

(int32) execute (string fmri)

Execute a (auto-) service instance. This SA-API method enables you to execute the service on demand. Compare with com.nexenta.nms.SmfAutoService::schedule. Executing of the specified service on demand does not effect its schedule. The service continue to execute according to schedule. Note: for the list of auto-services that inherit Virtual Automatic Storage Service Object, see Object Model

Parameters

NAME TYPE DESCRIPTION

fmri string The name of the service. Note: FMRI stands for Fault Management Resource Identifier.

Return Value

TYPE DESCRIPTION

int32 1 | 0, 1 - already running, 0 - started succesfully (which does not mean, that the service finishes succesfully.)

Usage Examples

3. execute('svc:/system/filesystem/zfs/auto-tier:vol1-a-000') run 'auto-tier:vol1-a-000' service

See Also

Method Short Description

com.nexenta.nms.SmfAutoService::schedule

com.nexenta.nms.SmfAutoService::unschedule com.nexenta.nms.SmfAutoService::is_scheduled Find out whether the service is scheduled

com.nexenta.nms.SmfAutoService::is_running Find out whether the service is currently running com.nexenta.nms.SmfAutoService::get_sock_stats Get just-in-time transport statistics. The method can be used to ...

Previous Section: User scripts Management Table Of Contents Next Section: Virtual Runner 37.3 com.nexenta.nms.SmfAutoService::get_sock_stats

(dictionary {string => array of (string)}) get_sock_stats (string fmri)

Get just-in-time transport statistics. The method can be used to get live TCP socket statistics for the specified auto-service.

Parameters

NAME TYPE DESCRIPTION

fmri string The name of the service

Return Value

TYPE DESCRIPTION

dictionary {string => If service does not run, returns empty value. If service is running, returns information about array of (string)} all sockets for all services of the specified type

See Also

Method Short Description

com.nexenta.nms.SmfAutoService::execute Execute a (auto-) service instance. This SA-API method enables you ... com.nexenta.nms.SmfAutoService::execute Execute a (auto-) service instance. This SA-API method enables you ... com.nexenta.nms.SmfAutoService::execute Execute a (auto-) service instance. This SA-API method enables you ...

Previous Section: User scripts Management Table Of Contents Next Section: Virtual Runner

37.4 com.nexenta.nms.SmfAutoService::is_daemon

(bool) is_daemon (string fmri)

Find out whether the service is a daemon

Parameters

NAME TYPE DESCRIPTION

fmri string The name of the service

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - service is a daemon, 0 - service is not a daemon

Previous Section: User scripts Management Table Of Contents Next Section: Virtual Runner

37.5 com.nexenta.nms.SmfAutoService::is_running

(bool) is_running (string fmri)

Find out whether the service is currently running Parameters

NAME TYPE DESCRIPTION

fmri string The name of the service

Return Value

TYPE DESCRIPTION

bool 1 | 0, 1 - service is running, 0 - service is not running

Usage Examples

3. is_running('svc:/system/filesystem/zfs/auto-tier:vol1-a-000') check whether 'auto-tier:vol1-a-000' is currently executing

See Also

Method Short Description

com.nexenta.nms.SmfAutoService::execute Execute a (auto-) service instance. This SA-API method enables you ...

com.nexenta.nms.SmfAutoService::execute Execute a (auto-) service instance. This SA-API method enables you ...

com.nexenta.nms.SmfAutoService::execute Execute a (auto-) service instance. This SA-API method enables you ...

com.nexenta.nms.SmfAutoService::get_sock_stats Get just-in-time transport statistics. The method can be used to ...

Previous Section: User scripts Management Table Of Contents Next Section: Virtual Runner

37.6 com.nexenta.nms.SmfAutoService::is_scheduled

(bool) is_scheduled (string fmri)

Find out whether the service is scheduled

Parameters

NAME TYPE DESCRIPTION

fmri string The name of the service

Return Value

TYPE DESCRIPTION

bool 1 | 0, 1 - service is scheduled, 0 - service is not scheduled

Usage Examples

3. is_scheduled('svc:/system/filesystem/zfs/auto-tier:vol1-a-000') check whether 'auto-tier:vol1-a-000' is scheduled See Also

Method Short Description

com.nexenta.nms.SmfAutoService::execute Execute a (auto-) service instance. This SA-API method enables you ...

com.nexenta.nms.SmfAutoService::execute Execute a (auto-) service instance. This SA-API method enables you ...

com.nexenta.nms.SmfAutoService::is_running Find out whether the service is currently running com.nexenta.nms.SmfAutoService::get_sock_stats Get just-in-time transport statistics. The method can be used to ...

Previous Section: User scripts Management Table Of Contents Next Section: Virtual Runner

37.7 com.nexenta.nms.SmfAutoService::seconds_until_next_run

(int32) seconds_until_next_run (string fmri)

For a given auto-service, returns the number of seconds remaining until its next scheduled execution.

Parameters

NAME TYPE DESCRIPTION

fmri string The name of the service

Return Value

TYPE DESCRIPTION

int32 Seconds until next run

Usage Examples

3. seconds_until_next_run('svc:/system/filesystem/zfs/auto-tier:vol1-a-000') get the time for the service 'auto-tier:vol1-a-000' to run (the number of seconds remaining)

See Also

Method Short Description

com.nexenta.nms.SmfAutoService::execute Execute a (auto-) service instance. This SA-API method enables you ...

com.nexenta.nms.SmfAutoService::is_scheduled Find out whether the service is scheduled com.nexenta.nms.SmfAutoService::is_running Find out whether the service is currently running com.nexenta.nms.SmfAutoService::get_sock_stats Get just-in-time transport statistics. The method can be used to ...

Previous Section: User scripts Management Table Of Contents Next Section: Virtual Runner

38 Virtual Runner

SA-API Interface Object

D-Bus name Interface class name Inherits /Root/Runner com.nexenta.nms.Runner Virtual Container Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION

flags string c flags = none = 0 | is_daemon = 1 | maintenance_on_max_fail = 2 | clear_old_faults = 4 | notify_on_first_fail = 8 | notify_never = 16 | schedule_never = 32 | schedule_later = 64. This creation time property defines the runner's behavior and is a bitwise combination of the listed enumerated values. For instance, flags = 3 indicates that the runner is a daemon and that when the maximum number of failures is reached, the runner changes the state to 'maintenance'. freq_day string wc The numeric value depends on the freq_type property. For the freq_type = 'weekly', the day of the week freq_day = 0 | 1 | 2 | 3 | 4 | 5 | 6. Days of the week are numbered as follows: 0 - 'Sun', 1 - 'Mon', 2 - 'Tue', 3 - 'Wed', 4 - 'Thu', 5 - 'Fri', 6 - 'Sat'. For the freq_type = 'monthly', the day of the month freq_day = 1 .. 31 freq_hour string wc freq_hour = 0 .. 23. Specifies the hour of a day. For example, freq_hour = 1 specifies 1am. freq_minute string wc freq_minute = 0 .. 59. Specifies the minute in an hour. For example, freq_minute = 30 specifies 30 minutes past a given hour. freq_period string wc freq_period = [1, max]. The maximum value depends on the freq_type. For example, if the freq_type is 'hourly', the freq_period may have any value in the range [1, 23], and if freq_type is 'monthly', the valid range is [1, 11], etc. freq_type string wc freq_type = 'minute' | 'hourly' | 'daily' | 'weekly' | 'monthly'. You set the period of execution in the units of freq_type. For example, if freq_type = 'hourly', you can schedule the runner every 1, .. or 23 hours. See related com.nexenta.nms.Runner::freq_period info string wi General information about the object ipc_name string e Interface class name of the associated interface object keep_days string c keep_days = number of days. Deafult value is 60 days. The property specifies the number of days to keep the runner's information. After keep_days period expires, the information is deleted from the database. name string ri The name of the object period string c Human-readable description of the periodic runner's execution. The description effectively consolidates freq_type, freq_day and the rest frequency related properties into single human-readable string, for example: "every two hours", "every Saturday at 3am", "every 3rd day of each month at 12:45am", etc. state string c state = 'unknown' | 'ready' | 'running' | 'starting' | 'pending' | 'missing'. Under normal circumstances the runner's state is 'ready', or 'running' status string wc status = 'not-registered' | 'disabled' | 'enabled' | 'maintenance'. trace_level string wc trace_level = none = 0 | default = 1 | verbose = 10 | verbose-verbose = 20 | verbose- verbose-verbose. Specifies the levels of detail of the logging information for the runner, from 0 (none) to 20 (the most detailed). type string c type = 'trigger' | 'collector' | 'reporter' | 'indexer'

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Container::destroy ['string', 'string'], [] com.nexenta.nms.Container::get_child_prop ['string', 'string'], ['string'] com.nexenta.nms.Container::get_child_props ['string', 'string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::get_names ['string'], [['array', 'string']] com.nexenta.nms.Container::get_names_by_prop ['string', 'string', 'string'], [['array', 'string']] com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::object_exists ['string'], ['bool'] com.nexenta.nms.Container::set_child_prop ['string', 'string', 'string'], [] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Container::trylock ['string', 'int32'], ['bool'] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Container::unlock ['string', 'int32'], [] com.nexenta.nms.Object::unlock_self ['int32'], []

38.1 com.nexenta.nms.Runner::disable

(void) disable (string runner_name)

Stop the execution of a runner. The runner must be registered (see com.nexenta.nms.Runner::register); otherwise this method returns an exception.

Parameters

NAME TYPE DESCRIPTION

runner_name string The name of the runner which identifies an instance of a fault trigger, a collector, a reporter, or an indexer

No return values

Usage Examples

3. enable('volume-collector') disable 'volume-collector'

See Also

Method Short Description

com.nexenta.nms.Runner::enable Enable the specified runner. The runner must be registered (see ... com.nexenta.nms.Runner::register Register the specified runner. The operation validates runner's parameters and ...

com.nexenta.nms.Runner::is_registered Check whether the specified runner is registered with the appliance. ...

Previous Section: Virtual Automatic Storage Service Table Of Contents Next Section: Volume (Pool)

38.2 com.nexenta.nms.Runner::enable

(void) enable (string runner_name)

Enable the specified runner. The runner must be registered (see com.nexenta.nms.Runner::register); otherwise this interface method returns an exception. If the runner is disabled (see com.nexenta.nms.Runner::disable), this operation resumes its work.

Parameters

NAME TYPE DESCRIPTION

runner_name string The name of the runner hwich identifies an instance of a fault trigger, a collector, a reporter, or an indexer

No return values Usage Examples

3. enable('runners-check')

Enable 'runners-check'

See Also

Method Short Description

com.nexenta.nms.Runner::disable Stop the execution of a runner. The runner must be ... com.nexenta.nms.Runner::register Register the specified runner. The operation validates runner's parameters and ...

com.nexenta.nms.Runner::is_registered Check whether the specified runner is registered with the appliance. ... com.nexenta.nms.Runner::execute Execute the specified runner. The operation enables you to run ...

Previous Section: Virtual Automatic Storage Service Table Of Contents Next Section: Volume (Pool)

38.3 com.nexenta.nms.Runner::execute

(void) execute (string runner_name)

Execute the specified runner. The operation enables you to run the runner on-demand, without waiting for its scheduled execution time. The runner must be registered (see com.nexenta.nms.Runner::register); otherwise this interface method returns an exception. Note that the runner may not necessarily be enabled; you can execute a disabled (suspended) runner.

Parameters

NAME TYPE DESCRIPTION

runner_name string The name of the runner which identifies an instance of a fault trigger, a collector, a reporter, or an indexer

No return values

Usage Examples

3. execute('services-check')

Execute 'services-check'

See Also

Method Short Description

com.nexenta.nms.Runner::enable Enable the specified runner. The runner must be registered (see ... com.nexenta.nms.Runner::register Register the specified runner. The operation validates runner's parameters and ...

com.nexenta.nms.Runner::is_registered Check whether the specified runner is registered with the appliance. ...

Previous Section: Virtual Automatic Storage Service Table Of Contents Next Section: Volume (Pool) 38.4 com.nexenta.nms.Runner::get_init_params

(dictionary {string => string}) get_init_params (string runner_name)

Get the initial parameters for the specified Script Runner

Parameters

NAME TYPE DESCRIPTION

runner_name string The name of the Script Runner

Return Value

TYPE DESCRIPTION

dictionary {string => string} List of initial parameters and their default values

Previous Section: Virtual Automatic Storage Service Table Of Contents Next Section: Volume (Pool)

38.5 com.nexenta.nms.Runner::get_init_tunables

(dictionary {string => string}) get_init_tunables (string runner_name)

Get the initial tunables for the specified Script Runner

Parameters

NAME TYPE DESCRIPTION

runner_name string The name of the Script Runner

Return Value

TYPE DESCRIPTION

dictionary {string => string} List of initial tunables and their default values

Previous Section: Virtual Automatic Storage Service Table Of Contents Next Section: Volume (Pool)

38.6 com.nexenta.nms.Runner::get_tunables

(dictionary {string => string}) get_tunables (string runner_name, string pattern, bool exclude_description)

Get the list of runner's tunables and their descriptions. For defintion of the term "runner", see Terms and Conventions. For the list of "runners" that inherit Virtual Runner, see Object Model

Parameters

NAME TYPE DESCRIPTION

runner_name string The name of the runner that identifies an instance of a fault trigger, a collector, a reporter, or an indexer

pattern string Pattern to select a matching subset of tunables. An empty string matches all runner's tunables

exclude_description bool exclude_description = 0 | 1. If true, retrieves only the tunables' names without descriptions Return Value

TYPE DESCRIPTION

dictionary {string => string} List of tunables, descriptions and values

Usage Examples

3. get_tunables('memory-check', '', 0)

Get all 'memory-check' tunables and their descriptions. The result includes the following: { 'free_swap_critical' => '10', 'paging_critical_shortdesc' => 'Critically high paging intensity threshold (percentage)', 'paging_critical' => '10', 'paging_critical_longdesc' => 'Alarm (severity=critical) is raised if the intensity of paging to disk (scan rate) gets beyond this critical threshold', 'num_procs' => '5', 'free_ram_notice_shortdesc' => 'Free memory low threshold (percentage of total RAM)', 'max_rss_suspect_shortdesc' => 'Maximum resident set size (RSS) of any process in the system (megabytes)', 'enable_swap_check' => '1', ... }

6. get_tunables('memory-check', 'free', 1)

Get the list of 'memory-check' tunables that contain 'free' in their names, and do not retrieve their descriptions. A sample result: { 'free_swap_critical' => '10', 'free_ram_notice' => '5', 'free_swap_notice' => '25' }

See Also

Method Short Description

com.nexenta.nms.Runner::set_tunable Modify the runner's (tunable) property value. A given runner may ... com.nexenta.nms.Runner::enable Enable the specified runner. The runner must be registered (see ... com.nexenta.nms.Runner::register Register the specified runner. The operation validates runner's parameters and ...

com.nexenta.nms.Runner::is_registered Check whether the specified runner is registered with the appliance. ...

Previous Section: Virtual Automatic Storage Service Table Of Contents Next Section: Volume (Pool)

38.7 com.nexenta.nms.Runner::is_registered

(bool) is_registered (string runner_name)

Check whether the specified runner is registered with the appliance. For defintion of the term "runner", see Terms and Conventions.

Parameters

NAME TYPE DESCRIPTION

runner_name string The name of the runner that identifies an instance of a fault trigger, a collector, a reporter, or an indexer

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - registered, 0 - unregistered

Usage Examples 3. is_registered('services-check') find out whether the 'services-check' fault trigger is registered

See Also

Method Short Description

com.nexenta.nms.Runner::unregister Unregister the specified runner. The operation reverses the effect of ... com.nexenta.nms.Runner::register Register the specified runner. The operation validates runner's parameters and ...

Previous Section: Virtual Automatic Storage Service Table Of Contents Next Section: Volume (Pool)

38.8 com.nexenta.nms.Runner::register

(void) register (string runner_name, dictionary {string => string} params, dictionary {string => string} tunables)

Register the specified runner. The operation validates runner's parameters and registers the runner in the appliance's database. The runner doesn not execute until it is registered. For defintion of the term "runner", see Terms and Conventions. For the list of "runners" that inherit Virtual Runner, see Object Model

Parameters

NAME TYPE DESCRIPTION

runner_name string The name of the runner that identifies an instance of a fault trigger, a collector, a reporter, or an indexer

params dictionary Dictionary { string => string } of the properties: 'type' = 'trigger' | 'collector' | 'reporter' | {string 'indexer', 'description', flags, 'freq_type' = 'minute' | 'hourly' | 'daily' | 'weekly' | 'monthly', => 'freq_period'. For example, the following registers a fault trigger that executes every two hours: string} { type => 'trigger', description => 'some description', flags => 2, freq_type => 'hourly', freq_period => 2 }

tunables dictionary Dictionary { string => string } of optional parameters a. k. a. tunables. The tunables are {string runner-specific and unlike standard properties (above), can have any names. Note that => appliance's management clients use SA-API to configure all runner parameters, including the string} tunables, at runtime. See com.nexenta.nms.Container::set_child_prop - to modify the standard runner's properties, and com.nexenta.nms.Runner::set_tunable - to modify the tunables

No return values

Usage Examples

3. register('network-util-weekly', { 'type' => 'reporter', 'description' => "Weekly networking report", 'freq_type' => 'weekly', 'freq_day' => 6, 'freq_hour' => 2, 'freq_period' => 1}, {} )

Register the weekly reporter to execute every Saturday at 2am

See Also

Method Short Description

com.nexenta.nms.Runner::unregister Unregister the specified runner. The operation reverses the effect of ...

com.nexenta.nms.Runner::is_registered Check whether the specified runner is registered with the appliance. ... com.nexenta.nms.Runner::disable Stop the execution of a runner. The runner must be ... com.nexenta.nms.Runner::enable Enable the specified runner. The runner must be registered (see ... com.nexenta.nms.Runner::set_tunable Modify the runner's (tunable) property value. A given runner may ...

Previous Section: Virtual Automatic Storage Service Table Of Contents Next Section: Volume (Pool)

38.9 com.nexenta.nms.Runner::reset

(void) reset (string runner_name)

Destroy job which is linked to specified Runner

Parameters

NAME TYPE DESCRIPTION

runner_name string The name of the runner that identifies an instance of a fault trigger, a collector, a reporter, or an indexer

No return values

Previous Section: Virtual Automatic Storage Service Table Of Contents Next Section: Volume (Pool)

38.10 com.nexenta.nms.Runner::set_tunable

(void) set_tunable (string runner_name, string propname, string propval)

Modify the runner's (tunable) property value. A given runner may have two types of properties: standard properties, for example, 'type', 'description', and tunables, which differs by runner. Use the generic com.nexenta.nms.Container::set_child_prop - to modify the standard runner's properties, and com.nexenta.nms.Runner::set_tunable - to modify the tunables

Parameters

NAME TYPE DESCRIPTION

runner_name string The name of the runner that identifies an instance of a fault trigger, a collector, a reporter, or an indexer

propname string Property name propval string Property value

No return values

Usage Examples

3. set_tunable('memory-check', 'paging_critical', 5)

Modify the tunable 'paging_critical' for memory-check runner. The operation sets a new threshold for the paging intensity. To view all runner's tunables and their descriptions, use com.nexenta.nms.Runner::get_tunables

See Also

Method Short Description

com.nexenta.nms.Runner::get_tunables Get the list of runner's tunables and their descriptions. For ... com.nexenta.nms.Runner::enable Enable the specified runner. The runner must be registered (see ... com.nexenta.nms.Runner::register Register the specified runner. The operation validates runner's parameters and ...

com.nexenta.nms.Runner::is_registered Check whether the specified runner is registered with the appliance. ...

Previous Section: Virtual Automatic Storage Service Table Of Contents Next Section: Volume (Pool)

38.11 com.nexenta.nms.Runner::unregister

(void) unregister (string runner_name)

Unregister the specified runner. The operation reverses the effect of com.nexenta.nms.Runner::register. It destroys the active runner instance and removes the corresponding record from the registration database. Note that after you unregister the runner, you cannot enable it; to simply stop a runner, use com.nexenta.nms.Runner::disable

Parameters

NAME TYPE DESCRIPTION

runner_name string The name of the runner that identifies an instance of a fault trigger, a collector, a reporter, or an indexer

No return values

Usage Examples

3. unregister('memory-check')

Unregister 'memory-check'

See Also

Method Short Description

com.nexenta.nms.Runner::register Register the specified runner. The operation validates runner's parameters and ...

com.nexenta.nms.Runner::is_registered Check whether the specified runner is registered with the appliance. ... com.nexenta.nms.Runner::enable Enable the specified runner. The runner must be registered (see ... com.nexenta.nms.Runner::disable Stop the execution of a runner. The runner must be ...

Previous Section: Virtual Automatic Storage Service Table Of Contents Next Section: Volume (Pool)

39 Volume (Pool)

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/Volume com.nexenta.nms.Volume Virtual Container Virtual Base Object

Properties NAME TYPE ACCESS DESCRIPTION

allocated string c Used storage space, the amount of the storage occupied by data on the volume autoexpand string wc Controls the policy of the automatic pool expansion when you grow the underlying LUN autoreplace string wc zpool(1m): autoreplace = on | off. Controls automatic device replacement. If set to "off", the device replacement must be initiated by the "zpool replace" command. If set to "on", then any new device which is found in the same physical location and recognized as a device that has previously belonged to the pool, is automatically formatted and replaced. The default value is "off". available string c Obsolete. See "free" bootfs string c Read-only property that specifies the default bootable dataset for the system volume cachefile string c This property enables you to store the volume's configuration in a non-default location, which may be useful in some environments, such as cluster. For advanced users. capacity string c Percentage total volume space used. Roughly: (allocated * 100 / size) dedupditto string wc A threshold for a number of copies. When a reference count for a deduped block goes above the threshold, another ditto copy of the block is stored automatically dedupratio string c Ratio on how much of physical size deduplication is actually saved failmode string c failmode = wait | continue | panic. The default value is "wait". This property specifies the behavior in the event of a failure which is a result of an error on some/all devices in the volume. By default the property is set to "wait", which blocks all I/O access until you recover the failed device(s) and clear the errors. If you set this property to "continue", it enables the read operations on any remaining healthy devices in the volume. If you set this property to "panic", then NexentaStor generates a system crash dump. free string c Available storage space on the volume. health string c The volume's health state. The property may have one of the following enumerated values: "ONLINE", "DEGRADED", "FAULTED", "OFFLINE", "REMOVED", "UNAVAIL" info string wi General information about the object ipc_name string e Interface class name of the associated interface object name string ri The name of the object size string c Total size of the volume sync string wc sync = standard | always | disabled. The default value is "standard". Provide administrators of zfs with the ability to control the behavior of synchronous requests, such as fsync, O_DSYNC. used string c Obsolete. See "allocated" version string c The current on-disk ZFS version of the volume

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Container::destroy ['string', 'string'], [] com.nexenta.nms.Container::get_child_prop ['string', 'string'], ['string'] com.nexenta.nms.Container::get_child_props ['string', 'string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::get_names ['string'], [['array', 'string']] com.nexenta.nms.Container::get_names_by_prop ['string', 'string', 'string'], [['array', 'string']] com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::object_exists ['string'], ['bool'] com.nexenta.nms.Container::set_child_prop ['string', 'string', 'string'], [] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Container::trylock ['string', 'int32'], ['bool'] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Container::unlock ['string', 'int32'], [] com.nexenta.nms.Object::unlock_self ['int32'], [] 39.1 com.nexenta.nms.Volume::attach_lun

(void) attach_lun (string vol_name, string old_device, string new_device, string force_flag)

Attach a to an existing mirror. Otherwise, if mirror does not exist, create a new two-way mirror with an existing . If a mirror already exists, then the opeartion adds new_device to a three- way mirror, and so on. starts resilvering immediately.

Parameters

NAME TYPE DESCRIPTION

vol_name string The name of the volume old_device string The name of the old device used as a point of reference to attach a new_device string The name of the new device force_flag string "-f" - forces use of a , even if it is in use. "" (empty string) - do not force the replace_lun operation.

No return values

Usage Examples

3. attach_lun('vol1', 'c2t0d0', 'c2t1d0', '')

Attach 'c2t1d0' to 'c2t0d0' in volume 'vol1'

See Also

Method Short Description

com.nexenta.nms.Volume::resolve_lun_to_volumes Resolve LUN to its container volume(s). com.nexenta.nms.Volume::get_luns_for_all_volumes Get the list of all LUNs that are used by ... com.nexenta.nms.Volume::get_luns Get the list of LUNs for a given volume ... com.nexenta.nms.Volume::attach_lun Attach a to an existing mirror. Otherwise, if mirror ...

com.nexenta.nms.Volume::remove_lun Permanently remove a hot spare device from the volume. ... com.nexenta.nms.Volume::replace_lun Replace device in a mirror. The operation replaces with ...

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.2 com.nexenta.nms.Volume::clear_lun

(void) clear_lun (string vol_name, string device_name)

Clear the device errors in a volume. The device errors are periodically reported by the appliance's fault management "runners"; the errors can also be retrieved at any time with com.nexenta.nms.Volume::get_status and com.nexenta.nms.Volume::get_luns methods.

Parameters

NAME TYPE DESCRIPTION

vol_name string The name of the volume device_name string The name of the device No return values

Usage Examples

3. clear_lun('vol1', 'c2t0d0')

Clear errors on 'c2t0d0' in volume 'vol1'

See Also

Method Short Description

com.nexenta.nms.Volume::resolve_lun_to_volumes Resolve LUN to its container volume(s). com.nexenta.nms.Volume::get_luns_for_all_volumes Get the list of all LUNs that are used by ... com.nexenta.nms.Volume::get_luns Get the list of LUNs for a given volume ... com.nexenta.nms.Volume::attach_lun Attach a to an existing mirror. Otherwise, if mirror ...

com.nexenta.nms.Volume::remove_lun Permanently remove a hot spare device from the volume. ... com.nexenta.nms.Volume::replace_lun Replace device in a mirror. The operation replaces with ...

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.3 com.nexenta.nms.Volume::create_reserve

(void) create_reserve (string vol_name)

Creates new reserve folder

Parameters

NAME TYPE DESCRIPTION

vol_name string The name of the volume

No return values

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.4 com.nexenta.nms.Volume::detach_lun

(void) detach_lun (string vol_name, string device_name)

Detach device from a mirror

Parameters

NAME TYPE DESCRIPTION

vol_name string The name of the volume device_name string The name of the device No return values

Usage Examples

3. detach_lun('vol1', 'c2t0d0')

Detach 'c2t0d0' from volume 'vol1'. The operation succeeds, if volume 'vol1' consist of a group of mirrored devices that contains 'c2t0d0'

See Also

Method Short Description

com.nexenta.nms.Volume::resolve_lun_to_volumes Resolve LUN to its container volume(s). com.nexenta.nms.Volume::get_luns_for_all_volumes Get the list of all LUNs that are used by ... com.nexenta.nms.Volume::get_luns Get the list of LUNs for a given volume ... com.nexenta.nms.Volume::attach_lun Attach a to an existing mirror. Otherwise, if mirror ...

com.nexenta.nms.Volume::remove_lun Permanently remove a hot spare device from the volume. ... com.nexenta.nms.Volume::replace_lun Replace device in a mirror. The operation replaces with ...

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.5 com.nexenta.nms.Volume::free_reserve

(void) free_reserve (string zname)

Remove a folder that contains emeregency reserve

Parameters

NAME TYPE DESCRIPTION

zname string Volume name, for example: 'trunk/'

No return values

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.6 com.nexenta.nms.Volume::get_all_names

(array of (string)) get_all_names (string pattern)

Get the list of names of all child objects that matches the specified pattern (include 'syspool')

Parameters

NAME TYPE DESCRIPTION

pattern string Pattern to select a matching subset of children objects. An empty string matches all child objects

Return Value TYPE DESCRIPTION

array of (string) List of child objects

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.7 com.nexenta.nms.Volume::get_available_spares

(dictionary {string => dictionary {string => string}}) get_available_spares (void)

Get the list of disks that can be used as the hot spares for ZFS pool, or which are already in use as the hot spares.

No parameters

Return Value

TYPE DESCRIPTION

dictionary {string => dictionary {string => string}} Hash: available LUNs => LUN properties

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.8 com.nexenta.nms.Volume::get_groupspace

(dictionary {string => dictionary {string => string}}) get_groupspace (string zname, string group, string type)

Get the groupspace parameters

Parameters

NAME TYPE DESCRIPTION

zname string Volume name, for example: 'trunk/' group string Group name, for example: 'other' type string Optional parameter, which is get by 'get_groupspace_types'

Return Value

TYPE DESCRIPTION

dictionary {string => dictionary {string => string}} Groupspace parameters. Parameters: 'type', 'used', and 'quota'

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.9 com.nexenta.nms.Volume::get_groupspace_types

(array of (string)) get_groupspace_types (void)

Get the available groupspace types

No parameters Return Value

TYPE DESCRIPTION

array of (string) List of available groupspace types

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.10 com.nexenta.nms.Volume::get_import_volumes

(dictionary {string => dictionary {string => array of (string)}}) get_import_volumes (bool only_destroyed, string vol_name)

Get the information about all, or selected volumes that can be re-imported.

Parameters

NAME TYPE DESCRIPTION

only_destroyed bool only_destroyed = 0 | 1. Non-zero (true) - get the list of destroyed volumes that can be re- imported; zero (false) - get the list of exported volumes,

vol_name string The name of the volume

Return Value

TYPE DESCRIPTION

dictionary {string => dictionary {string => array of (string)}} The list of volumes that you can import

Usage Examples

3. get_import_volumes(0, '')

Get the list of all exported volumes

6. get_import_volumes(1, '')

Get the list of all destroyed volumes

9. get_import_volumes(1, 'vol1')

Get the information about destroyed volume 'vol1'

See Also

Method Short Description

com.nexenta.nms.Volume::vol_import Import a volume

com.nexenta.nms.Volume::vol_create Create a volume

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device) 39.11 com.nexenta.nms.Volume::get_luns

(dictionary {string => array of (string)}) get_luns (string vol_name)

Get the list of LUNs for a given volume

Parameters

NAME TYPE DESCRIPTION

vol_name string The name of the volume

Return Value

TYPE DESCRIPTION

dictionary {string => array of (string)} List of all available LUNs

Usage Examples

3. get_luns('vol1')

Return volume the LUNs for 'vol1', their runtime status and descriptions. A sample output: { 'c2d0' => ( 'ONLINE', '0', '0', '0', '', '' ) }

See Also

Method Short Description

com.nexenta.nms.Volume::resolve_lun_to_volumes Resolve LUN to its container volume(s). com.nexenta.nms.Volume::get_luns_for_all_volumes Get the list of all LUNs that are used by ... com.nexenta.nms.Volume::detach_lun Detach device from a mirror com.nexenta.nms.Volume::attach_lun Attach a to an existing mirror. Otherwise, if mirror ...

com.nexenta.nms.Volume::remove_lun Permanently remove a hot spare device from the volume. ... com.nexenta.nms.Volume::replace_lun Replace device in a mirror. The operation replaces with ...

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.12 com.nexenta.nms.Volume::get_luns_for_all_volumes

(array of (string)) get_luns_for_all_volumes (void)

Get the list of all LUNs that are used by the appliance's volumes

No parameters

Return Value

TYPE DESCRIPTION

array of (string) List of LUNs that are used in volume configurations

See Also

Method Short Description com.nexenta.nms.Volume::resolve_lun_to_volumes Resolve LUN to its container volume(s). com.nexenta.nms.Volume::get_luns Get the list of LUNs for a given volume ...

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.13 com.nexenta.nms.Volume::get_prop_valid_values

(array of (string)) get_prop_valid_values (string prop_name)

Get the valid range and/or enumeration for a given volume's property.

Parameters

NAME TYPE DESCRIPTION

prop_name string The name of the property.

Return Value

TYPE DESCRIPTION

array of (string) List of valid values for the specified property

Usage Examples

3. get_prop_valid_values('available')

Returns ('').

6. get_prop_valid_values('cachefile')

Returns ('', 'none').

9. get_prop_valid_values('autoreplace')

Returns ('on', 'off').

See Also

Method Short Description

com.nexenta.nms.Folder::get_prop_valid_values Get the valid range and/or enumeration for a given folder's ...

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.14 com.nexenta.nms.Volume::get_shared_volumes

(array of (string)) get_shared_volumes (void)

Get the list of all volumes that are currently shared through iSCSI No parameters

Return Value

TYPE DESCRIPTION

array of (string) List of shared volumes

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.15 com.nexenta.nms.Volume::get_status

(dictionary {string => array of (string)}) get_status (string vol_name)

Get the volume's status

Parameters

NAME TYPE DESCRIPTION

vol_name string The name of the volume

Return Value

TYPE DESCRIPTION

dictionary {string => array of Volume status. The possible values are: online | offline | faulted | removed | (string)} unavailable | degraded

Usage Examples

3. get_status('vol1')

Get the current status of volume 'vol1'.

See Also

Method Short Description

com.nexenta.nms.Volume::get_import_volumes Get the information about all, or selected volumes that can ... com.nexenta.nms.Volume::get_luns Get the list of LUNs for a given volume ... com.nexenta.nms.Volume::get_version_info Get volume's ZFS version

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.16 com.nexenta.nms.Volume::get_userspace

(dictionary {string => dictionary {string => string}}) get_userspace (string zname, string user, string type)

Get the userspace parameters

Parameters

NAME TYPE DESCRIPTION zname string Volume name, for example: 'trunk/' user string User name, for example: 'john' type string Optional parameter, which is get by 'get_userspace_types'

Return Value

TYPE DESCRIPTION

dictionary {string => dictionary {string => string}} Userspace parameters

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.17 com.nexenta.nms.Volume::get_userspace_types

(array of (string)) get_userspace_types (void)

Get available userspace types

No parameters

Return Value

TYPE DESCRIPTION

array of (string) The list of available userspace types

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.18 com.nexenta.nms.Volume::get_version_info

(array of (string)) get_version_info (string vol_name)

Get volume's ZFS version

Parameters

NAME TYPE DESCRIPTION

vol_name string The name of the volume

Return Value

TYPE DESCRIPTION

array of Volume ZFS version in form of two values: 1) the latest version which NexentaStor supports; 2)the current (string) version of the volume)

Usage Examples

3. get_version_info('vol1')

Get the version information for volume 'vol1'. A sample result: (10, 10) or (10, 9). The 2nd example demonstrates the case when the volume's ZFS version (9) may be upgraded to the system version (10) Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.19 com.nexenta.nms.Volume::has_reserve

(bool) has_reserve (string vol_name)

Determine if a volume already has emergency reserve folder

Parameters

NAME TYPE DESCRIPTION

vol_name string The name of the volume

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - has reserve, 0 - does not have reserve

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.20 com.nexenta.nms.Volume::has_zfs_prop

(bool) has_zfs_prop (string zname, string prop)

Determine whether zfs property exists or not

Parameters

NAME TYPE DESCRIPTION

zname string ZFS name prop string Property name

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - exists, 0 - does not exist

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.21 com.nexenta.nms.Volume::has_zpool_prop

(bool) has_zpool_prop (string zname, string prop)

Determine whether zpool property exists or not

Parameters

NAME TYPE DESCRIPTION

zname string ZFS name prop string Property name Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - exists, 0 - does not exist

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.22 com.nexenta.nms.Volume::history

(array of (string)) history (string vol_name, int32 time_begin, int32 time_end)

Get volume history records, in terms of executed ZFS commands and their timestamps. The subset of records that are returned is defined by the given range [ time_begin, time_end ]

Parameters

NAME TYPE DESCRIPTION

vol_name string The name of the volume time_begin int32 Time (in seconds) from the start of epoch (00:00:00 UTC Jan 1st, 1970) time_end int32 Time (in seconds) from the start of epoch (00:00:00 UTC Jan 1st, 1970)

Return Value

TYPE DESCRIPTION

array of (string) List of executed ZFS commands and their timestamps

Usage Examples

3. history('vol1', 0, time())

'time()' is the current time in seconds. This call returns all the commands executed on 'vol1'

6. history('vol1', time() - 3600, time())

'time ()' is the the current time in seconds. This call returns all the commands executed on 'vol1' during the last 60 minutes.

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.23 com.nexenta.nms.Volume::offline_lun

(void) offline_lun (string vol_name, string device_name)

Take the physical device offline. While the device is offline, no attempt is made to read or write to the device.

Parameters

NAME TYPE DESCRIPTION vol_name string The name of the volume device_name string The name of the device

No return values

Usage Examples

3. offline_lun('vol1', 'c2t0d0')

Take 'c2t0d0' offline in volume 'vol1'

See Also

Method Short Description

com.nexenta.nms.Volume::resolve_lun_to_volumes Resolve LUN to its container volume(s). com.nexenta.nms.Volume::online_lun Bring the physical device online. This operation is not applicable ... com.nexenta.nms.Volume::get_luns Get the list of LUNs for a given volume ... com.nexenta.nms.Volume::attach_lun Attach a to an existing mirror. Otherwise, if mirror ... com.nexenta.nms.Volume::remove_lun Permanently remove a hot spare device from the volume. ... com.nexenta.nms.Volume::replace_lun Replace device in a mirror. The operation replaces with ...

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.24 com.nexenta.nms.Volume::online_lun

(void) online_lun (string vol_name, string device_name)

Bring the physical device online. This operation is not applicable to spares.

Parameters

NAME TYPE DESCRIPTION

vol_name string The name of the volume device_name string The name of the device

No return values

Usage Examples

3. online_lun('vol1', 'c2t0d0') bring online 'c2t0d0' from volume 'vol1'

See Also

Method Short Description

com.nexenta.nms.Volume::resolve_lun_to_volumes Resolve LUN to its container volume(s).

com.nexenta.nms.Volume::offline_lun Take the physical device offline. While the device is offline, ... com.nexenta.nms.Volume::get_luns Get the list of LUNs for a given volume ... com.nexenta.nms.Volume::attach_lun Attach a to an existing mirror. Otherwise, if mirror ... com.nexenta.nms.Volume::remove_lun Permanently remove a hot spare device from the volume. ... com.nexenta.nms.Volume::replace_lun Replace device in a mirror. The operation replaces with ...

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.25 com.nexenta.nms.Volume::recover_faulted_luns

(bool) recover_faulted_luns (string vol_name)

Recover faulted devices in a volume. This operation is currently supported for iSCSI attached devices only

Parameters

NAME TYPE DESCRIPTION

vol_name string The name of the volume

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - success, 0 - failed

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.26 com.nexenta.nms.Volume::remove_lun

(void) remove_lun (string vol_name, string device_name)

Permanently remove a hot spare device from the volume.

Parameters

NAME TYPE DESCRIPTION

vol_name string The name of the volume device_name string The name of the device

No return values

Usage Examples

3. remove_lun('vol1', 'c2t0d0')

Remove 'c2t0d0' from volume 'vol1'

See Also

Method Short Description

com.nexenta.nms.Volume::resolve_lun_to_volumes Resolve LUN to its container volume(s). com.nexenta.nms.Volume::get_luns_for_all_volumes Get the list of all LUNs that are used by ... com.nexenta.nms.Volume::get_luns Get the list of LUNs for a given volume ... com.nexenta.nms.Volume::attach_lun Attach a to an existing mirror. Otherwise, if mirror ...

com.nexenta.nms.Volume::remove_lun Permanently remove a hot spare device from the volume. ... com.nexenta.nms.Volume::replace_lun Replace device in a mirror. The operation replaces with ...

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.27 com.nexenta.nms.Volume::replace_lun

(void) replace_lun (string vol_name, string old_device, string new_device, string force_flag)

Replace device in a mirror. The operation replaces with . This is equivalent to attaching (using com.nexenta.nms.Volume::attach_lun) , waiting for it to resilver, and then detaching (using com.nexenta.nms.Volume::detach_lun) .

Parameters

NAME TYPE DESCRIPTION

vol_name string The name of the volume old_device string The name of the old device, to be replaced new_device string The name of the new device, to be used instead of the force_flag string "-f" - forces use of the even if it is in use. "" (empty string) - do not force the replace_lun operation.

No return values

Usage Examples

3. replace_lun('vol1', 'c2t0d0', 'c2t1d0', '')

Replace 'c2t0d0' with 'c2t0d0' in volume 'vol1'

See Also

Method Short Description

com.nexenta.nms.Volume::attach_lun Attach a to an existing mirror. Otherwise, if mirror ... com.nexenta.nms.Volume::detach_lun Detach device from a mirror com.nexenta.nms.Volume::get_luns Get the list of LUNs for a given volume ... com.nexenta.nms.Volume::remove_lun Permanently remove a hot spare device from the volume. ... com.nexenta.nms.Volume::vol_grow Grow a volume

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.28 com.nexenta.nms.Volume::resolve_lun_to_volumes

(array of (string)) resolve_lun_to_volumes (string disk_name)

Resolve LUN to its container volume(s). Parameters

NAME TYPE DESCRIPTION

disk_name string Name of the disk. For instance: 'c5t3d0' or 'c0d1'

Return Value

TYPE DESCRIPTION

array of (string) List of volumes

Usage Examples

3. resolve_lun_to_volumes('vol1/zvol1')

Resolve the specified zvol to its volume. The returned array in this case: ('vol1').o@usage_2

See Also

Method Short Description

com.nexenta.nms.Volume::get_luns Get the list of LUNs for a given volume ... com.nexenta.nms.Volume::get_luns_for_all_volumes Get the list of all LUNs that are used by ...

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.29 com.nexenta.nms.Volume::set_property

(void) set_property (string vol_name, string prop_name, string prop_val)

Set a zpool property

Parameters

NAME TYPE DESCRIPTION

vol_name string The name of the volume prop_name string A zpool property name prop_val string Value of a zpool property

No return values

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.30 com.nexenta.nms.Volume::upgrade

(bool) upgrade (string vol_name)

Upgrade volume's ZFS version. WARNING: This operation may affect availability of system checkpoints! When you upgrade a system volume to a newer ZFS version, all system checkpoints with older ZFS versions becomes non-bootable and therefore you will not be able to rollback them. The existing checkpoints remain accessible in the regular file level access operations Parameters

NAME TYPE DESCRIPTION

vol_name string The name of the volume

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - success, 0 - failed

Usage Examples

3. upgrade('vol1')

Upgrade volume 'vol1' to the system ZFS version

See Also

Method Short Description

com.nexenta.nms.Folder::get_version_info Get the folder's ZFS version com.nexenta.nms.Volume::get_version_info Get volume's ZFS version com.nexenta.nms.Folder::upgrade Upgrade folder's ZFS version

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.31 com.nexenta.nms.Volume::vol_create

(array of (string)) vol_create (string vol_name, string cmd, bool dry_run, bool force, dictionary {string => string} creation_time_props)

Create a volume

Parameters

NAME TYPE DESCRIPTION

vol_name string The name of the volume cmd string The command is a sequence of the keywords ('mirror', 'raidz1', 'raidz2', 'raidz3', 'log') followed by LUN names. For example, 'c0d0 c1d0' - create a volume that contains two disks. 'mirror c0d0 c1d0' - create a volume that contains a single (two-way) mirror of two disks. The LUNs that are used to create a volume must be available for allocation.

dry_run bool dry_run = 0 | 1. Non-zero (true) - simulate volume creation without actually creating it. Zero (false) value must be used to create a volume.

force bool force = 0 | 1. If true (that is, non-zero), forces volume creation even, if the LUNs appear to be in use.

creation_time_props dictionary { Property Name => Property Value } dictionary of property names and their values are {string specified at a creation time. => string}

Return Value

TYPE DESCRIPTION

array of (string) System message Usage Examples

3. vol_create('vol1', 'raidz c0t0d0 c1t0d0 c6t0d0 c7t0d0 c4t0d0', 0, 0, {})

Create volume 'vol1' as a single RAID-Z group of 5 disks.

6. vol_create('vol1', 'c0t0d0 c1t0d0 c6t0d0 c7t0d0 c4t0d0', 0, 1, {})

Force creation of volume 'vol1' as a simple non-redundant pool of 5 disks.

9. vol_create('vol1', 'c0t0d0 c1t0d0 c6t0d0 c7t0d0 c4t0d0', 0, 0, { version => '9', 'failmode' => 'wait' })

Create volume 'vol1' as a simple non-redundant pool of 5 disks, and set the properties of the creation time: 'version' and 'failmode'.

See Also

Method Short Description

com.nexenta.nms.Folder::create Create "paths" to folders com.nexenta.nms.Folder::create_snapshot Snapshot a given folder and possibly its sub-folders com.nexenta.nms.Folder::create_with_props Create a "path" of folders. This API method enables you ... com.nexenta.nms.Volume::vol_grow Grow a volume com.nexenta.nms.Volume::vol_import Import a volume

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.32 com.nexenta.nms.Volume::vol_export

(void) vol_export (string vol_name)

Export a volume. This operation exports a volume and cleanups/destroys: (1) all dependent storage services, (2) all zvols based on a given volume, 3) all active indexers, and (4) unshares all shares, if any.

Parameters

NAME TYPE DESCRIPTION

vol_name string The name of the volume that you want to export

No return values

Usage Examples

3. vol_export('vol1')

Export volume 'vol1'

See Also Method Short Description

com.nexenta.nms.Volume::get_import_volumes Get the information about all, or selected volumes that can ... com.nexenta.nms.Volume::vol_import Import a volume com.nexenta.nms.Volume::vol_create Create a volume

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.33 com.nexenta.nms.Volume::vol_grow

(array of (string)) vol_grow (string vol_name, string cmd, bool dry_run, bool force)

Grow a volume

Parameters

NAME TYPE DESCRIPTION

vol_name string The name of the volume cmd string Command to "grow" the volume. The command is a sequence of keywords ('pool', 'mirror', 'raidz1', 'raidz2', 'raidz3', 'log', 'spare') followed by LUN names, for example 'mirror c0d0 c1d0' - add a mirror of two devices to an existing volume. The LUNs that you use to "grow" a volume must be available for allocation.

dry_run bool dry_run = 0 | 1. Non-zero (true) - simulate volume creation without actually creating it. Zero (false) - create the volume.

force bool force = 0 | 1, 1 - true, 0 - false. If true, forces the operation, even if the LUNs is in use.

Return Value

TYPE DESCRIPTION

array of (string) System message

Usage Examples

3. vol_grow('vol1', 'raidz c0t0d0 c1t0d0 c6t0d0 c7t0d0 c4t0d0', 0, 0)

Add a single RAID-Z group of 5 disks to an existing volume 'vol1'.

See Also

Method Short Description

com.nexenta.nms.Volume::vol_create Create a volume com.nexenta.nms.Folder::create_with_props Create a "path" of folders. This API method enables you ... com.nexenta.nms.Volume::detach_lun Detach device from a mirror com.nexenta.nms.Volume::attach_lun Attach a to an existing mirror. Otherwise, if mirror ... com.nexenta.nms.Volume::remove_lun Permanently remove a hot spare device from the volume. ... com.nexenta.nms.Volume::replace_lun Replace device in a mirror. The operation replaces with ...

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device)

39.34 com.nexenta.nms.Volume::vol_import (void) vol_import (string vold_name, string vold_id, string vnew_name, bool force, bool include_destroyed, dictionary {string => string} import_time_props)

Import a volume

Parameters

NAME TYPE DESCRIPTION

vold_name string The name of exported or destroyed volume. vold_id string ID of the exported or destroyed volume, as reported by com.nexenta.nms.Volume::get_import_volumes method. The numeric system-unique ID is optional and can be omitted, if using the volume name does not create an ambiguity.

vnew_name string Empty string '' - the imported volume retains its old name . Otherwise, the volume shows up in the system under the new name

force bool force = 0 | 1. Non-zero (true) - force the import, for example: if a volume was not exported, but physically removed. If you don't want to force the import, set the parameter to false.

include_destroyed bool include_destroyed = 0 | 1. Non-zero (true) - import destroyed volumes, zero (false) - do not import the destroyed volumes.

import_time_props dictionary { Property Name => Property Value } dictionary of property names and their values {string specified at volume-import time. => string}

No return values

Usage Examples

3. vol_import('vol1', '', '', 0, 0, {})

Import the exported volume 'vol1' under its own name.

6. vol_import('vol1', '4354576598783234', 'vol_new', 1, 0, {})

Force the import of volume 'vol1' also identified by its unique numeric identifier; use new name 'vol_new' for the imported volume

9. vol_create('vol1', '', '', 0, 0, { 'failmode' => 'wait' })

Import volume 'vol1' and simultaneously set its 'failmode' property to 'wait'

See Also

Method Short Description

com.nexenta.nms.Volume::get_import_volumes Get the information about all, or selected volumes that can ... com.nexenta.nms.Folder::create Create "paths" to folders com.nexenta.nms.Folder::create_snapshot Snapshot a given folder and possibly its sub-folders com.nexenta.nms.Folder::create_with_props Create a "path" of folders. This API method enables you ... com.nexenta.nms.Volume::vol_grow Grow a volume com.nexenta.nms.Volume::vol_create Create a volume

Previous Section: Virtual Runner Table Of Contents Next Section: Zvol (Emulated Volume-based Block Device) 40 Zvol (Emulated Volume-based Block Device)

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/Zvol com.nexenta.nms.Zvol Virtual Container Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION

info string wi General information about the object ipc_name string e Interface class name of the associated interface object name string ri The name of the object origin string c For cloned zvols - the snapshot from which the clone was created. The original zvol cannot be destroyed, even with '-r' or '-f' options, as long as a clone exists. scsidisk_guid string c GUID of SCSI disk scsidisk_state string c SCSI disk status scsidisk_writeback_cache string c Enable or disable write back cache for SCSI disk size string c zvol size (in MiB) size_bytes string c zvol size (in bytes) swap string c Value of this property is "yes", if zvol is used as a swap area;otherwise the value is "no" volume_name string c The name of the underlying volume zvol_name string c Partial zvol name. Note that a fully qualified zvol pathname is a combination of volume_name followed by zvol_name divided by '/', for example: 'vol1/zvol1'

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Container::destroy ['string', 'string'], [] com.nexenta.nms.Container::get_child_prop ['string', 'string'], ['string'] com.nexenta.nms.Container::get_child_props ['string', 'string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::get_names ['string'], [['array', 'string']] com.nexenta.nms.Container::get_names_by_prop ['string', 'string', 'string'], [['array', 'string']] com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Container::object_exists ['string'], ['bool'] com.nexenta.nms.Container::set_child_prop ['string', 'string', 'string'], [] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Container::trylock ['string', 'int32'], ['bool'] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Container::unlock ['string', 'int32'], [] com.nexenta.nms.Object::unlock_self ['int32'], []

40.1 com.nexenta.nms.Zvol::clone (void) clone (string zname_snapname, string target_zname)

Clone a zvol. The operation results in a writable zvol named , with its initial contents identical to the one of the snapshot

Parameters

NAME TYPE DESCRIPTION

zname_snapname string A fully qualified snapshot name with the following layout: zname@snapname. For exmaple, clone('vol1/zvol1@today', ...) results in cloning zvol 'vol1/zvol1' at the exact point in time of creation snapshot 'vol1/zvol1@today' and with the exact content captured by the 'vol1/zvol1@today'. To clone folders, use com.nexenta.nms.Folder::clone API. target_zname string The name of the target cloned zvol.

No return values

Usage Examples

3. clone('vol1/a/zvol2@today', 'vol1/clone_ab')

Clone 'vol1/a/zvol2@today' as a new zvol 'vol1/clone_ab'

See Also

Method Short Description

com.nexenta.nms.Snapshot::create Create (ie, take) snapshots, recursively or non-recursively, depending on the ... com.nexenta.nms.Folder::clone Create a clone of a snapshot. Clone is a writable ...

Previous Section: Volume (Pool) Table Of Contents Next Section: com.nexenta.nms.Profiler

40.2 com.nexenta.nms.Zvol::create

(void) create (string zname, string devsize, string blocksize, bool sparse)

Create a new zvol. NexentaStor provides an easy iSCSI and FC target integration through zvol. Zvol is an emulated (virtual) block device based on a the NexentaStor volume. You can use zvol as an additional swap partition, but its primary usage is providing the storage using iSCSI and FC. Zvol is a powerful and flexible tool, because of its tight integration with appliance's storage services; these storage services enables you to manage, compress, replicate, take snapshots of a zvol and so on. Being a block device, zvol is effectively a LUN remotely accessible through iSCSI or FC.

Parameters

NAME TYPE DESCRIPTION

zname string Zvol pathname, for example 'vol1/zvol1', where 'vol1' is the name of an underlying volume devsize string Maximum size of the device, e.g.: 100GB, 500M, 100K blocksize string Block size of the device (default 8KB) sparse bool sparse = 0 | 1, 1- true, 0 - false. If true, creates a "sparse" (that is, thinly provisioned) device with no initial reservation. A thinly provisioned zvol starts small and then possibly grows up to the specified . The effective used size is limited by the specified

No return values

Usage Examples 3. create('vol1/zvol1', '500GB', '128KB', 1)

Create sparse block device based on the volume 'vol1', with maximum size 500 GB and block size 128 KB

See Also

Method Short Description

com.nexenta.nms.Folder::create Create "paths" to folders com.nexenta.nms.Folder::create_snapshot Snapshot a given folder and possibly its sub-folders com.nexenta.nms.Folder::create_with_props Create a "path" of folders. This API method enables you ... com.nexenta.nms.Volume::vol_create Create a volume

Previous Section: Volume (Pool) Table Of Contents Next Section: com.nexenta.nms.Profiler

40.3 com.nexenta.nms.Zvol::create_snapshot

(void) create_snapshot (string zname, string snapname, string cmdopt)

Snapshot a given zvol

Parameters

NAME TYPE DESCRIPTION

zname string Zvol pathname - a fully qualified name of the zvol object snapname string A partial name of the snapshot that you want to create, for example: today cmdopt string ZFS command option

No return values

Usage Examples

3. create_snapshot('vol1/zvol1', 'today', )

Non-recursively snapshot block device 'vol1/zvol1', and name the snapshot 'vol1/zvol1@today'

Previous Section: Volume (Pool) Table Of Contents Next Section: com.nexenta.nms.Profiler

40.4 com.nexenta.nms.Zvol::create_with_props

(void) create_with_props (string zname, string devsize, string blocksize, bool sparse, dictionary {string => string} creation_time_props)

Create a new zvol. This API method enables you to specify the creation time properties (compare with com.nexenta.nms.Zvol::create). Zvol is an emulated (virtual) block device based on a the NexentaStor volume. You can use zvol as an additional swap partition, but its primary usage is providing the storage using iSCSI and FC. Zvol is a powerful and flexible tool, because of its tight integration with appliance's storage services; these storage services enables you to manage, compress, replicate, take snapshots of a zvol and so on. Being a block device, zvol is effectively a LUN remotely accessible through iSCSI or FC. Parameters

NAME TYPE DESCRIPTION

zname string Zvol pathname, for example 'vol1/zvol1', where 'vol1' is the name of an underlying volume

devsize string Maximum size of the device, e.g.: 100GB, 500M, 100K blocksize string Block size of the device (default 8KB) sparse bool sparse = 0 | 1. If true (non-zero), creates a "sparse" (that is, thinly provisioned) device with no initial reservation. A thinly provisioned zvol starts with a minimum capacity qhich is required to store the zvol's metadata, and then grows to the specified . The effective used size is limited by the specified

creation_time_props dictionary { Property Name => Property Value } dictionary of property names and their values {string specified at the creation time. => string}

No return values

Usage Examples

3. create_with_props('vol1/zvol1', '500GB', '128KB', 1, {})

Create sparse block device based on volume 'vol1', with maximum size 500 GB and block size 128 KB. Note that in this example an empty dictionary is passed for creation_time_props.

See Also

Method Short Description

com.nexenta.nms.Zvol::create Create a new zvol. NexentaStor provides an easy iSCSI and ... com.nexenta.nms.Container::destroy Destroy a child object. com.nexenta.nms.Snapshot::create Create (ie, take) snapshots, recursively or non-recursively, depending on the ...

Previous Section: Volume (Pool) Table Of Contents Next Section: com.nexenta.nms.Profiler

40.5 com.nexenta.nms.Zvol::get_prop_valid_values

(array of (string)) get_prop_valid_values (string prop_name)

Get a valid range and/or enumeration for a given zvol's property.

Parameters

NAME TYPE DESCRIPTION

prop_name string The name of the property.

Return Value

TYPE DESCRIPTION

array of (string) List of valid values for the specified property

Usage Examples

3. get_prop_valid_values('available') Returns ('').

6. get_prop_valid_values('recordsize')

Returns ('512 to 128k, power of 2').

9. get_prop_valid_values('volsize')

Returns ('size').

See Also

Method Short Description

com.nexenta.nms.Folder::get_prop_valid_values Get the valid range and/or enumeration for a given folder's ... com.nexenta.nms.Volume::get_prop_valid_values Get the valid range and/or enumeration for a given volume's ...

Previous Section: Volume (Pool) Table Of Contents Next Section: com.nexenta.nms.Profiler

40.6 com.nexenta.nms.Zvol::has_zfs_prop

(bool) has_zfs_prop (string zname, string prop)

Determine if zfs property exists or not

Parameters

NAME TYPE DESCRIPTION

zname string ZFS name prop string Property name

Return Value

TYPE DESCRIPTION

bool return = 1 | 0, 1 - exist, 0 - does not exist

Previous Section: Volume (Pool) Table Of Contents Next Section: com.nexenta.nms.Profiler

41 Profiler

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/Profiler com.nexenta.nms.Profiler Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION info string wi General information about the object ipc_name string e Interface class name of the associated interface object name string ri The name of the object

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Object::unlock_self ['int32'], []

42 iSCSI Initiator

SA-API Interface Object

D-Bus name Interface class name Inherits

/Root/Iscsi com.nexenta.nms.Iscsi Virtual Base Object

Properties

NAME TYPE ACCESS DESCRIPTION

info string wi General information about the object ipc_name string e Interface class name of the associated interface object name string ri The name of the object

Inherited Methods

NAME PROTOTYPE

com.nexenta.nms.Object::get_prop ['string'], ['string'] com.nexenta.nms.Object::get_props ['string'], [['dict', 'string', 'string']] com.nexenta.nms.Object::set_prop ['string', 'string'], [] com.nexenta.nms.Object::set_props [['dict', 'string', 'string']], [] com.nexenta.nms.Object::trylock_self ['int32'], ['bool'] com.nexenta.nms.Object::unlock_self ['int32'], []

42.1 com.nexenta.nms.Iscsi::get_all_luns

(array of (string)) get_all_luns (void)

Get the list of all iSCSI attached LUNs (disks).

No parameters

Return Value TYPE DESCRIPTION

array of (string) List of LUNs that are attached through iSCSI

See Also

Method Short Description

com.nexenta.nms.Iscsi::get_target_props Get the iSCSI Target default and user-defined parameters. com.nexenta.nms.Iscsi::get_target_config Get the iSCSI Target configuration. The list of configurable parameters ... com.nexenta.nms.Iscsi::set_target_config Update the iSCSI Target configuration. com.nexenta.nms.Iscsi::get_sessions Get the list of active iSCSI sessions. com.nexenta.nms.Iscsi::get_connections Get all connections for a given iSCSI session between the ... com.nexenta.nms.Iscsi::get_luns Get the list of LUNs for the specified iSCSI Target. ... com.nexenta.nms.Iscsi::get_targets List the available iSCSI Targets. The result can be used ... com.nexenta.nms.Iscsi::setup_discovery Setup iSCSI discovery com.nexenta.nms.Iscsi::get_discovery List (TargetName, TargetAddress, TPGT) triplets for all configured discoveries. ...

com.nexenta.nms.Iscsi::get_discovery_state Get the discovery state for the discovery method. com.nexenta.nms.Iscsi::list_discovery Get the list of discovery settings for the discovery method ... com.nexenta.nms.Iscsi::get_defaults Get the Initiator parameters. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ...

com.nexenta.nms.Iscsi::set_default Update the Initiator parameter. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ...

com.nexenta.nms.Iscsi::remove_target Remove a set of specified target parameters

Previous Section: com.nexenta.nms.Profiler

42.2 com.nexenta.nms.Iscsi::get_connections

(dictionary {int32 => dictionary {string => string}}) get_connections (string target_name, string isid)

Get all connections for a given iSCSI session between the Initiator and the specified Target

Parameters

NAME TYPE DESCRIPTION

target_name string The IQN name of the iSCSI Target, for example 'iqn.1986-03.com.sun:02:5d2664ea-f75a-4ef2- aa85-8656220acf19'.

isid string Initiator session ID (ISID)

Return Value

TYPE DESCRIPTION

dictionary {int32 => dictionary {string => string}} Hash that contains the information about the connections

See Also

Method Short Description

com.nexenta.nms.Iscsi::get_target_props Get the iSCSI Target default and user-defined parameters.

com.nexenta.nms.Iscsi::get_target_config Get the iSCSI Target configuration. The list of configurable parameters ... com.nexenta.nms.Iscsi::set_target_config Update the iSCSI Target configuration. com.nexenta.nms.Iscsi::get_sessions Get the list of active iSCSI sessions. com.nexenta.nms.Iscsi::get_targets List the available iSCSI Targets. The result can be used ... com.nexenta.nms.Iscsi::get_luns Get the list of LUNs for the specified iSCSI Target. ... com.nexenta.nms.Iscsi::get_all_luns Get the list of all iSCSI attached LUNs (disks). ... com.nexenta.nms.Iscsi::setup_discovery Setup iSCSI discovery com.nexenta.nms.Iscsi::get_discovery List (TargetName, TargetAddress, TPGT) triplets for all configured discoveries. ...

com.nexenta.nms.Iscsi::get_discovery_state Get the discovery state for the discovery method. com.nexenta.nms.Iscsi::list_discovery Get the list of discovery settings for the discovery method ... com.nexenta.nms.Iscsi::get_defaults Get the Initiator parameters. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ...

com.nexenta.nms.Iscsi::set_default Update the Initiator parameter. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ...

com.nexenta.nms.Iscsi::remove_target Remove a set of specified target parameters

Previous Section: com.nexenta.nms.Profiler

42.3 com.nexenta.nms.Iscsi::get_defaults

(dictionary {string => string}) get_defaults (void)

Get the Initiator parameters. The list includes: InitiatorName, InitiatorAlias, AuthMethod, RadiusServer, RadiusAccess, NumberOfSession, CHAPName, HeaderDigest, DataDigest. These are the parameters that Initiator uses to negotiate new iSCSI sessions and connections.

No parameters

Return Value

TYPE DESCRIPTION

dictionary {string => string} List of default iSCSI parameters

Usage Examples

3. get_defaults()

Get the default iSCSI Initiator parameters

See Also

Method Short Description

com.nexenta.nms.Iscsi::get_target_props Get the iSCSI Target default and user-defined parameters. com.nexenta.nms.Iscsi::get_target_config Get the iSCSI Target configuration. The list of configurable parameters ... com.nexenta.nms.Iscsi::set_target_config Update the iSCSI Target configuration. com.nexenta.nms.Iscsi::get_sessions Get the list of active iSCSI sessions. com.nexenta.nms.Iscsi::get_connections Get all connections for a given iSCSI session between the ... com.nexenta.nms.Iscsi::get_luns Get the list of LUNs for the specified iSCSI Target. ... com.nexenta.nms.Iscsi::get_all_luns Get the list of all iSCSI attached LUNs (disks). ... com.nexenta.nms.Iscsi::setup_discovery Setup iSCSI discovery com.nexenta.nms.Iscsi::get_discovery List (TargetName, TargetAddress, TPGT) triplets for all configured discoveries. ...

com.nexenta.nms.Iscsi::get_discovery_state Get the discovery state for the discovery method. com.nexenta.nms.Iscsi::list_discovery Get the list of discovery settings for the discovery method ... com.nexenta.nms.Iscsi::get_targets List the available iSCSI Targets. The result can be used ... com.nexenta.nms.Iscsi::set_default Update the Initiator parameter. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ...

com.nexenta.nms.Iscsi::remove_target Remove a set of specified target parameters

Previous Section: com.nexenta.nms.Profiler

42.4 com.nexenta.nms.Iscsi::get_discovery

(dictionary {int32 => dictionary {string => string}}) get_discovery (string method, string params)

List (TargetName, TargetAddress, TPGT) triplets for all configured discoveries.

Parameters

NAME TYPE DESCRIPTION

method string method = 'static-config' | 'discovery-address' | 'isns-server'. The NexentaStor appliance supports the following discovery mechanisms: 1) Static, 2) Discovery by the IQN name of the Target 3) Dynamic mechanisms: a) Through SendTargets discovery session b) Through iSNS (Internet Storage Name Service) server.

params string Parameters of the command and method, see iscsiadm(1m)

Return Value

TYPE DESCRIPTION

dictionary {int32 => dictionary {string => Hash that contains TargetName, TargetAddress, and TPGT for all string}} targets

See Also

Method Short Description

com.nexenta.nms.Iscsi::get_target_props Get the iSCSI Target default and user-defined parameters. com.nexenta.nms.Iscsi::get_target_config Get the iSCSI Target configuration. The list of configurable parameters ... com.nexenta.nms.Iscsi::set_target_config Update the iSCSI Target configuration. com.nexenta.nms.Iscsi::get_sessions Get the list of active iSCSI sessions. com.nexenta.nms.Iscsi::get_connections Get all connections for a given iSCSI session between the ... com.nexenta.nms.Iscsi::get_luns Get the list of LUNs for the specified iSCSI Target. ... com.nexenta.nms.Iscsi::get_all_luns Get the list of all iSCSI attached LUNs (disks). ... com.nexenta.nms.Iscsi::setup_discovery Setup iSCSI discovery com.nexenta.nms.Iscsi::get_targets List the available iSCSI Targets. The result can be used ... com.nexenta.nms.Iscsi::get_discovery_state Get the discovery state for the discovery method. com.nexenta.nms.Iscsi::list_discovery Get the list of discovery settings for the discovery method ... com.nexenta.nms.Iscsi::get_defaults Get the Initiator parameters. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ...

com.nexenta.nms.Iscsi::set_default Update the Initiator parameter. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ...

com.nexenta.nms.Iscsi::remove_target Remove a set of specified target parameters

Previous Section: com.nexenta.nms.Profiler

42.5 com.nexenta.nms.Iscsi::get_discovery_state (int32) get_discovery_state (string method)

Get the discovery state for the discovery method.

Parameters

NAME TYPE DESCRIPTION

method string method = 'static-config' | 'discovery-address' | 'isns-server'. The NexentaStor appliance supports the following discovery mechanisms: 1) Static, 2) Discovery by the IQN name of the Target 3) Dynamic mechanisms: a) Through SendTargets discovery session b) Through iSNS (Internet Storage Name Service) server.

Return Value

TYPE DESCRIPTION

int32 return=0 | 1, 1 - enabled, 0 - disabled

Usage Examples

3. get_discovery_state('isns-server')

Verify if a discovery method through iSNS is enabled

See Also

Method Short Description

com.nexenta.nms.Iscsi::get_target_props Get the iSCSI Target default and user-defined parameters. com.nexenta.nms.Iscsi::get_target_config Get the iSCSI Target configuration. The list of configurable parameters ... com.nexenta.nms.Iscsi::set_target_config Update the iSCSI Target configuration. com.nexenta.nms.Iscsi::get_sessions Get the list of active iSCSI sessions. com.nexenta.nms.Iscsi::get_connections Get all connections for a given iSCSI session between the ... com.nexenta.nms.Iscsi::get_luns Get the list of LUNs for the specified iSCSI Target. ... com.nexenta.nms.Iscsi::get_all_luns Get the list of all iSCSI attached LUNs (disks). ... com.nexenta.nms.Iscsi::setup_discovery Setup iSCSI discovery com.nexenta.nms.Iscsi::get_discovery List (TargetName, TargetAddress, TPGT) triplets for all configured discoveries. ...

com.nexenta.nms.Iscsi::get_targets List the available iSCSI Targets. The result can be used ... com.nexenta.nms.Iscsi::list_discovery Get the list of discovery settings for the discovery method ... com.nexenta.nms.Iscsi::get_defaults Get the Initiator parameters. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ...

com.nexenta.nms.Iscsi::set_default Update the Initiator parameter. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ...

com.nexenta.nms.Iscsi::remove_target Remove a set of specified target parameters

Previous Section: com.nexenta.nms.Profiler

42.6 com.nexenta.nms.Iscsi::get_discovery_status

(dictionary {string => string}) get_discovery_status (void)

Get the discovery status. Returns more detailed information than 'get_discovery_state' method No parameters

Return Value

TYPE DESCRIPTION

dictionary {string => string} Hash that contains inforamtion about discovery process

Previous Section: com.nexenta.nms.Profiler

42.7 com.nexenta.nms.Iscsi::get_luns

(dictionary {int32 => dictionary {string => string}}) get_luns (string target_name)

Get the list of LUNs for the specified iSCSI Target.

Parameters

NAME TYPE DESCRIPTION

target_name string The IQN name of the iSCSI Target, for example 'iqn.1986-03.com.sun:02:5d2664ea-f75a-4ef2- aa85-8656220acf19'.

Return Value

TYPE DESCRIPTION

dictionary {int32 => dictionary {string => string}} List of LUNs for specified target

See Also

Method Short Description

com.nexenta.nms.Iscsi::get_target_props Get the iSCSI Target default and user-defined parameters. com.nexenta.nms.Iscsi::get_target_config Get the iSCSI Target configuration. The list of configurable parameters ... com.nexenta.nms.Iscsi::set_target_config Update the iSCSI Target configuration. com.nexenta.nms.Iscsi::get_sessions Get the list of active iSCSI sessions. com.nexenta.nms.Iscsi::get_connections Get all connections for a given iSCSI session between the ... com.nexenta.nms.Iscsi::get_targets List the available iSCSI Targets. The result can be used ... com.nexenta.nms.Iscsi::get_all_luns Get the list of all iSCSI attached LUNs (disks). ... com.nexenta.nms.Iscsi::setup_discovery Setup iSCSI discovery com.nexenta.nms.Iscsi::get_discovery List (TargetName, TargetAddress, TPGT) triplets for all configured discoveries. ...

com.nexenta.nms.Iscsi::get_discovery_state Get the discovery state for the discovery method. com.nexenta.nms.Iscsi::list_discovery Get the list of discovery settings for the discovery method ... com.nexenta.nms.Iscsi::get_defaults Get the Initiator parameters. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ...

com.nexenta.nms.Iscsi::set_default Update the Initiator parameter. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ...

com.nexenta.nms.Iscsi::remove_target Remove a set of specified target parameters

Previous Section: com.nexenta.nms.Profiler

42.8 com.nexenta.nms.Iscsi::get_sessions (array of (string)) get_sessions (string target_name)

Get the list of active iSCSI sessions.

Parameters

NAME TYPE DESCRIPTION

target_name string The IQN name of the iSCSI Target, for example 'iqn.1986-03.com.sun:02:5d2664ea-f75a-4ef2- aa85-8656220acf19'. The available iSCSI Targets are retrieved using com.nexenta.nms.Iscsi::get_targets method.

Return Value

TYPE DESCRIPTION

array of (string) List of active iSCSI sessions

See Also

Method Short Description

com.nexenta.nms.Iscsi::get_target_props Get the iSCSI Target default and user-defined parameters. com.nexenta.nms.Iscsi::get_target_config Get the iSCSI Target configuration. The list of configurable parameters ... com.nexenta.nms.Iscsi::set_target_config Update the iSCSI Target configuration. com.nexenta.nms.Iscsi::get_targets List the available iSCSI Targets. The result can be used ... com.nexenta.nms.Iscsi::get_connections Get all connections for a given iSCSI session between the ... com.nexenta.nms.Iscsi::get_luns Get the list of LUNs for the specified iSCSI Target. ... com.nexenta.nms.Iscsi::get_all_luns Get the list of all iSCSI attached LUNs (disks). ... com.nexenta.nms.Iscsi::setup_discovery Setup iSCSI discovery com.nexenta.nms.Iscsi::get_discovery List (TargetName, TargetAddress, TPGT) triplets for all configured discoveries. ...

com.nexenta.nms.Iscsi::get_discovery_state Get the discovery state for the discovery method. com.nexenta.nms.Iscsi::list_discovery Get the list of discovery settings for the discovery method ... com.nexenta.nms.Iscsi::get_defaults Get the Initiator parameters. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ...

com.nexenta.nms.Iscsi::set_default Update the Initiator parameter. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ...

com.nexenta.nms.Iscsi::remove_target Remove a set of specified target parameters

Previous Section: com.nexenta.nms.Profiler

42.9 com.nexenta.nms.Iscsi::get_target_config

(dictionary {string => string}) get_target_config (string target_name)

Get the iSCSI Target configuration. The list of configurable parameters includes: BidirectionalAuth, AuthMethod, CHAPName, NumberOfSessions, DataSequenceInOrder, DataPDUInOrder, DefaultTimeToRetain, DefaultTimeToWait, ErrorRecoveryLevel, FirstBurstLength, ImmediateData, InitialR2T, MaxBurstLength, MaxOutstandingR2T, MaxReceiveDataSegmentLength, MaxConnections, HeaderDigest, DataDigest

Parameters

NAME TYPE DESCRIPTION

target_name string The IQN name of the iSCSI Target, for example 'iqn.1986-03.com.sun:02:df28-e0a9-c479d0d93b'. The available iSCSI Targets are retrieved using com.nexenta.nms.Iscsi::get_targets method. Return Value

TYPE DESCRIPTION

dictionary {string => string} List of iSCSI Target configuration parameters

See Also

Method Short Description

com.nexenta.nms.Iscsi::get_target_props Get the iSCSI Target default and user-defined parameters. com.nexenta.nms.Iscsi::get_targets List the available iSCSI Targets. The result can be used ... com.nexenta.nms.Iscsi::set_target_config Update the iSCSI Target configuration. com.nexenta.nms.Iscsi::get_sessions Get the list of active iSCSI sessions. com.nexenta.nms.Iscsi::get_connections Get all connections for a given iSCSI session between the ... com.nexenta.nms.Iscsi::get_luns Get the list of LUNs for the specified iSCSI Target. ... com.nexenta.nms.Iscsi::get_all_luns Get the list of all iSCSI attached LUNs (disks). ... com.nexenta.nms.Iscsi::setup_discovery Setup iSCSI discovery com.nexenta.nms.Iscsi::get_discovery List (TargetName, TargetAddress, TPGT) triplets for all configured discoveries. ...

com.nexenta.nms.Iscsi::get_discovery_state Get the discovery state for the discovery method. com.nexenta.nms.Iscsi::list_discovery Get the list of discovery settings for the discovery method ... com.nexenta.nms.Iscsi::get_defaults Get the Initiator parameters. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ...

com.nexenta.nms.Iscsi::set_default Update the Initiator parameter. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ...

com.nexenta.nms.Iscsi::remove_target Remove a set of specified target parameters

Previous Section: com.nexenta.nms.Profiler

42.10 com.nexenta.nms.Iscsi::get_target_props

(dictionary {string => string}) get_target_props (string target_name)

Get the iSCSI Target default and user-defined parameters.

Parameters

NAME TYPE DESCRIPTION

target_name string The IQN name of the iSCSI Target, for example 'iqn.1986-03.com.sun:02:df28-e0a9-c479d0d93b'. The available iSCSI Targets are retrieved using com.nexenta.nms.Iscsi::get_targets method.

Return Value

TYPE DESCRIPTION

dictionary {string => string} List of iSCSI Target default and user-defined parameters

See Also

Method Short Description

com.nexenta.nms.Iscsi::get_targets List the available iSCSI Targets. The result can be used ...

com.nexenta.nms.Iscsi::get_target_config Get the iSCSI Target configuration. The list of configurable parameters ... com.nexenta.nms.Iscsi::set_target_config Update the iSCSI Target configuration. com.nexenta.nms.Iscsi::get_sessions Get the list of active iSCSI sessions. com.nexenta.nms.Iscsi::get_connections Get all connections for a given iSCSI session between the ... com.nexenta.nms.Iscsi::get_luns Get the list of LUNs for the specified iSCSI Target. ... com.nexenta.nms.Iscsi::get_all_luns Get the list of all iSCSI attached LUNs (disks). ... com.nexenta.nms.Iscsi::setup_discovery Setup iSCSI discovery com.nexenta.nms.Iscsi::get_discovery List (TargetName, TargetAddress, TPGT) triplets for all configured discoveries. ...

com.nexenta.nms.Iscsi::get_discovery_state Get the discovery state for the discovery method. com.nexenta.nms.Iscsi::list_discovery Get the list of discovery settings for the discovery method ... com.nexenta.nms.Iscsi::get_defaults Get the Initiator parameters. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ...

com.nexenta.nms.Iscsi::set_default Update the Initiator parameter. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ...

com.nexenta.nms.Iscsi::remove_target Remove a set of specified target parameters

Previous Section: com.nexenta.nms.Profiler

42.11 com.nexenta.nms.Iscsi::get_targets

(array of (string)) get_targets (void)

List the available iSCSI Targets. The result can be used to further query each target for its alias, portal groups and other parameters using com.nexenta.nms.Iscsi::get_target_props method.

No parameters

Return Value

TYPE DESCRIPTION

array of (string) List of available iSCSI Targets and their properties

See Also

Method Short Description

com.nexenta.nms.Iscsi::get_target_props Get the iSCSI Target default and user-defined parameters. com.nexenta.nms.Iscsi::get_target_config Get the iSCSI Target configuration. The list of configurable parameters ... com.nexenta.nms.Iscsi::set_target_config Update the iSCSI Target configuration. com.nexenta.nms.Iscsi::get_sessions Get the list of active iSCSI sessions. com.nexenta.nms.Iscsi::get_connections Get all connections for a given iSCSI session between the ... com.nexenta.nms.Iscsi::get_luns Get the list of LUNs for the specified iSCSI Target. ... com.nexenta.nms.Iscsi::get_all_luns Get the list of all iSCSI attached LUNs (disks). ... com.nexenta.nms.Iscsi::setup_discovery Setup iSCSI discovery com.nexenta.nms.Iscsi::get_discovery List (TargetName, TargetAddress, TPGT) triplets for all configured discoveries. ...

com.nexenta.nms.Iscsi::get_discovery_state Get the discovery state for the discovery method. com.nexenta.nms.Iscsi::list_discovery Get the list of discovery settings for the discovery method ... com.nexenta.nms.Iscsi::get_defaults Get the Initiator parameters. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ...

com.nexenta.nms.Iscsi::set_default Update the Initiator parameter. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ...

com.nexenta.nms.Iscsi::remove_target Remove a set of specified target parameters

Previous Section: com.nexenta.nms.Profiler 42.12 com.nexenta.nms.Iscsi::get_volumes

(array of (string)) get_volumes (void)

Get the list of volumes which are connected through iSCSI

No parameters

Return Value

TYPE DESCRIPTION

array of (string) List of volumes connected through iSCSI

Previous Section: com.nexenta.nms.Profiler

42.13 com.nexenta.nms.Iscsi::list_discovery

(array of (string)) list_discovery (string method)

Get the list of discovery settings for the discovery method

Parameters

NAME TYPE DESCRIPTION

method string method = 'static-config' | 'discovery-address' | 'isns-server'. The NexentaStor appliance supports the following discovery mechanisms: 1) Static, 2) Discovery by the IQN name of the Target 3) Dynamic mechanisms: a) Through SendTargets discovery session b) Through iSNS (Internet Storage Name Service) server.

Return Value

TYPE DESCRIPTION

array of (string) List of curent discovery settings for the specified discovery method

See Also

Method Short Description

com.nexenta.nms.Iscsi::get_target_props Get the iSCSI Target default and user-defined parameters. com.nexenta.nms.Iscsi::get_target_config Get the iSCSI Target configuration. The list of configurable parameters ... com.nexenta.nms.Iscsi::set_target_config Update the iSCSI Target configuration. com.nexenta.nms.Iscsi::get_sessions Get the list of active iSCSI sessions. com.nexenta.nms.Iscsi::get_connections Get all connections for a given iSCSI session between the ... com.nexenta.nms.Iscsi::get_luns Get the list of LUNs for the specified iSCSI Target. ... com.nexenta.nms.Iscsi::get_all_luns Get the list of all iSCSI attached LUNs (disks). ... com.nexenta.nms.Iscsi::setup_discovery Setup iSCSI discovery

com.nexenta.nms.Iscsi::get_discovery List (TargetName, TargetAddress, TPGT) triplets for all configured discoveries. ...

com.nexenta.nms.Iscsi::get_discovery_state Get the discovery state for the discovery method.

com.nexenta.nms.Iscsi::get_targets List the available iSCSI Targets. The result can be used ... com.nexenta.nms.Iscsi::get_defaults Get the Initiator parameters. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ... com.nexenta.nms.Iscsi::set_default Update the Initiator parameter. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ... com.nexenta.nms.Iscsi::remove_target Remove a set of specified target parameters

Previous Section: com.nexenta.nms.Profiler

42.14 com.nexenta.nms.Iscsi::remove_target

(void) remove_target (string target_name)

Remove a set of specified target parameters

Parameters

NAME TYPE DESCRIPTION

target_name string The IQN name of the iSCSI Target, for example 'iqn.1986-03.com.sun:02:5d2664ea-f75a-4ef2- aa85-8656220acf19'.

No return values

Usage Examples

3. remove_target('iqn.1986-03.com.sun:02:5d2664ea-f75a-4ef2-aa85-8656220acf19')

Remove the specified target. Note that some iSCSI connected LUNs may disappear; the appliance re- synchronizes the storage devices.

See Also

Method Short Description

com.nexenta.nms.Iscsi::get_target_props Get the iSCSI Target default and user-defined parameters. com.nexenta.nms.Iscsi::get_target_config Get the iSCSI Target configuration. The list of configurable parameters ... com.nexenta.nms.Iscsi::set_target_config Update the iSCSI Target configuration. com.nexenta.nms.Iscsi::get_sessions Get the list of active iSCSI sessions. com.nexenta.nms.Iscsi::get_connections Get all connections for a given iSCSI session between the ... com.nexenta.nms.Iscsi::get_luns Get the list of LUNs for the specified iSCSI Target. ... com.nexenta.nms.Iscsi::get_all_luns Get the list of all iSCSI attached LUNs (disks). ... com.nexenta.nms.Iscsi::setup_discovery Setup iSCSI discovery com.nexenta.nms.Iscsi::get_discovery List (TargetName, TargetAddress, TPGT) triplets for all configured discoveries. ...

com.nexenta.nms.Iscsi::get_discovery_state Get the discovery state for the discovery method. com.nexenta.nms.Iscsi::list_discovery Get the list of discovery settings for the discovery method ... com.nexenta.nms.Iscsi::get_defaults Get the Initiator parameters. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ...

com.nexenta.nms.Iscsi::set_default Update the Initiator parameter. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ...

com.nexenta.nms.Iscsi::get_targets List the available iSCSI Targets. The result can be used ...

Previous Section: com.nexenta.nms.Profiler 42.15 com.nexenta.nms.Iscsi::set_default

(void) set_default (string param_name, string param_value, string secret)

Update the Initiator parameter. The list includes: InitiatorName, InitiatorAlias, AuthMethod, RadiusServer, RadiusAccess, NumberOfSession, CHAPName, HeaderDigest, DataDigest

Parameters

NAME TYPE DESCRIPTION

param_name string The name of the configuration parameter: param_name = InitiatorName | InitiatorAlias | AuthMethod | RadiusServer | RadiusAccess | NumberOfSession | CHAPName | HeaderDigest | DataDigest

param_value string New value of the configuration parameter. secret string Secret key. The secret key is required for changing 'AuthMethod'; otherwise it is ignored.

No return values

Usage Examples

3. set_default('AuthMethod', 'CHAP', 'xxxxxxxxx')

Set AuthMethod = CHAP

6. set_default('RadiusServer', '192.168.102.155:1812', 'xxxxxxxxx')

Set the IP address and port number for the Radius Server

9. set_default('HeaderDigest', 'CRC32', '')

By default, enable the iSCSI header digest

12. set_default('DataDigest', 'NONE', '')

By default, disable the iSCSI header digest

See Also

Method Short Description

com.nexenta.nms.Iscsi::get_target_props Get the iSCSI Target default and user-defined parameters. com.nexenta.nms.Iscsi::get_target_config Get the iSCSI Target configuration. The list of configurable parameters ... com.nexenta.nms.Iscsi::set_target_config Update the iSCSI Target configuration. com.nexenta.nms.Iscsi::get_sessions Get the list of active iSCSI sessions. com.nexenta.nms.Iscsi::get_connections Get all connections for a given iSCSI session between the ... com.nexenta.nms.Iscsi::get_luns Get the list of LUNs for the specified iSCSI Target. ... com.nexenta.nms.Iscsi::get_all_luns Get the list of all iSCSI attached LUNs (disks). ... com.nexenta.nms.Iscsi::setup_discovery Setup iSCSI discovery com.nexenta.nms.Iscsi::get_discovery List (TargetName, TargetAddress, TPGT) triplets for all configured discoveries. ...

com.nexenta.nms.Iscsi::get_discovery_state Get the discovery state for the discovery method. com.nexenta.nms.Iscsi::list_discovery Get the list of discovery settings for the discovery method ... com.nexenta.nms.Iscsi::get_defaults Get the Initiator parameters. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ...

com.nexenta.nms.Iscsi::get_targets List the available iSCSI Targets. The result can be used ... com.nexenta.nms.Iscsi::remove_target Remove a set of specified target parameters

Previous Section: com.nexenta.nms.Profiler

42.16 com.nexenta.nms.Iscsi::set_target_config

(void) set_target_config (string target_name, string param_name, string param_value, string secret)

Update the iSCSI Target configuration.

Parameters

NAME TYPE DESCRIPTION

target_name string The IQN name of the iSCSI Target, for example 'iqn.1986-03.com.sun:02:df28-e0a9-c479d0d93b'. The available iSCSI Targets are retrieved with com.nexenta.nms.Iscsi::get_targets method. param_name string The name of the configuration parameter: param_name = BidirectionalAuth | AuthMethod | CHAPName | NumberOfSessions | DataSequenceInOrder | DataPDUInOrder | DefaultTimeToRetain | DefaultTimeToWait | ErrorRecoveryLevel | FirstBurstLength | ImmediateData | InitialR2T | MaxBurstLength | MaxOutstandingR2T | MaxReceiveDataSegmentLength | MaxConnections | HeaderDigest | DataDigest

param_value string New value of the configuration parameter. secret string Secret key. The secret key is required for changing 'AuthMethod'; otherwise it is ignored.

No return values

See Also

Method Short Description

com.nexenta.nms.Iscsi::get_target_props Get the iSCSI Target default and user-defined parameters. com.nexenta.nms.Iscsi::get_target_config Get the iSCSI Target configuration. The list of configurable parameters ... com.nexenta.nms.Iscsi::get_targets List the available iSCSI Targets. The result can be used ... com.nexenta.nms.Iscsi::get_sessions Get the list of active iSCSI sessions. com.nexenta.nms.Iscsi::get_connections Get all connections for a given iSCSI session between the ... com.nexenta.nms.Iscsi::get_luns Get the list of LUNs for the specified iSCSI Target. ... com.nexenta.nms.Iscsi::get_all_luns Get the list of all iSCSI attached LUNs (disks). ... com.nexenta.nms.Iscsi::setup_discovery Setup iSCSI discovery com.nexenta.nms.Iscsi::get_discovery List (TargetName, TargetAddress, TPGT) triplets for all configured discoveries. ...

com.nexenta.nms.Iscsi::get_discovery_state Get the discovery state for the discovery method. com.nexenta.nms.Iscsi::list_discovery Get the list of discovery settings for the discovery method ... com.nexenta.nms.Iscsi::get_defaults Get the Initiator parameters. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ...

com.nexenta.nms.Iscsi::set_default Update the Initiator parameter. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ...

com.nexenta.nms.Iscsi::remove_target Remove a set of specified target parameters

Previous Section: com.nexenta.nms.Profiler 42.17 com.nexenta.nms.Iscsi::setup_discovery

(void) setup_discovery (string cmd, string method, string params)

Setup iSCSI discovery

Parameters

NAME TYPE DESCRIPTION

cmd string cmd = 'add' | 'remove' | 'enable' | 'disable'. Add or remove, enable or disable an iSCSI discovery. method string method = 'static-config' | 'discovery-address' | 'isns-server'. The NexentaStor appliance supports the following discovery mechanisms: 1) Static, 2) Discovery by the IQN name of the Target 3) Dynamic mechanisms: a) Through SendTargets discovery session b) Through iSNS (Internet Storage Name Service) server.

params string The command and method parameters according to iscsiadm(1m). For example, params = '192.168.102.131:3260 192.168.102.132:3260' adds two discovery addresses when used with the cmd = 'add' and method = 'discovery-address'.

No return values

See Also

Method Short Description

com.nexenta.nms.Iscsi::get_target_props Get the iSCSI Target default and user-defined parameters. com.nexenta.nms.Iscsi::get_target_config Get the iSCSI Target configuration. The list of configurable parameters ... com.nexenta.nms.Iscsi::set_target_config Update the iSCSI Target configuration. com.nexenta.nms.Iscsi::get_sessions Get the list of active iSCSI sessions. com.nexenta.nms.Iscsi::get_connections Get all connections for a given iSCSI session between the ... com.nexenta.nms.Iscsi::get_luns Get the list of LUNs for the specified iSCSI Target. ... com.nexenta.nms.Iscsi::get_all_luns Get the list of all iSCSI attached LUNs (disks). ... com.nexenta.nms.Iscsi::get_targets List the available iSCSI Targets. The result can be used ... com.nexenta.nms.Iscsi::get_discovery List (TargetName, TargetAddress, TPGT) triplets for all configured discoveries. ...

com.nexenta.nms.Iscsi::get_discovery_state Get the discovery state for the discovery method. com.nexenta.nms.Iscsi::list_discovery Get the list of discovery settings for the discovery method ... com.nexenta.nms.Iscsi::get_defaults Get the Initiator parameters. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ...

com.nexenta.nms.Iscsi::set_default Update the Initiator parameter. The list includes: InitiatorName, InitiatorAlias, AuthMethod, ...

com.nexenta.nms.Iscsi::remove_target Remove a set of specified target parameters

Previous Section: com.nexenta.nms.Profiler

43 Examples and Usage Cases

All examples in this section universally initialize connection with the appliance via SA-API nms_client_init() method. The latter utilizes language-specific (binding) library to perform a number of validations and lower level operations. In all cases, by successfully executing nms_client_init() the client application affectively acquires local appliance's SA-API interface proxies and therefore, the immediate ability to execute all SA-API methods listed in this reference documentation.

For each interface proxy listed in the Section Object Model, nms_client_init() executes nms_remote_obj() to acquire the former on behalf of the client application. This just goes to demonstrate that, once nms_client_init() is performed, you can simply call SA-API methods using notation proxy_if->method(), for instance appliance->get_uptime() to get appliance's uptime. Rest of this section demonstrates the exact SA-API usage in detail, with real examples in C, Perl, Python and Ruby. All examples perform the same task, which is: initialize the connection, acquire LUN object proxy, and execute a number of SA-API methods on it.

43.1 C/C++

LUN test

/* * LUN test */

#include #include #include #include #ifdef _WIN32 #include #endif #include #include int main (int argc, char **argv) { struct nms_connection nms; /* connection to NMS server */ struct nms_message *msg; struct nms_message *msg_prop; int nms_error = 0; struct nms_object *lun; /* proxy for LUN interface */ char ip_addr[50]; /* NMS server IP address*/ char host[256]; /* complete NMS connection string*/ char *prop_name = "type"; /* Field for filtering*/ char *cd_value = "cdrom"; /* Filter value for CDROM drives*/ char *ide_scsi_value = "scsi|ide"; /* Filter value for IDE and * SCSI drives */ char *str_empty=""; char *prop_size = "size"; /* Requested property name*/ char *size_mb; /* Received property value*/ /* Getting NMS server IP address from user */ printf ("\nEnter NMS server IP address: "); scanf ("%s", ip_addr); sprintf (host, "tcp:host=%s,port=2001", ip_addr); /* Trying to connect to NMS server */ nms_error = nms_client_init (&nms, host); if (nms_error != 0) { const char *err_msg = nms_get_error_string (nms_error); printf ("\nFailed to connect to %s.\nERROR = %s", ip_addr, err_msg? err_msg : "unknown"); return 1; }; /* getting LUN proxy. * Do not free returned remote object. * It is freed automatically in nms_client_free */ lun = nms_remote_obj (&nms, "lun"); /* Getting a list of all attached CD-ROMs. * msg is equal to 0 in case of any error has occured */ printf ("Searching for CD_ROMs ...\n"); msg = nms_execute (lun, "get_names_by_prop", DBUS_TYPE_STRING, &prop_name, DBUS_TYPE_STRING, &cd_value, DBUS_TYPE_STRING, &str_empty, DBUS_TYPE_INVALID, 0); if (msg) { char **array; /* Reading the list of CD-ROMs from server reply message * count is equal to numer of drives and is equal to 0 * if no CD-ROM is attached or if any error has occured */ int count = nms_get_basic (msg, DBUS_TYPE_CHAR_ARRAY, &array); printf ("attached CDROM(s): \n"); if (count) { int i; for (i = 0; i < count; i++) printf (" %s\n", array[i]); /* Free memory allocate for the CD-ROM list */ free_char_array (&array, count); } else { printf (" No CD-ROM found\n"); }; /* Free all resources allocated for message */ nms_call_free (&msg); }; /* Getting a list of all attached IDE and SCSI drives. * msg is equal to 0 in case of any error has occured */ printf ("\nSearching for IDEs & SCSIs...\n"); msg = nms_execute (lun, "get_names_by_prop", DBUS TYPE STRING, &prop name, DBUS_TYPE_STRING, &ide_scsi_value, DBUS_TYPE_STRING, &str_empty, DBUS_TYPE_INVALID, 0); if (msg) { char **array; int i; /* Reading the drive list from server reply message * count is equal to numer of drives and is equal to 0 * if no drive is found */ int count = nms_get_basic (msg, DBUS_TYPE_CHAR_ARRAY, &array); printf ("attached drive(s): \n"); for (i = 0; i < count; i++) { printf (" %s - ", array[i]); /* Request a drive property `size` * msg_prop is equal to 0 if property does not exist */ msg_prop = nms_execute (lun, "get_child_prop", DBUS_TYPE_STRING, &array[i], DBUS_TYPE_STRING, &prop_size, DBUS_TYPE_INVALID, 0); if (msg_prop) { /* Getting the drive size from reply message * res is equal to 1 on success and 0 if * requested and recieved argument type are * mismatch */ int res = nms_get_basic (msg_prop, DBUS_TYPE_STRING, &size_mb); if (res) printf ("%s MB\n", size_mb); else printf ("unknown\\n"); /* Free all resources allocated for message */ nms_call_free (&msg_prop); } else { printf ("property not found\n"); }; } /* Free memory allocate for the drive list */ if (count) { free_char_array (&array, count); } else { printf (" No IDE found\n"); }; /* Free all resources allocated for message */ nms_call_free (&msg); }; /* Close connection and free all resources */ nms_client_free (&nms); return 1; };

43.2 Perl

LUN test

/* * LUN test */

use NZA::Common; use strict; if (nms_client_init('test') != 0) { print "Unable to initialize: $@\n"; exit (1); } my $lun = NZA::lun(); print "lun c0d0 exists\n" if ($lun->object_exists('c0d0')); my $cdroms = $lun->get_names_by_prop('type', 'cdrom', ''); print "attached CDROM(s): @$cdroms\n"; my $ides = $lun->get_names_by_prop('type', 'ide', ''); print "attached IDE(s): "; for my $d (@$ides) { print $d, "(", $lun->get_child_prop($d, 'size'), "MB)"; } print "\n"; print "write_cache\n"; my $ddisks = $lun->get_names(''); print "all disks: @$ddisks\n"; for my $d (@$ddisks) { eval { my $line = $lun->cache($d, $NZA::LUN_CACHE_TYPE_WRITE, $NZA::LUN_CACHE_DISPLAY); print "$d: $line\n"; }; if ($@) { print "$d: got exception $@\n"; } }

Zvol Management

use NZA::Common; use strict; if (nms_client_init('test') != 0) { print "Unable to initialize NMS: $@\n"; exit (1); } ## Vars ## my %zvol_props = ( 'compression' => 'on' ); my %lun_props = (); my $zname = 'tunk/zvol_test'; my $devsize = '10M'; my $blocksize = '128K'; my $user = 'root'; my $password = 'nexenta'; my $localhost = 'storage1.domain.local'; my $hostname = 'storage2.domain.local'; my $map_entry; my $group_name = 'test_group'; my %group_props = ( 'info' => '', '_yes' => ''); my @group_hosts = ( $localhost, $hostname ); ## Creating zvol ## &NZA::zvol->create_with_props($zname, $devsize, $blocksize, '', %zvol_props); ## Creating LUs ## my $lu = &NZA::plugin('nms-comstar', 'scsidisk'); $lu->create_lu($zname, %lun_props); ## Creating mapping ## $map_entry->{'lun'} = 10; $lu->add_lun_mapping_entry($zname, $map_entry); ## Get information about mapping ## my $mappings = $lu->list_lun_mapping_entries($zname); $map_entry = $mappings->[0]; ## Appliance binding ## &NZA::appliance->ssh_bind($user, $hostname, $password); ## Creating host group ## &NZA::appl_group->create($group_name, %group_props, @group_hosts);

Auto-Snap Creation

use NZA::Common; use NMC::Const; use strict; use warnings; my $svc; sub init_client { if (nms_client_init('test')) { print "Unable to initialize nms client: $@\n"; exit 1; } $svc = NZA::autosvc(); } sub create_service { my $exclude = 'foo_bar'; # Exclude. my $service = 'auto-snap'; # Service type. my $fs = 'data/source2'; # File system to snap. # # Some service property checks... # if (defined $exclude) { $exclude =~ s/^['"]+//; $exclude =~ s/['"]+$//; } else { $exclude = ""; } # ... my %rec = ( 'type' => "hourly", # enum type (see -i option), secondly, minutely, daily, monthly... 'period' => 1, # int (see -p option) 'day' => 0, # int 'hour' => 0, # int (-T) 'minute' => 0, # int (-T) 'keep_days' => 2, # int (-k) 'snap-recursive' => 0, # bool 'exclude' => $exclude, # str (-e) 'latest-suffix' => "latest", # str (-k) "foo_bar" or '__nolatest_'; 'comment' => "foo bar", # str (-I) 'trace_level' => $NZA::TRACE_LEVEL_DEFAULT, # int, 10,20,30. 'last_replic_time' => '0', # 'time_started' => 'N/A', # '_unique' => 'type period',# ); eval { my $fmri = $svc->fmri_create($service, $NMC::AUTO_SNAP_DESC, $fs, 1, \%rec); if (defined $fmri) { _poll_scheduled_fmri($service, $fmri); } }; if ($@) { print "Error:...$@"; } } # # Upon service creation - poll for state to stabilize # sub _poll_scheduled_fmri { my ($service, $fmri) = @_; while ($svc->get_state($fmri) eq $NZA::SMF_STATE_UNINITIALIZED) { sleep 1; } my $cnt = 0; while ($svc->get_state($fmri) eq $NZA::SMF_STATE_OFFLINE && $cnt++ < $NZA::SMF_POLL_STATE_CHANGE_SECONDS) { eval { $svc->enable($fmri); }; if ($@) { last; } sleep 1; } # transitioning... my $state = $svc->get_state($fmri); if ($state =~ /\*/) { sleep 2; } } # # Main # init_client(); create_service();

43.3 Python

LUN test

import sys import NZA from NZA import nms try: nms.connect() except NZA.NZAConnectionFailed: sys.exit(1) cdroms = nms.lun.get_names_by_prop('type', 'cdrom', '') print "attached CDROM(s): ", cdroms ides = nms.lun.get_names_by_prop('type', 'ide', '') print "attached IDE(s): "; for d in ides: print d, "(", nms.lun.get_child_prop(d, 'size'), "MB)"

43.4 Ruby

LUN test require 'NZA/Common.rb' if NZA.nms_client_init('test') != 0 exit(1) end lun = NZA.nms.get_object('lun') cdroms = lun.get_names_by_prop('type', 'cdrom', '') print "attached CDROM(s): ", cdroms, "\n" ides = lun.get_names_by_prop('type', 'ide', '') print "attached IDE(s): " ides.each do |d| size = lun.get_child_prop(d.to_s, 'size') print d, "(#{size} MB)\n" end

NexentaStor 4.x (C) Nexenta Systems, Inc. All rights reserved.