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|-I|-v|-Z|-E|-r][-d device] [-p partition] [-n cluster_name] [-s size][-k filename][-m filename] sbdutil -c -d device [-s [size][-Z] [-n cluster_name] sbdutil -f [-s] [-n cluster_name] sbdutil -i -p partition [-s] [-n cluster_name] sbdutil -I sbdutil -v [all<slotnumber>] [-p partition] [-s] [-n cluster_name] sbdutil -r -weg [-R resource_name] [-N node_name] [-A time] [-B time][-x filename] [-j filename] [-u filename] sbdutil -E -k filename sbdutil -m filename
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.
Initializes the SBD partition except the cluster event logs. 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.
Initializes the entire SBD partition.
View the used slots on the SBD partition.
Optional Paremeters:
all: To view all the slots on the SBD partition.
slotnumber: To view the specified number of slots of 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.
Use the entire device when creating a partition by using (\-c) option.
To backup the cluster event logs in the specified format.
or.
To export the cluster event logs that are backed up to a file in a raw format. To be used along with the -E option.
or
To restore the backed up cluster event logs to a newly created sbd partition. It is highly recommended to perform the following sequence when restoring logs:
Cluster is down.
Restore cluster event logs. Any existing cluster event logs in the partition are over-ridden.
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.
or
Exports the log in XML format.
or
Exports the log in json format.
or
Exports the log in CSV format.
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
This command exports the event logs of the resource 'CP5_SERVER' in xml and json file formats.
This command allows you to view the first 7 slots of the SBD partition.
This command takes a backup of the event logs into backup_logs which can be later used for restoration purposes.
This command restores the event logs to SBD Partition.