The SBD utility (sbdutil) allows you to create, find, or view a OES Cluster Services SBD partition.
IMPORTANT:The cluster SBD partition is not required unless you have shared storage in the cluster.
We recommend that you carve out a LUN/disk of 20 MB in size for 512 byte device and 80 MB for 4096 (4Kn) byte device to use for the SBD. If you mirror the SBD, you need to carve out a separate LUN/disk of equal size to use. Before you begin, each of these small disks must be initialized and marked as shareable for clustering. You can initialize the device by using the OES Storage Services (NSS) Management Utility (nssmu(8)) or the Storage plug-in to iManager. The NSS utility called ncsinit(8) is available for initializing a device and setting it to a shared state.
sbdutil [-c|-f|-i|-v] [-s] [-r][-d device] [-d device] [-p partition] [-n cluster_name] sbdutil -c -d device [-s [size]] [-n cluster_name] sbdutil -f [-s] [-n cluster_name] sbdutil -i -p partition [-s] [-n cluster_name] sbdutil -v [-p partition] [-s] [-n cluster_name] sbdutil -r -weg [-R resource_name] [-N node_name] [-A time] [-B time]
Log in to a node in the cluster where you want to create the SBD partition, then enter the command at a terminal console as the root user or any other user in admin or ncsgroup. If the command succeeds, the partition name is printed. See Section A.4.3, Return Value for more information.
Create an SBD partition. This option requires at least one device to be specified. You can create a mirrored SBD by supplying more than one device with multiple instances of the -d option.
IMPORTANT:Do not create an SBD partition for a cluster that already has an SBD partition. If you need to re-create the SBD for a cluster, delete its existing SBD first.
To delete an SBD:
Enter cluster down at the server console of one cluster server.
This causes all cluster servers to leave the cluster.
Delete the SBD partition.
You can use nssmu or other utilities to delete the SBD partition.
Find the SBD partition.
Initialize the SBD partition. If there is information in the sbdutil -v view from old nodes that have been removed from the cluster, you can run sbdutil -i to initialize the view. This can be done without any issues while the cluster is running.
View the SBD partition.
The device where you want to create an SBD partition. You can create a mirrored SBD by supplying more than one device with multiple instances of the -d option. Specify only the base (leaf) names (such as sdb or mpathd) with the -d option.
Use this partition instead of searching for one.
Use the specified cluster name instead of getting the name from cluster.xml. If this option is not specified, the SBD partition is named by default with the cluster name that is found in the cluster.xml file on the node.
Assume the device is a shared disk system instead of checking cluster.xml. An optional partition size (in MB) can also be specified when creating a partition (-c). The default size is 8 MB. Some of the allocated space is used for storing metadata such as the partition table and MBR (master boot record) for the partition.
Specify the size as -1 to use all free space on the device. This option allows OES Cluster Services to use a whole disk/LUN (or LUNs) that you set aside for SBD.
Prints all log entries from the oldest to the newest.
Prints the log entires of the specified resource.
Prints the log entries of the specified node.
Prints the warning, error, and normal log entries respectively.
Prints the log entries after the specified time.
Prints the log entries before the specified time.
If the command succeeds, it prints the partition name to the screen and returns "0". Otherwise, no partition name is printed out, and a non-zero error code is returned.
You can use "echo $?" at the end of the command to check the return code:
/opt/novell/ncs/bin/sbdutil -c -n <cluster_name> -d <device> -d <device> -s <size>; echo $?
Examples
The following example demonstrates a successful command where the mycluster1.sbd partition is created:
/opt/novell/ncs/bin/sbdutil -c -n mycluster1 -d MD_EMC_001G_A -d MD_EMC_001G_B -s -1; echo $? /dev/nss/mycluster1.sbd 0
The following example demonstrates a failed command where no partition is created, and a non-zero error code is returned:
/opt/novell/ncs/bin/sbdutil -c -n mycluster1 -d MD_EMC_001G_A -d MD_EMC_001G_B -s 2048; echo $? 2
This program normally runs as root on a node in the cluster that will be using the SBD.
This tells you whether an SBD partition exists and identifies the device on the SAN where the SBD partition is located.
Creates an SBD partition for the cluster named mycluster1 on the LUN /dev/sdb. The size is set to use all of the free space on the device.
Creates a mirrored SBD partition for the cluster named mycluster1 on the LUN /dev/sdb with the mirror on /dev/sdc.
Lets you view recent cluster events. Events can be node specific (a node joined or left the cluster) or they can be resource specific (a resource changed state from loading to running).
Sample output:
Mon Sep 15 15:41:36 2014 Node 'CG-04' Joined at epoch 5Mon Sep 15 15:41:37 2014 Resource 'Master_IP_Address_Resource' Running on CG-01
Prints the warning log entries of resource1 and resource2 from 10 days ago till the time 14:23 on 31st December, 2019.
Sample output:
Mon Jan 20 15:33:12 2020 Resource 'POOL1_SERVER' NDS Sync Mon Jan 20 15:36:18 2020 Resource 'POOL1_SERVER' Offline Mon Jan 20 15:36:18 2020 Resource 'POOL1_SERVER' Offline
Sample output:
Mon Jan 20 15:36:18 2020 Resource 'POOL1_SERVER' Offline Mon Jan 20 15:36:18 2020 Resource 'POOL1_SERVER' Offline