6.2.12.16 mkvolumeattachment

Create an attachment for an Exascale volume.

Purpose

The mkvolumeattachment command allows you to create an attachment for an Exascale volume.

Syntax

mkvolumeattachment volume-id device-name --attributes { giClusterId=cluster-id | initiator=edv-initiator-id } [ --protocol edv ]
mkvolumeattachment volume-id iscsi-initiator-id --protocol iscsi [ --attributes attribute=value[,attribute=value] ... ]

Command Options

The options for the mkvolumeattachment command are:

  • volume-id: Specifies the identifier for the Exascale volume for which you want to create an attachment. You can use the lsvolume command to find the identifier for each volume.
  • device-name: For an Exascale Direct Volume (EDV) attachment only, specifies the device name to use in conjunction with the attachment. This is a user-supplied name, which is applied to the device file that is associated with the attachment. After attachment, the corresponding device file is located under /dev/exc/.

    Note:

    • Each EDV attachment also has a kernel device file at /dev/exc-devN, where N is the minor number of the device. The kernel device name is contained as an attribute of the EDV attachment and is visible using the ESCLI lsvolumeattachment command. The relationship between the kernel device file and the user-named device file (under /dev/exc/) is also recorded in the udev database and is visible using the following Linux command:

      # udevadm info device-file

      For the device-file value, you can specify either the kernel device file (/dev/exc-devN) or the user-named device file (under /dev/exc/).

    • By default, read and write access to EDV device files is only available to the root operating system user and members of the disk group. Depending on your use case, you may need to modify the permissions on the EDV device files before using them.

      For example, to make the EDV device file at /dev/exc/myvol readable and writable by the oracle user and asmdba group, you could configure it using a udev rule similar to the following:

      # cat /etc/udev/rules.d/57-edv-user.rules
      KERNEL=="exc-*", ENV{EXC_ALIAS}=="myvol", OWNER="oracle", GROUP="asmdba", MODE="0660"
    • To facilitate the management of udev rules related to EDV devices, EDV client systems are configured with a template udev rules file at /etc/udev/rules.d/57-edv-user.rules, which you can modify to fulfill your requirements. To maintain existing udev rules, /etc/udev/rules.d/57-edv-user.rules is preserved whenever the EDV client software is updated.

  • --protocol: Specifies the attachment protocol, either edv or iscsi. If not specified, edv is assumed.

  • iscsi-initiator-id: For an iSCSI attachment only, specifies the identifier used by iSCSI initiators to identify the attachment.
  • --attributes: Specifies different attributes depending on the attachment type.

    • For a cluster-wide EDV attachment only, the giClusterId attribute specifies the Oracle Grid Infrastructure (GI) cluster ID associated with the volume attachment. When you specify this attribute, the corresponding device file is created on all nodes in the Oracle GI cluster.

    • For a node-specific EDV attachment only, the initiator attribute specifies the EDV initiator ID associated with the volume attachment. When you specify this attribute, the corresponding device file is only created on the cluster node associated with the specified EDV initiator ID.

    • For an iSCSI attachment only, specifies various attributes for the attachment. As a minimum, the following attributes are required for CHAP (Challenge Handshake Authentication Protocol):

      • chapUserId

      • chapPassword

      • chapMutualUserId

      • chapMutualPassword

Examples

Example 6-174 Create a Cluster-Wide EDV Volume Attachment

You can create a cluster-wide EDV volume attachment by specifying a volume-id, device-name, and cluster-id.

In the following example, the volume-id is 7:50e52177583f4be4bad68ac20b65001e, the device-name is myvol, and the cluster-id is 72071863FA3E7FCAFF9F42A96957F4C5.

@> mkvolumeattachment 7:50e52177583f4be4bad68ac20b65001e myvol --attributes giClusterId=72071863-fa3e-7fca-ff9f-42a96957f4c5

Example 6-175 Create a Node-Specific EDV Volume Attachment

You can create a node-specific EDV volume attachment by specifying a volume-id, device-name, and edv-initiator-id.

In the following example, the volume-id is 7:50e52177583f4be4bad68ac20b65001e, the device-name is myvol, and the edv-initiator-id is b0b057aa-1f2c-0f48-b0b0-57aa1f2c0f48.

@> mkvolumeattachment 7:50e52177583f4be4bad68ac20b65001e myvol --attributes initiator=b0b057aa-1f2c-0f48-b0b0-57aa1f2c0f48

Example 6-176 Create an iSCSI Volume Attachment

You can create an iSCSI volume attachment by specifying the --protocol iscsi command option along with the volume-id, initiator-id, and required CHAP attributes.

In the following example, the volume-id is 2:50e52177583f4be4bad68ac20b65001e, and the initiator-id is iqn.1988-10.com.oracle.vm01. The required CHAP attributes are specified following the --attributes command option.

@> mkvolumeattachment 2:50e52177583f4be4bad68ac20b65001e iqn.1988-10.com.oracle.vm01 --protocol iscsi
     --attributes chapUserId=X1234567-user-1,chapPassword=X1234567-pass-1,chapMutualUserId=X1234567-user-2,chapMutualPassword=X1234567-pass-2