Setting the host prefix

The host prefix is used to name exported devices. It provides a way to intuitively identify the origin of the disk, for example, the host to which the disk is physically connected. The vxdctl command sets the host prefix. By setting the instance for the host prefix, you can set an alternate host identifier that satisfies the disk access name length constraint.

Note:

Disks from an array enclosure are not displayed with a host prefix.

In the case of direct attached storage (DAS) disks, VxVM device names for different disks on different nodes may be same. When such disks are used in an FSS environment, the remote disks created for these disks on the remote node may cause confusion as the remote disk and locally attached DAS disk may end up having same VxVM device name. To avoid confusion, a hostprefix is added to the exported disk. With this naming scheme it is also possible to trace the source of the given remote disk apart from providing a unique namespace.

In the case of array based enclosures connected through the SAN or Fibre Channel (FC), it possible to connect different enclosures of the same type (same vendor, same model) to different nodes exclusively and thus create a DAS-type topology. In such cases, there is also the possibility of the same VxVM device name getting assigned to different disks on different nodes. If such disks are exported for use in an FSS environment, the same confusion over names can arise. In such cases however, the hostprefix will not be attached to the exported disks. The naming conflicts will be resolved by adding a serial number to the VxVM device name for disks with same name.

The difference of naming behavior between DAS disks and enclosure based disks exists due to the following reasons. It is possible for the enclosure to be connected to only one node at any given instance of a CVM cluster. However, with a node join there could be two (or more) nodes connected to the enclosure at another instance. With nodes dynamically joining and leaving the cluster, connectivity to array enclosures can also change dynamically. Therfore, it is not reliable to use the connectivity information to decide if the topology is SAN or DAS, to decide whether the host-prefix needs to be added or not. As a result, CVM does not add a hostprefix to VxVM devices based on enclosure connectivity. Instead when a naming conflict occurs, a serial number is added to the VxVM device name. On the other hand DAS disks can be attached to only one node at a time, and thus it is safe to add a hostprefix by default (without waiting for the naming conflict to occur).

By default Cluster Volume Manager (CVM) uses the host name from the Cluster Server (VCS) configuration file as the host prefix. If the hostid in /etc/vx/volboot file is greater than 15 characters, and if a shorter host prefix is not set using vxdctl, Cluster Manager node IDs (CMID) are used as prefixes.

For more information, see the vxdctl (1M) manual page.

The following command sets/modifies the logical name for the host as the failure domain:

# vxdctl set hostprefix=logicalname

To unset the logical name for the host as the failure domain, use the following command:

# vxdctl unset hostprefix

The vxdctl list command displays the logical name set as the host prefix.