6.8 Create RAID

create raid <name> <raid> [type] <size> <device> [stripe] [part]

Create an NSS software RAID device or an SBD software RAID device.

nlvm [nlvm_options] create raid <name> <raid> [type] <size> <device> [stripe] [part]

Command Options

name=raid_name

Mandatory except when you mirror an existing SBD partition. This name must be unique from other RAID devices. The RAID name is case sensitive.

When you create an NSS software RAID device, you must specify the name of the device to create.

When you create a new OES Cluster Services SBD RAID 1 device, you must specify the name of the device to create. The name must match the name of an existing cluster (such as cluster1) that has a Cluster object in NetIQ eDirectory. This allows the SBD to be used by the cluster. The name is case sensitive.

When you mirror an existing OES Cluster Services SBD partition, the name is optional. If you specify a name (which should be the cluster name), the RAID 1 is given that name. If the name is not specified, the RAID 1 name defaults to the SBD partition’s name.

RAID names are 2 to 58 characters. Names are preferred to use characters A to Z, a to z, 0 to 9, and underscore (_). Names cannot start or end in underscore, and cannot contain double underscores. Printable ASCII characters (see decimal codes 33 to 122 in a code chart) are valid.

RAID names can also contain the following special characters:

!@#$%&()

Names that contain special characters must be enclosed in quotation marks in all commands and scripts. On the BASH command line, each special character must be escaped by preceding it with a backslash character (\).

The names cannot be reserved names such as con, com, lpt, pipe, all, and so on.

Example

name=MYRAID1
raid=<0|1|5>

Mandatory. Specify the RAID type. Valid options are 0 for striping, 1 for mirrored, or 5 for striping with parity.

Example

raid=1
type=<nss|sbd>

Mandatory except when you mirror an existing partition. Specify the type of partition to mirror. This option is used only for RAID 1. Valid options are nss and sbd (OES Cluster Services split-brain detector). The default mirror type is nss.

Before you create a new SBD RAID 1, you must take the cluster down, and stop OES Cluster Services from running on all nodes. This is not necessary when you mirror an existing SBD partition.

Examples

type=nss
type=sbd
size=<value[K|M|G|T]|max>

Mandatory except when you mirror an existing partition. Specify the size of each segment of the RAID. The minimum size is 12 megabytes.

Because a physical partition must end on a cylinder boundary, its size might be slightly smaller than the size you specify. If the size does not fall naturally on a cylinder boundary, the partition size is rounded down for Novell type partitions.

Examples

size=20G
size=1.45T
device=devicename

Mandatory. Specify the device to create a RAID segment on. This option is used multiple times, once for each segment to create. RAID 0 or RAID 1 requires a minimum of two devices. RAID 5 requires a minimum of three devices. Devices must be unique for each instance.

Example

device=sdb device=sdc device=sdd
stripe=stripe_size

Specify the RAID stripe size in bytes. This option is applicable only for RAID 0 and RAID 5. The stripe size must be a power of 2, with a minimum size of 4 KB and a maximum size of 256 KB. The default stripe size is 64 KB.

Example

stripe=64K
part=partition_name

Specify the node name for the partition to be mirrored. Use this option to mirror an existing NSS partition (such as sdc1.1) or OES Cluster Services SBD partition (such as cluster1.sbd). The existing partition is the first segment of a RAID 1 mirror.

If the part option is used, the RAID size option is ignored. Each segment’s size is the size of the existing partition. The data on the original partition is mirrored on up to three specified devices.

After you mirror the partition, you manage the RAID 1 device by using the normal NSS software RAID management tools and commands.

Examples

part=sdc1.1
part=cluster1.sbd

Command Examples

nlvm create raid name=MYRAID5 size=20G raid=5 device=sdb device=sdc device=sdd

Create a RAID 5 (striping with parity) device that has segments of 20 GB each on devices /dev/sdb, /dev/sdc, and /dev/sdd. The default stripe size of 64 KB is automatically applied. The default partition type is nss.

nlvm create raid name=MYRAID1 raid=1 device=sdf part=sdc1.1

Create a RAID 1 (mirror) for the existing NSS pool partition /dev/sdc1.1 on the /dev/sdf device. The partition type is the same as the existing partition’s type. The pool’s existing partition becomes the first segment of the RAID, and its existing data is mirrored to device /dev/sdf.

nlvm -s create raid name=cluster1 raid=1 type=sbd device=sdc size=max device=sde

Before you issue the command, take the cluster down, and then stop OES Cluster Services on all nodes. Create a new OES Cluster Services SBD RAID 1 device for a cluster named cluster1. Use devices sdc and sde. Use the maximum space available as the partition size, based on the smaller of the two devices. Specify the size only once. Use the -s NLVM option to override the shared locking requirement and force the command to execute. Afterwards, join the nodes to the cluster.

nlvm create raid name=cluster2 raid=1 part=cluster2.sbd device=sdf

Mirror an existing OES Cluster Services SBD partition named cluster2.sbd. The RAID type is RAID 1. The name cluster2 is the same name as the cluster that uses the SBD partition. This name is also the same as the label on the existing SBD partition. The partition is mirrored on the previously initialized and shared device /dev/sdf. Device sdf is at least the size of the existing partition, and can be formatted as MSDOS or GPT. The new SBD RAID 1 device is named cluster2.sbd. The mirrored SBD partitions are named cluster2.msbd0 and cluster2.msbd1.