Skip to main content
Pure1 Support Portal

purehgroup-connect

Name

purehgroup-connect, purehgroup-disconnect, purevol-connect, purevol-disconnect — manage shared connections between host groups and volumes

Synopsis

purehgroup connect --vol VOL [--lun LUN] HGROUP...

purehgroup disconnect --vol VOL HGROUP...

purevol connect { --host HOST | --hgroup HGROUP } [--lun LUN] VOL...

purevol disconnect { --host HOST | --hgroup HGROUP } VOL...

Arguments

HGROUP

Host group with which a shared connection to the specified volume is to be created or broken.

VOL

Name of a volume to be connected to or disconnected from a host group.

Options

-h | --help

Can be used with any command or subcommand to display a brief syntax description.

--hgroup

Host group with which shared connections to the specified volumes are to be made or broken by purevol connect and purevol disconnect commands. Exactly one host group must be specified by this option. The option is mutually exclusive with the --host option.

--host

Host with which private connections to the specified volumes are to be made or broken by purevol connect and purevol disconnect commands. Exactly one host must be specified by this option. The option is mutually exclusive with the --hgroup option.

--lun

Logical unit number (LUN) by which hosts associated with the host group are to address the volume. If not specified, Purity automatically assigns a LUN to the connection. To automatically assign a LUN to a shared connection, Purity starts at 254 and counts down to the minimum LUN 1, assigning the first available LUN to the connection. If all LUNs in the [1...254] range are taken, Purity starts at LUN 255 and counts up to the maximum LUN 4095, assigning the first available LUN to the connection.

--vol

Name of the volume to be connected to or disconnected from the specified hosts host groups. Exactly one volume must be specified.

Description

Makes and breaks shared connections between hosts associated with host groups and volumes.

Private vs. Shared Host-Volume Connections

Purity supports two types of host-volume connections:

Private

Connects one volume to one host. Private connections are independent of one another. For example, the sequence:

  purevol connect --host HOST1 VOL1 VOL2
  purehost disconnect --vol VOL1 HOST1
              

connects HOST1 to VOL1 and HOST1 to VOL2, and then disconnects HOST1 and VOL1, leaving HOST1 connected to VOL2.

Private connections are typically used for boot volumes and for stand-alone (non-clustered) host applications.

To establish a private connection, run the purevol connect --host or purehost connect --vol command. Both commands are functionally identical.

To break a private connection that is no longer required, run the purevol disconnect --host or purehost disconnect --vol command. Both commands are functionally identical. When a connection has been broken, its LUN is available for reuse.

For more information about private connections and the purehost connect command, refer to purehost-connect(1).

Shared

Connects a designated set of hosts (via a host group) to a designated set of volumes, providing the hosts with a consistent "view" of the volumes. All associated hosts use the same LUN to address a given associated volume. All hosts and volumes associated with a host group are automatically connected to each other by virtue of their associations with the group.

To establish a shared connection (assuming the host belongs to a host group), run the purevol connect --hgroup or purehgroup connect --vol command. Both commands are functionally identical. For example, the command:

  purevol connect --hgroup HGROUP1 VOL1 VOL2
              

is equivalent to the sequence:

  purehgroup connect --vol VOL1 HGROUP1
  purehgroup connect --vol VOL2 HGROUP1
              

Both commands establish shared connections between the hosts associated with HGROUP1 and VOL1 and VOL2.

Shared connections are useful for cluster applications in which several related hosts require consistent (same LUN) connectivity to a set of storage volumes.

To break a shared connection that is no longer required, run the purevol disconnect --hgroup or purehgroup disconnect --vol command. Both commands are functionally identical. When a connection has been broken, its LUN is available for reuse.

A host can have only one connection to a given volume at any given time. If you attempt to make a second connection between a host and a volume, private or shared, the attempt will fail.

LUN Management

When a volume is connected to a host group, it is assigned a logical unit number (LUN) ID, which all hosts within the host group use to communicate with the volume. A volume can be connected to multiple host groups as well as to individual hosts simultaneously.

To manually assign a LUN ID to a shared connection, include the --lun option with the purehgroup connect or purevol connect --hgroup command.

If you do not manually specify a LUN, Purity automatically assigns a LUN to the shared connection. To do this, Purity starts at LUN 254 and counts down to the minimum LUN 1, assigning the first available LUN to the connection. If all LUNs in the [1...254] range are taken, Purity starts at LUN 255 and counts up to the maximum LUN (4095), assigning the first available LUN to the connection.

To change the LUN associated with a shared connection, the connection must first be broken and then recreated by purehgroup connect.

Exceptions

Purity will not establish a (shared) connection between a volume and host group if:

  • An unavailable LUN was specified.

  • The volume is already connected to the host group.

  • The volume is already connected to a host associated with the host group.

Examples

Example 1

purehgroup connect --vol VOL1 HGROUP1 HGROUP2
      

Establishes shared connections between VOL1 and the hosts associated with HGROUP1 and those associated with HGROUP2. Purity assigns a LUN to the connections with HGROUP1's hosts and another to those with HGROUP2's hosts; the two LUNs may be the same or different.

Example 2

purehgroup connect --vol VOL2 --lun 15 HGROUP3 HGROUP4
      

Establishes shared connections between VOL2 and the hosts associated with HGROUP3 and those associated with HGROUP4. If LUN 15 is already being used by shared connections to either of the host groups, no connections are made between that group's hosts and VOL2.

Example 3

purehgroup disconnect --vol VOL6 $(purevol listobj --type hgroup VOL6)
      

Breaks all shared connections between VOL6 and host groups. (The inner purevol listobj command produces a list of all host groups with shared connections to VOL6.)

Private connections to VOL6 are unaffected.

Author

Pure Storage Inc.