'\" t .\" Title: ocf_heartbeat_mdraid .\" Author: ClusterLabs contributors (see the resource agent source for information about individual authors) .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 04/13/2023 .\" Manual: OCF resource agents .\" Source: resource-agents 4.12.0-2 .\" Language: English .\" .TH "OCF_HEARTBEAT_MDRAID" "7" "04/13/2023" "resource-agents 4.12.0-2" "OCF resource agents" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" ocf_heartbeat_mdraid \- Manages Linux software RAID (MD) devices on shared storage .SH "SYNOPSIS" .HP \w'\fBmdraid\fR\ 'u \fBmdraid\fR [start | stop | monitor | meta\-data | validate\-all] .SH "DESCRIPTION" .PP This resource agent manages Linux software RAID (MD) devices on a shared storage medium ensuring that non\-clustered MD arrays are prohibited from starting cloned (which would cause data corruption (e\&.g\&., on raid6 arrays) unless forced (see force_clones parameter)\&. Clustered MD RAID layouts (see below) will be discovered and allowed cloning by default; no need to set force_clones\&. .PP It uses mdadm(8) to start, stop, and monitor the MD devices\&. .PP Supported clustered (i\&.e\&., clonable active\-active) arrays are linear, raid0, and clustered raid1/raid10 (i\&.e\&. mdadm(8) created with .PP \-\-bitmap=clustered)\&. .PP Option: OCF_CHECK_LEVEL .PP When OCF_CHECK_LEVEL is set to any number greater than 0, the standard monitor operation (including probe) will check the array and attempt recovery sequence to re\-add devices if any failed device exists\&. By default, OCF_CHECK_LEVEL is unset, and this is disabled\&. .PP .SH "SUPPORTED PARAMETERS" .PP \fBmdadm_conf\fR .RS 4 The MD RAID configuration file (e\&.g\&., /etc/mdadm\&.conf)\&. .sp (required, string, no default) .RE .PP \fBmd_dev\fR .RS 4 MD array block device to use (e\&.g\&., /dev/md0 or /dev/md/3)\&. With shared access to the array\*(Aqs storage, this should preferably be a clustered raid1 or raid10 array created with \-\-bitmap=clustered, assuming its resource will be cloned (i\&.e\&., active\-active access)\&. .sp Be sure to disable auto\-assembly for the resource\-managed arrays! .sp (required, string, no default) .RE .PP \fBforce_stop\fR .RS 4 If processes or kernel threads are using the array, it cannot be stopped\&. We will try to stop processes, first by sending TERM and then, if that doesn\*(Aqt help in seconds, using KILL\&. The lsof(8) program is required to get the list of array users\&. Of course, the kernel threads cannot be stopped this way\&. If the processes are critical for data integrity, then set this parameter to false\&. Note that in that case the stop operation will fail and the node will be fenced\&. .sp (optional, boolean, default false) .RE .PP \fBwait_for_udev\fR .RS 4 Wait until udevd creates a device in the start operation\&. On a normally loaded host this should happen quickly, but you may be unlucky\&. If you are not using udev set this to "no"\&. .sp (optional, boolean, default true) .RE .PP \fBforce_clones\fR .RS 4 Activating the same, non\-clustered MD RAID array (i\&.e\&. single\-host raid1/4/5/6/10) on multiple nodes at the same time will result in data corruption and thus is forbidden by default\&. .sp A safe example could be an (exotic) array that is only named identically across all nodes, but is in fact based on distinct (non\-shared) storage\&. .sp Only set this to "true" if you know what you are doing! .sp (optional, boolean, default false) .RE .SH "SUPPORTED ACTIONS" .PP This resource agent supports the following actions (operations): .PP \fBstart\fR .RS 4 Starts the resource\&. Suggested minimum timeout: 20s\&. .RE .PP \fBstop\fR .RS 4 Stops the resource\&. Suggested minimum timeout: 20s\&. .RE .PP \fBmonitor\fR .RS 4 Performs a detailed status check\&. Suggested minimum timeout: 20s\&. Suggested interval: 10s\&. .RE .PP \fBvalidate\-all\fR .RS 4 Performs a validation of the resource configuration\&. Suggested minimum timeout: 5s\&. .RE .PP \fBmeta\-data\fR .RS 4 Retrieves resource agent metadata (internal use only)\&. Suggested minimum timeout: 5s\&. .RE .SH "EXAMPLE CRM SHELL" .PP The following is an example configuration for a mdraid resource using the \fBcrm\fR(8) shell: .sp .if n \{\ .RS 4 .\} .nf primitive p_mdraid ocf:heartbeat:mdraid \e params \e mdadm_conf=\fIstring\fR \e md_dev=\fIstring\fR \e op monitor depth="0" timeout="20s" interval="10s" .fi .if n \{\ .RE .\} .SH "EXAMPLE PCS" .PP The following is an example configuration for a mdraid resource using \fBpcs\fR(8) .sp .if n \{\ .RS 4 .\} .nf pcs resource create p_mdraid ocf:heartbeat:mdraid \e mdadm_conf=\fIstring\fR \e md_dev=\fIstring\fR \e op monitor OCF_CHECK_LEVEL="0" timeout="20s" interval="10s" .fi .if n \{\ .RE .\} .SH "SEE ALSO" .PP \m[blue]\fB\%http://clusterlabs.org/\fR\m[] .SH "AUTHOR" .PP \fBClusterLabs contributors (see the resource agent source for information about individual authors)\fR