A.6 CSMPORT Utility (Cluster Segment Manager Import/Export)

The OES Cluster Services Cluster Segment Manager (CSM) Import/Export utility allows you to use a Linux POSIX volume that was cluster-enabled with a CSM container. This conversion is required because the Enterprise Volume Segment Manager (EVMS) was deprecated on SUSE Linux Enterprise Server 11, and the CSM is no longer available on OES 11 and later servers.

The utility can be used to scan for CSM containers and check if they can be imported for use in the cluster. This is the default mode when you run it without any options, or with only the -v option. By default, the utility searches block devices (/dev/sd*) for containers. Information about each device is displayed. Details about the CSM container are present if the container exists and can be imported for use in the cluster.

The utility also allows you to do the following:

  • Search for a specified CSM container and check if it can be imported for use in the cluster.

  • Import a specified CSM container for exclusive use in the cluster, and generate a corresponding Device Mapper object for it as /dev/mapper/csm_name .

  • Export a specified CSM container by removing its Device Mapper object from the /dev/mapper directory. This allows the container to be imported by other nodes.

You can specify devices to search for any of the options. Wildcards such as the question mark (?) and asterisk (*) can be used when specifying devices. A question mark replaces a character in that position. An asterisk replaces any number of characters in that position.

A.6.1 Syntax

Open a console on a cluster node, then issue the command as the root user.

/opt/novell/ncs/bin/csmport [-v|-s] [-h] [-e devmapper_object | -i container_name | -c container_name] [device...]

A.6.2 Options

No options

Use the command with no options to search the block devices (/dev/sd*) for containers.

/opt/novell/ncs/bin/csmport
[devices]

Use the command with no options and specify the devices to search in order to specify which devices to search for CSM containers. By default, the utility searches block devices (/dev/sd*) for containers.

/opt/novell/ncs/bin/csmport [device...]

When specifying devices, wildcards (? and *) can be used.

Examples

The following command searches the multipath device /dev/mapper/MD_EMC_005G for CSM containers.

/opt/novell/ncs/bin/csmport -v /dev/mapper/MD_EMC_005G

The following command uses three question mark wildcards to search multipath devices with any three characters in those positions in the device name:

/opt/novell/ncs/bin/csmport -v /dev/mapper/MD_EMC_???G

The following command uses an asterisk wildcard to search multipath devices with any number of characters in that position in the device name:

/opt/novell/ncs/bin/csmport -v /dev/mapper/MD_EMC_*
-h

Prints the help page for this command.

-c <container_name> [device...]

Searches the /dev/sd* devices or specified devices for the named CSM container.

/opt/novell/ncs/bin/csmport -c container_name
-i <container_name> [device...]

Use this option to import a CSM container on a node for exclusive use in the cluster. The utility achieves this by searching for the container and if found, extracting the volume inside the container and exposing it exclusively at /dev/mapper/container_name.

The utility uses the container name instead of the Linux POSIX volume name because some CSM containers might contain compatibility volumes, which do not have names. The /dev/mapper/container_name object can be mounted at the old mount point that was used for the shared Linux POSIX volume in that container. The mount point can have the same name or different name than the Device Mapper object.

/opt/novell/ncs/bin/csmport -i container_name

Example

Suppose that you created a Linux POSIX cluster resource with the following settings on an OES 2 server or an OES 1 server:

RESOURCE_IP:            10.10.10.44
CONTAINER_NAME:         csm44
EVMS_VOLUME_NAME:       lxvol44
MOUNT_DEV:              /dev/evms/$CONTAINER_NAME/$EVMS_VOLUME_NAME
MOUNT_POINT:            /mnt/users

On an OES 11 or later server, you can use the following command to generate the Device Mapper object at /dev/mapper/csm44:

/opt/novell/ncs/bin/csmport -i csm44

The Device Mapper object can be mounted at the old mount point.

The resulting settings are:

RESOURCE_IP:            10.10.10.44
CONTAINER_NAME:         csm44
MOUNT_DEV:              /dev/mapper/$CONTAINER_NAME
MOUNT_POINT:            /mnt/users
-e <devmapper_object> [device...]

Use this option to export the Device Mapper object from the node. It removes the object from the /dev/mapper directory. Basically, the option undoes what the -i option did, so that the container can be imported by other nodes.

/opt/novell/ncs/bin/csmport -e devmapper_object

Example

The following command exports the Device Mapper object /dev/mapper/csm44.

/opt/novell/ncs/bin/csmport -e csm44
-v

Verbose mode can be used with any of the options.

-s

Silent mode can be used with any of the options.

A.6.3 Examples

This section provides examples of typical tasks you perform when using the csmport command.

Scanning for CSM Containers

Scan for CSM containers and check if they can be imported for use in the cluster.

/opt/novell/ncs/bin/csmport -v

In the following sample output, only device /dev/sdi has a CSM container CSM5GNoEVMSVol and can be imported to /dev/mapper/CSM5GNoEVMSVol for its exclusive use on the cluster node.

Scan for CSM containers

  Search device '/dev/sdn' for CSM containers.
    Retrieve device information.
    Device '/dev/sdn': major=8, minor=208.
    Refresh device '/dev/sdn'.
    Open device '/dev/sdn' for reading.
    Check CSM metadata on device '/dev/sdn'.
      /dev/sdn is not a CSM container.

  Search device '/dev/sdm' for CSM containers.
    Retrieve device information.
    Device '/dev/sdm': major=8, minor=192.
    Refresh device '/dev/sdm'.
    Open device '/dev/sdm' for reading.
    Check CSM metadata on device '/dev/sdm'.
      /dev/sdm is not a CSM container.

  Search device '/dev/sdh' for CSM containers.
    Retrieve device information.
    Device '/dev/sdh': major=8, minor=112.
    Refresh device '/dev/sdh'.
    Open device '/dev/sdh' for reading.
    Check CSM metadata on device '/dev/sdh'.
      /dev/sdh has a CSM container.
      Cluster ID doesn't match. On disk = 37037513, in memory = 135657986.
      Container name ='AJTestContainer01' on disk.
      Container is accessible (1).

  Search device '/dev/sdc' for CSM containers.
    Retrieve device information.
    Device '/dev/sdc': major=8, minor=32.
    Refresh device '/dev/sdc'.
    Open device '/dev/sdc' for reading.
    Check CSM metadata on device '/dev/sdc'.
      /dev/sdc is not a CSM container.

  Search device '/dev/sdl' for CSM containers.
    Retrieve device information.
    Device '/dev/sdl': major=8, minor=176.
    Refresh device '/dev/sdl'.
    Open device '/dev/sdl' for reading.
    Check CSM metadata on device '/dev/sdl'.
      /dev/sdl is not a CSM container.

  Search device '/dev/sdi' for CSM containers.
    Retrieve device information.
    Device '/dev/sdi': major=8, minor=128.
    Refresh device '/dev/sdi'.
    Open device '/dev/sdi' for reading.
    Check CSM metadata on device '/dev/sdi'.
      /dev/sdi has a CSM container.
      Container name ='CSM5GNoEVMSVol' on disk.
      Container is accessible (4).
      No EVMS volume.
      New name: /dev/mapper/CSM5GNoEVMSVol
      Size: 10485757 sectors.
    Device '/dev/sdi' has a CSM container 'CSM5GNoEVMSVol' and can be converted to /dev/mapper/CSM5GNoEVMSVol.

  Search device '/dev/sdk' for CSM containers.
    Retrieve device information.
    Device '/dev/sdk': major=8, minor=160.
    Refresh device '/dev/sdk'.
    Open device '/dev/sdk' for reading.
    Check CSM metadata on device '/dev/sdk'.
      /dev/sdk is not a CSM container.

  Search device '/dev/sdg' for CSM containers.
    Retrieve device information.
    Device '/dev/sdg': major=8, minor=96.
    Refresh device '/dev/sdg'.
    Open device '/dev/sdg' for reading.
    Check CSM metadata on device '/dev/sdg'.
      /dev/sdg is not a CSM container.

  Search device '/dev/sdb' for CSM containers.
    Retrieve device information.
    Device '/dev/sdb': major=8, minor=16.
    Refresh device '/dev/sdb'.
    Open device '/dev/sdb' for reading.
    Check CSM metadata on device '/dev/sdb'.
      /dev/sdb is not a CSM container.

  Search device '/dev/sdt' for CSM containers.
    Retrieve device information.
    Device '/dev/sdt': major=65, minor=48.
    Refresh device '/dev/sdt'.
    Open device '/dev/sdt' for reading.
    Failed to read the 1st sector of device '/dev/sdt': Input/output error (5).

  Search device '/dev/sdx' for CSM containers.
    Retrieve device information.
    Device '/dev/sdx': major=65, minor=112.
    Refresh device '/dev/sdx'.
    Open device '/dev/sdx' for reading.
    Failed to read the 1st sector of device '/dev/sdx': Input/output error (5).

  Search device '/dev/sdj' for CSM containers.
    Retrieve device information.
    Device '/dev/sdj': major=8, minor=144.
    Refresh device '/dev/sdj'.
    Open device '/dev/sdj' for reading.
    Check CSM metadata on device '/dev/sdj'.
      /dev/sdj has a CSM container.
      Cluster ID doesn't match. On disk = 37037513, in memory = 135657986.
      Container name ='CMS4GCon' on disk.
      Container is accessible (4).

  Search device '/dev/sdy' for CSM containers.
    Retrieve device information.
    Device '/dev/sdy': major=65, minor=128.
    Refresh device '/dev/sdy'.
    Open device '/dev/sdy' for reading.
    Failed to read the 1st sector of device '/dev/sdy': Input/output error (5).

  Search device '/dev/sdu' for CSM containers.
    Retrieve device information.
    Device '/dev/sdu': major=65, minor=64.
    Refresh device '/dev/sdu'.
    Open device '/dev/sdu' for reading.
    Failed to read the 1st sector of device '/dev/sdu': Input/output error (5).

  Search device '/dev/sdd' for CSM containers.
    Retrieve device information.
    Device '/dev/sdd': major=8, minor=48.
    Refresh device '/dev/sdd'.
    Open device '/dev/sdd' for reading.
    Failed to read the 1st sector of device '/dev/sdd': Input/output error (5).

  Search device '/dev/sdq' for CSM containers.
    Retrieve device information.
    Device '/dev/sdq': major=65, minor=0.
    Refresh device '/dev/sdq'.
    Open device '/dev/sdq' for reading.
    Check CSM metadata on device '/dev/sdq'.
      /dev/sdq is not a CSM container.

  Search device '/dev/sds' for CSM containers.
    Retrieve device information.
    Device '/dev/sds': major=65, minor=32.
    Refresh device '/dev/sds'.
    Open device '/dev/sds' for reading.
    Failed to read the 1st sector of device '/dev/sds': Input/output error (5).

  Search device '/dev/sdv' for CSM containers.
    Retrieve device information.
    Device '/dev/sdv': major=65, minor=80.
    Refresh device '/dev/sdv'.
    Open device '/dev/sdv' for reading.
    Failed to read the 1st sector of device '/dev/sdv': Input/output error (5).

  Search device '/dev/sdaa' for CSM containers.
    Retrieve device information.
    Device '/dev/sdaa': major=65, minor=160.
    Refresh device '/dev/sdaa'.
    Open device '/dev/sdaa' for reading.
    Failed to read the 1st sector of device '/dev/sdaa': Input/output error (5).

  Search device '/dev/sde' for CSM containers.
    Retrieve device information.
    Device '/dev/sde': major=8, minor=64.
    Refresh device '/dev/sde'.
    Open device '/dev/sde' for reading.
    Check CSM metadata on device '/dev/sde'.
      /dev/sde is not a CSM container.

  Search device '/dev/sdz' for CSM containers.
    Retrieve device information.
    Device '/dev/sdz': major=65, minor=144.
    Refresh device '/dev/sdz'.
    Open device '/dev/sdz' for reading.
    Failed to read the 1st sector of device '/dev/sdz': Input/output error (5).

  Search device '/dev/sdw' for CSM containers.
    Retrieve device information.
    Device '/dev/sdw': major=65, minor=96.
    Refresh device '/dev/sdw'.
    Open device '/dev/sdw' for reading.
    Failed to read the 1st sector of device '/dev/sdw': Input/output error (5).

  Search device '/dev/sdr' for CSM containers.
    Retrieve device information.
    Device '/dev/sdr': major=65, minor=16.
    Refresh device '/dev/sdr'.
    Open device '/dev/sdr' for reading.
    Failed to read the 1st sector of device '/dev/sdr': Input/output error (5).

  Search device '/dev/sdp' for CSM containers.
    Retrieve device information.
    Device '/dev/sdp': major=8, minor=240.
    Refresh device '/dev/sdp'.
    Open device '/dev/sdp' for reading.
    Failed to read the 1st sector of device '/dev/sdp': Input/output error (5).

  Search device '/dev/sdo' for CSM containers.
    Retrieve device information.
    Device '/dev/sdo': major=8, minor=224.
    Refresh device '/dev/sdo'.
    Open device '/dev/sdo' for reading.
    Failed to read the 1st sector of device '/dev/sdo': Input/output error (5).

  Search device '/dev/sdf' for CSM containers.
    Retrieve device information.
    Device '/dev/sdf': major=8, minor=80.
    Refresh device '/dev/sdf'.
    Open device '/dev/sdf' for reading.
    Check CSM metadata on device '/dev/sdf'.
      /dev/sdf is not a CSM container.

  Search device '/dev/sda' for CSM containers.
    Retrieve device information.
    Device '/dev/sda': major=8, minor=0.
    Refresh device '/dev/sda'.
    Open device '/dev/sda' for reading.
    Check CSM metadata on device '/dev/sda'.
      /dev/sda is not a CSM container.

Importing a CSM Container for Exclusive Use on a Node in a Cluster

Use the -i option to import the CSM container named CSM5GNoEVMSVol for exclusive use on a node in a cluster.

/opt/novell/ncs/bin/csmport –i CSM5GNoEVMSVol

This command generates the Device Mapper object /dev/mapper/CSM5GNoEVMSVol. You can map this object to the desired mount point.

Exporting a CSM Container

Use the -e option to export the Device Mapper object /dev/mapper/CSM5GNoEVMSVol.

/opt/novell/ncs/bin/csmport –e CSM5GNoEVMSVol

This removes the object and allows the container to be imported by other nodes.

Searching for a Container on a Specified Device

Specify a device to be searched in order to speed up the search for a container or containers. For example, to search for CSM containers on a multpath device /dev/mapper/MD_EMC_005G, enter

/opt/novell/ncs/bin/csmport /dev/mapper/MD_EMC_005G

Searching for Containers on Multiple Devices with Wildcards

Specify multiple devices to be searched and use wildcards to include multiple devices of that type.

/opt/novell/ncs/bin/csmport -v /dev/mapper/MD_EMC_???G /dev/disk/by-id/dm-uuid-mpath-*

Importing a CSM Container on a Specified Device

When importing the CSM5GNoEVMSVol container, specify the multipath device /dev/mapper/MD_EMC_005G in order to speed up the search for the container.

/opt/novell/ncs/bin/csmport -i CSM5GNoEVMSVol /dev/mapper/MD_EMC_005G