This section describes how to use the NSSMU utility and NLVM commands to create a clustered LVM volume group and logical volume on a single SAN device that is assigned to all nodes in the cluster. The volume is exclusively mounted on only one node at a time. Clustered LVM manages the locks for the exclusive mount.
After you create the resource, you should view and modify the cluster resource settings and scripts before you bring the resource online. You can also add lines to its load script, unload script, and monitor script to customize the resource for other uses.
If you enable NCP when you create the volume, commands are automatically added to the resource scripts to mount, dismount, and monitor an NCP volume. The NCP volume is named the same as the LVM logical volume name, and all letters in the name are capitalized. An NCP Virtual Server object is created for the resource and commands are added to the scripts to bind or unbind it with the resource IP address.
For information about adding NCP file access to an existing volume, see the following sections in the OES 2015 SP1: Novell Cluster Services for Linux Administration Guide:
The configuration scenarios use following sample values. Ensure that you replace the sample values with information for your configuration.
Parameter |
Sample Value |
---|---|
Device name for the shared SAN device |
/dev/sdf The device is initialized and contains no partitions. It is not enabled as shareable for clustering. |
Volume group name |
vol44 By default, NSSMU uses the logical volume name as the LVM volume group name. If you use the NLVM create linux volume command to create the LVM volume group cluster resource, you can specify a different name for the volume group, such as vg44. |
Volume name |
vol44 |
NCP volume name |
VOL44 The NCP volume is created only if you enable NCP as you create the clustered LVM volume by using NSSMU or the NLVM create linux volume command. The mount point path for the NCP volume is the mount point for the LVM volume. This means that the NCP share is created at the root of the mounted LVM volume when the LVM resource is online. |
Linux POSIX file system type |
ext3 Valid values are btrfs (requires the btrfsprogs package), ext2, ext3, reiserfs, and xfs. |
Make options for the file system |
None (do not specify a value). Press Enter to continue. For a list of the supported file system options for the file system type you are making, see the mkfs(8) man page and the man page for the specific file system: mkfs.btrfs(8), mkfs.ext2(8), mkfs.ext3(8), mkfs.reiserfs(8), or mkfs.xfs(8). IMPORTANT:The file system creation fails if you specify a make option that is not supported by the file system type. |
Mount options |
rw The Read/Write (rw) option is specified by default. For a list of available options that work with the file system type you are using, see the mount(8) man page. |
Volume size |
100 GB A 100 GB LUN is prepared in the shared storage subsystem. It is attached to the nodes in the cluster. The device must be initialized and contain no partitions. It should not be marked as Shareable for clustering. You are not prompted to enter a volume size. The clustered LVM volume group and logical volume use the entire device. When you select the device, all of the device’s free available space is displayed in the Free Size field. |
Resource IP address |
10.10.10.44 This is the IP address of the virtual server for the cluster resource. The address must be unique and in the same subnet as the cluster’s IP address. Specify the IP address in IPv4 format. |
Mount device |
/dev/vol44/vol44 The mount device path format is /dev/<volume_group_name>/<logical_volume_name> If you specify a different name for the volume group, such as vg44, by using the NLVM create linux volume command, the mount device path is /dev/vg44/vol44. |
Mount point path |
/mnt/vol44 You can use any valid Linux path as the mount point. The default mount point location for LVM logical volumes created by NSSMU and NLVM is /usr/novell/<lx_volume_name>. NSSMU automatically creates the mount point path if it does not exist on this node. However, you must manually create the mount point on each of the other nodes in the cluster. If the path does not exist on a node when you fail over the resource to it, the resource goes comatose You can alternatively add the following line to the load script before the Linux file system mount command to create the path on a node if it does not exist: ignore_error mkdir -p $MOUNT_PATH |
This section describes how to use NSSMU to create and cluster-enable an LVM volume group. NSSMU automatically uses the same script format as the Generic File System template (Generic_FS_Template) to create an LVM volume group cluster resource.
Log in to the master node of the cluster as the root user, then open a terminal console.
If you have not already done so, initialize the SAN device that you want to use for the LVM volume group.
For information, see Section 8.2, Initializing a SAN Device.
Launch NSSMU:
nssmu
In the NSSMU main menu, select Linux Volumes, then press Enter.
On the Linux Volumes page, press Insert to launch the volume creation wizard, then enter the following information as you are prompted for it:
Parameter |
Action |
---|---|
Select LVM type |
Select Cluster Enabled LVM2 Volume, then press Enter. |
NCP Enable volume? |
Specify whether to enable the LVM logical volume for NCP file access. Press y (yes) to allow NCP file access, or press n (No) to disallow NCP file access at this time. If you enable NCP, NSSMU automatically adds commands to the resource scripts that mount, dismount, and monitor an NCP volume. The NCP volume is named the same as the LVM logical volume name, and all letters in the name are capitalized. The tools automatically create an NCP Virtual Server object for the resource. If you do not enable NCP at this time, you can manually create a virtual server and add NCP file access later. For information, see |
Enter volume name |
Type the name for the LVM logical volume (such as vol44), then press Enter. The specified name is also used for the LVM volume group, which is used in the name of the LVM volume group cluster resource. If you enable NCP for the volume, the specified name is also applied to the NCP volume. An NCP volume name can be up to 14 alphanumeric characters. Underscores are allowed. All letters in the LVM volume name are capitalized for the NCP volume name. For example, if the LVM volume name is vol44, the NCP volume name is VOL44. |
Enter volume IP address |
Type the IP address to use for the LVM cluster resource in IPv4 format (such as 10.10.10.44), then press Enter. |
Select Volume type |
Select one of the following the Linux POSIX file systems, then press Enter:
If btrfsprogs is installed, five file system options are displayed: If btrfsprogs is not installed, four file system options are displayed: |
Enter full mount point path |
Type the full mount point path for the LVM logical volume (such as /mnt/vol44), then press Enter. The default path is /usr/novell/<lx_volume_name>, such as /usr/novell/vol44. If NCP is enabled, the specified path is also used as the mount point path for the NCP volume. |
Enter any make options |
Press Enter to continue without specifying options, or specify the desired make options for the file system type you are making, then press Enter. For a list of the supported file system options for the file system type you are making, see the mkfs(8) man page and the man page for the specific file system: mkfs.btrfs(8), mkfs.ext2(8), mkfs.ext3(8), mkfs.reiserfs(8), or mkfs.xfs(8). IMPORTANT:The file system creation fails if you specify a make option that is not supported by the file system type. |
Enter any mount options |
Press Enter to accept the default read and write options (rw). The Read/Write (rw) option is specified by default. You can add other mount options, or modify this option. For a list of available options that work with the file system type you are using, see the mount(8) man page. |
Device |
From the list of available devices, select the device that you initialized in Section 8.2, Initializing a SAN Device, such as sdf, then press Insert or Enter to select the device. You can select an unshared initialized device, a shared device with no data partitions, or an uninitialized device. Only qualified devices are available in the list. For OES 11 SP1 and earlier, the device must already be initialized, contain no partitions, and must not be marked as shareable for clustering. The LVM volume group requires the entire device. You cannot specify the amount of space to use. The device’s free available space is displayed in the Free Size field. |
Press F3 to accept the setup you entered for the volume group cluster resource.
The resource is created and brought online on the node where you created it. The resource is named <volume_group_name>_reference. In the example, the name of the volume group is the same as the logical volume, so the reference name is vol44_reference.
In the Linux Volumes list, select the newly created volume and view information about it.
Parameter |
Description |
---|---|
Device |
Specifies the full device node path for the LVM logical volume. Example: /dev/vol44/vol44 |
Mount Point |
When the resource is online, this specifies the path on the root file system where this volume is mounted. Examples: /mnt/vol44 |
Mount options |
When the resource is online, this specifies the mount options that are applied whenever this volume is automatically mounted after a reboot. Example: rw |
Type |
When the resource is online, this specifies the file system type. Examples: btrfs, ext2, ext3, reiserfs, xfs |
Size |
Specifies the amount of space reserved for this volume. Example: 99.58 GB |
Mounted |
Specifies whether the volume is mounted or unmounted. When the resource is brought online, the load script mounts the logical volume. Value: Yes or No |
State |
Specifies the availability for the file system. Example: Read/Write |
LVM |
Specifies whether the specified volume is an LVM logical volume. Value: Yes |
NCP |
Specifies whether the LVM logical volume is enabled for NCP (yes or no). The NCP state cannot be determined for a clustered LVM volume. You can use the Clusters plug-in for iManager to determine if there are NCP commands in the load script. On the Cluster Options page, select the resource to view its properties, then click the Scripts tab. |
Share State |
Specifies whether the LVM logical volume is cluster enabled for a Novell Cluster Services cluster. Value: Shareable for Clustering |
Press Escape twice to exit NSSMU.
Continue with Section 8.4, Configuring the LVM Cluster Resource Settings.
This section describes how to use NLVM commands to create and cluster-enable an LVM volume group. NLVM automatically uses the same script format as the Generic File System template (Generic_FS_Template) to create an LVM volume group cluster resource. The NLVM command allows you to specify a group name that is different than the volume name.
Log in to the master node of the cluster as the root user, then open a terminal console.
Initialize the SAN device that you want to use for the LVM volume group.
You can specify an unshared initialized device, a shared device with no data partitions, or an uninitialized device. For OES 11 SP1 and earlier, the device must already be initialized, contain no partitions, and must not be marked as shareable for clustering.
Ensure that the SAN device is assigned to all nodes in the cluster. The device must contain no partitions and must not be marked as shareable for clustering.
WARNING:Initializing a device removes all of the data on it.
At the command prompt, enter
nlvm [--force] [--no-prompt] init <device_name> format=<gpt|msdos> unshared
Replace device_name with the device node name of the device to be initialized, such as sdf. This must be the first command option to follow init.
Specify the partitioning scheme as gpt or msdos. The default is msdos. The MSDOS partitioning scheme supports device sizes that are less than or equal to 2 TB. If the device size is greater than 2 TB and the partitioning scheme is not specified, the default partitioning scheme of MSDOS applies, and the device size is truncated to 2 TB with the remainder as unusable space. Devices of any size can be set to use the GPT partitioning scheme.
Specify the unshared option to ensure that the device is not marked as shareable for clustering.
You can specify the --force NLVM option to force the initialization.
You are automatically prompted to confirm the initialize action. Respond y (Yes) or n (No). Use the --no-prompt NLVM option to suppress the confirmation.
For example, enter
nlvm init sdf format=gpt unshared
Create a clustered LVM volume group and logical volume. At the command prompt, enter the following (all on the same line, of course):
nlvm [nlvm_options] create linux volume type=<btrfs|ext2|ext3|reiserfs|xfs> device=<device_name> [mp=</mount_path>] [mkopt=<option1[,option2,...]>] [mntopt=<option1[option2[]...]>] lvm name=<lvm_volume_name> [group=<lvm_group_name>] shared ip=<IP_address_for_LVM_volgroup_cluster_resource> [ncp]
For details about using this command, see Create Linux Volume
in the OES 2015 SP1: NLVM Reference.
Parameters and Options
You must specify the type of file system to use for the volume. Btrfs requires that the btrfsprogs package is installed on all nodes. Supported file systems are btrfs, ext2, ext3, reiserfs, and xfs.
You must specify the device to use. Replace device_name with the device node name of the device that you want to use for the volume, such as sdf. The entire device is used for the LVM volume group. You cannot specify a size to use. You can specify an unshared initialized device, a shared device with no data partitions, or an uninitialized device. For OES 11 SP1 and earlier, the device must already be initialized, contain no partitions, and must not be marked as shareable for clustering.
If a mount point path is not specified, the utility assigns a default mount path of /usr/novell/<volume_name>. Use the mp option to specify a custom mount point. Replace mount_path with the full Linux path of the mount point where the volume is to be mounted. The final directory name in the path can be the same or different than the specified volume name. If the path does not currently exist, it is automatically created on that node. You must manually create the path on other nodes in the cluster.
You can use the mkopt option to specify the options to use when running mkfs. For a list of available options, see the mkfs(8) man page. No default option is specified. For a list of the supported file system options for the file system type you are making, see the mkfs(8) man page and the man page for the specific file system: mkfs.btrfs(8), mkfs.ext2(8), mkfs.ext3(8), mkfs.reiserfs(8), or mkfs.xfs(8).
IMPORTANT:The file system creation fails if you specify a make option that is not supported by the file system type.
You can use the mntopt option to specify the options to use when mounting the volume. For a list of available options, see the mount(8) man page. The default mntopt value is rw (Read/Write).
You must specify the lvm option to create an LVM volume group and logical volume. Use this option with the name option.
Replace lvm_volume_name with a name for the LVM volume. If you do not specify the group option, this name is also used as the LVM volume group name, which is used in the cluster resource name. For LVM logical volume naming conventions, see Linux LVM Volume Group and Logical Volume Names
in the OES 2015 SP1: NLVM Reference.
NOTE:If you enable NCP for the volume, the LVM volume name must comply with the limitations for NCP volume names described in Section 5.4, Naming Conventions for NCP Volume Names. If you use lowercase letters for the volume name, they are automatically changed to uppercase for the NCP volume name.
Replace lvm_volume_group_name with a name for the LVM volume group. The group name is also used in the cluster resource name. If you do not specify a volume group name, the group is automatically named the same as the LVM volume.
You must specify the shared option to create a clustered LVM volume group and logical volume.
Replace IP_address_for_LVM_volgroup_cluster_resource with a static unique IP address to use for the LVM cluster resource. Specify the address in IPv4 format.
Specify the ncp option to NCP enable the LVM logical volume for NCP file access.
If you enable NCP, NSSMU automatically adds commands to the resource scripts that mount, dismount, and monitor an NCP volume. The NCP volume is named the same as the LVM logical volume name, and all letters in the name are capitalized. The tools automatically create an NCP Virtual Server object for the resource.
If you do not enable NCP at this time, you can manually create a virtual server and add NCP file access later. For information, see Creating a Virtual Server Object for an LVM Volume Group Cluster Resource
in the OES 2015 SP1: Novell Cluster Services for Linux Administration Guide.
Example For example, at the command prompt, enter the following (all on the same line):
nlvm create linux volume type=ext3 device=sdf mp=/mnt/vol44 mntopt=rw lvm name=vol44 group=vg44 shared ip=10.10.10.44 ncp
If the command is successful, the response is
Linux clustered volume vol44 created.
Verify that the cluster resource was created and brought online by entering
cluster status
The resource is named <lv_name>_resource. In the following example, vol44_resource is in the Running state.
Continue with Section 8.4, Configuring the LVM Cluster Resource Settings.