---
name: "ocf_heartbeat_iSCSILogicalUnit"
section: "7"
platform: "linux"
package: "resource-agents"
version: "1:4.16.0-3+deb13u2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/ocf_heartbeat_iSCSILogicalUnit"
---

# ocf\_heartbeat\_iSCSILogicalUnit(7)

Manages iSCSI Logical Units (LUs)

## NAME

ocf\_heartbeat\_iSCSILogicalUnit - Manages iSCSI Logical Units (LUs)

## SYNOPSIS

**iSCSILogicalUnit** \[start \| stop \| status \| monitor \| meta-data \| validate-all\]

## DESCRIPTION

Manages iSCSI Logical Unit. An iSCSI Logical unit is a subdivision of an SCSI Target, exported via a daemon that speaks the iSCSI protocol.

## SUPPORTED PARAMETERS

**implementation**

The iSCSI target daemon implementation. Must be one of "iet", "tgt", "lio", "lio-t", or "scst". If unspecified, an implementation is selected based on the availability of management utilities, with "iet" being tried first, then "tgt", then "lio", then "lio-t", then "scst".

(optional, string, no default)

**target\_iqn**

The iSCSI Qualified Name (IQN) that this Logical Unit belongs to.

(required, string, no default)

**lun**

The Logical Unit number (LUN) exposed to initiators.

(required, integer, no default)

**path**

The path to the block device exposed. Some implementations allow this to be a regular file, too.

(required, string, no default)

**scsi\_id**

The SCSI ID to be configured for this Logical Unit. The default is the resource name, truncated to 24 bytes.

(unique, optional, string, default "RESOURCE\_ID")

**scsi\_sn**

The SCSI serial number to be configured for this Logical Unit. The default is a hash of the resource name, truncated to 8 bytes, meaning 26 hex characters. If you are using XenServer with multipath as iSCSI client, you MUST make sure this value is set, or else XenServer multipath will not be able to access the LUN

(unique, optional, string, default "b3a49b7f")

**emulate\_tpu**

The SCSI UNMAP command to be configured for this Logical Unit. Setting this integer to 1 will enable TPU IOCTL emulation.

(optional, integer, no default)

**emulate\_3pc**

The SCSI EXTENDED COPY command to be configured for this Logical Unit. Setting this integer to 1 will enable 3PC IOCTL emulation.

(optional, integer, no default)

**emulate\_caw**

The SCSI Compare and Write command to be configured for this Logical Unit. Setting this integer to 1 will enable CAW IOCTL emulation.

(optional, integer, no default)

**vendor\_id**

The SCSI vendor ID to be configured for this Logical Unit.

(optional, string, no default)

**product\_id**

The SCSI product ID to be configured for this Logical Unit.

(optional, string, no default)

**tgt\_bstype**

TGT specific backing store type. If you want to use aio, make sure your tgtadm is built against libaio. See [tgtadm(8)](/tgtadm/8.md).

(optional, string, no default)

**tgt\_bsoflags**

TGT specific backing store open flags (direct\|sync). See [tgtadm(8)](/tgtadm/8.md).

(optional, string, no default)

**tgt\_bsopts**

TGT specific backing store options. See [tgtadm(8)](/tgtadm/8.md).

(optional, string, no default)

**tgt\_device\_type**

TGT specific device type. See [tgtadm(8)](/tgtadm/8.md).

(optional, string, no default)

**additional\_parameters**

Additional LU parameters. A space-separated list of "name=value" pairs which will be passed through to the iSCSI daemon's management interface. The supported parameters are implementation dependent. Neither the name nor the value may contain whitespace.

(optional, string, no default)

**allowed\_initiators**

Allowed initiators. A space-separated list of initiators allowed to connect to this lun. Initiators may be listed in any syntax the target implementation allows. If this parameter is empty or not set, access to this lun will not be allowed from any initiator, if target is not in demo mode.

This parameter is only necessary when using LIO.

(optional, string, no default)

**lio\_iblock**

LIO iblock device name, a number starting from 0.

Using distinct values here avoids a warning in LIO "LEGACY: SHARED HBA"; and it is necessary when using multiple LUNs started at the same time (eg. on node failover) to prevent a race condition in tcm\_core on mkdir() in /sys/kernel/config/target/core/.

(optional, integer, default 0)

**liot\_bstype**

LIO-T specific backing store type. If you want to use aio, set this to 'block'. If you want to use async IO, set this to 'fileio'. Async I/O works also with block devices, however - you need to understand the consequences. See [targetcli(8)](/targetcli/8.md). If using file backend, you need to create this file in advance. If you want to use SCSI Passthrough, set this to 'pscsi'. Do not use PSCSI unless you know exactly how it will be used.

(optional, string, default "block")

## SUPPORTED ACTIONS

This resource agent supports the following actions (operations):

**start**

Starts the resource. Suggested minimum timeout: 10s.

**stop**

Stops the resource. Suggested minimum timeout: 10s.

**status**

Performs a status check. Suggested minimum timeout: 10s. Suggested interval: 10s.

**monitor**

Performs a detailed status check. Suggested minimum timeout: 10s. Suggested interval: 10s.

**meta-data**

Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5s.

**validate-all**

Performs a validation of the resource configuration. Suggested minimum timeout: 10s.

## EXAMPLE CRM SHELL

The following is an example configuration for a iSCSILogicalUnit resource using the [**crm**(8)](/crm/8.md) shell:

```
primitive p_iSCSILogicalUnit ocf:heartbeat:iSCSILogicalUnit \
  params \
    target_iqn=string \
    lun=integer \
    path=string \
  op monitor timeout="10s" interval="10s" depth="0"
```

## EXAMPLE PCS

The following is an example configuration for a iSCSILogicalUnit resource using [**pcs**(8)](/pcs/8.md)

```
pcs resource create p_iSCSILogicalUnit ocf:heartbeat:iSCSILogicalUnit \
  target_iqn=string \
  lun=integer \
  path=string \
  op monitor timeout="10s" interval="10s" OCF_CHECK_LEVEL="0"
```

## SEE ALSO

**http://clusterlabs.org/**

## AUTHOR

**ClusterLabs contributors (see the resource agent source for information about individual authors)**
