Distributed Tasks
you can manage distributed tasks in the system these tasks are processes that execute in the background to keep the system running smoothly and efficiently these ddl commands create tasks to rebuild damaged or missing segment data and check data integrity for information on managing tasks, see manage distributed tasks docid\ g fncnhsvg9jpq88u2wqc create task launches a new task privileges to create any task, you must have the system administrator role, which has the update privileges on the system syntax create task \[ task name ] type { rebuild | check disk | rebalance } \[ location { system | cluster cluster name | node node name } ] \[ options task option map \[, ] ] to create a task, you must specify a task type type rebuild docid\ nzcumjzl9xke v0x8uxho — reconstruct data segments by using erasure coded data in the same segment group check disk docid\ nzcumjzl9xke v0x8uxho — verify segments on a node by computing checksums rebalance docid\ nzcumjzl9xke v0x8uxho — distribute data evenly across disks in the system you can also optionally specify a location using the location keyword to execute the task supported values include system — targets all segments in the system if you do not specify the location keyword, system is the default value cluster — targets a specific cluster node — targets a specific node parameter data type description task name string optional the identifier for the task type string required specifies the type of the distributed task to create supported tasks are rebuild — rebuild task check disk — check disk task rebalance — rebalance task task names are case sensitive node name string this argument is required only if your task targets a node with the location node keywords the name of a specific node for the task to target cluster name string this argument is required only if your task targets a cluster with the location cluster keywords the name of a specific cluster for the task to target task option map key value pairs optional a comma separated list of task specific options in key value pair format key = value rebuild task performing a rebuild segment operation reconstructs data segments by using erasure coded data in the same segment group this task allows the system to restore segments that are in the damaged damaged or missing missing status to full performance for details on rebuild tasks, see guide to rebuilding segments docid\ k7yexxwh7npsrmkcze8 b the rebuild task supports only the system and cluster locations if you attempt the rebuild task on the node, the system returns an error to rebuild a single node, use the cluster location with the location cluster keywords include the name of the node you want to rebuild as one of the key value options rebuild options ( task option map ) the rebuild task supports these options you must specify these options as a comma separated list of key value pairs option key value type description node string limits the rebuild operation to only segments on the specified node segment groups list limits the rebuild operation to the specified segment group identifiers specify this option as a bracketed list, e g , \[ id1, id2, ] table id string limits the rebuild to segment groups belonging to a specific table identifier examples rebuild all segments on the system this example performs a system wide rebuild task create task type rebuild location system; rebuild segments on the specific table this example rebuilds all segments on a system for the specified table with the table identifier 529a2e9d d06c 46cd a93b 624d3bed1c08 create task type rebuild options table id = '529a2e9d d06c 46cd a93b 624d3bed1c08'; rebuild segments on the specific cluster this example rebuilds segments on the foundation cluster my lts cluster1 create task type rebuild location cluster my lts cluster1; rebuild segments on the specific node this example rebuilds segments on the foundation node my node1 in the foundation cluster my lts cluster1 create task type rebuild location cluster my lts cluster1 options node = 'my node1'; rebuild the specific segment group this example rebuilds segments in the segment group with the identifier 53 in the foundation cluster my lts cluster1 create task type rebuild location cluster my lts cluster1 options segment groups = \[ 53 ]; create a named task this example creates the rebuild task named my rebuild task in the foundation cluster my lts cluster1 create task my rebuild task type rebuild location cluster my lts cluster1; check disk task the check disk task verifies the integrity of data segments on storage nodes by computing checksums the task compares stored checksums with recomputed ones to detect disk corruption check disk options ( task option map ) the check disk task supports these options you must specify these options as a comma separated list of key value pairs option key value type description fix boolean if you set this option value to true , the task modifies the storage cluster state based on the checksum result for example, if the task finds a segment that fails the checksum, the task sets its segment state to damaged otherwise, the task reports any segments that fail the checksum, but it does not alter segment states the default value is false sample boolean if you set this option value to true , the task checks only a sample of data in each segment the default value is false only unhealthy boolean if you set this option value to true , the task checks only segments that are not in the intact state the default value is false storage ids list this option limits the check disk task to only a specific list of storage identifiers specify these storage identifiers as a bracketed list, e g , \[ 'id1', 'id2', ] examples perform checksum on the specific node this example computes the checksum on all segments on storage node my node1 create task type check disk location node 'my node1'; perform a checksum on the specific cluster this example computes a checksum for a sample of blocks in each segment of the storage cluster my lts cluster1 using the sample = true key value pair create task type check disk location cluster my lts cluster1 options sample = true; compute checksum on the specific storage identifier this example computes a checksum for the segment with the storage identifier 529a2e9d d06c 46cd a93b 624d3bed1c08 on the storage node my node1 create task type check disk location node 'my node1' options storage ids = \[ '529a2e9d d06c 46cd a93b 624d3bed1c08' ]; rebalance task rebalancing evenly distributes data across disks in the system execute this task if data is not properly balanced across the system, such as after adding nodes or drives for details on performing a rebalance task, see expand and rebalance system docid 27hagv7gsqdyxpcoaklmz the rebalance task supports only system and cluster locations if you attempt the rebalance task on a node, the system returns an error example this example performs a rebalance task across all foundation clusters create task type rebalance; cancel task cancels a running task privileges to cancel a task, you must be assigned the system administrator role syntax cancel task ('task name' | 'task id') parameter data type description task name string the name specified on task creation this applies only if an optional name was created for the task task id string the unique identifier for the task in the system tables for rebuild tasks, you can find the unique identifier in the sys result cache docid\ fg0berygjpzqfr7dp pqv table for check disk tasks, you can find the unique identifier in the sys subtasks docid\ fg0berygjpzqfr7dp pqv table example cancel a task named my task cancel task 'my task'; related links system catalog https //docs ocient com/system catalog guide to rebuilding segments docid\ k7yexxwh7npsrmkcze8 b