OCF_HEARTBEAT_ISCSIL(7)
π ocf_heartbeat_iSCSILogicalUnit π
okay so bestie, you've found yourself in the OCF_HEARTBEAT_ISCSIL(7) manual page and honestly? iconic. buckle up, we're talking iSCSI Logical Units and you're gonna slay this π
β¨ NAME β¨
ocf_heartbeat_iSCSILogicalUnit β she manages iSCSI Logical Units (LUs), and she does it beautifully π
πΈ SYNOPSIS πΈ
iSCSILogicalUnit [start | stop | status | monitor | meta-data |
validate-all]
that's the whole vibe. pick an action, any action π¦
π¦ DESCRIPTION π¦
So a Logical Unit is basically a subdivision of a SCSI Target β like, the target is the main character and the LU is one of her supporting characters, exported out into the world via a daemon that speaks the iSCSI protocol. no cap, that's the whole thing β¨
π SUPPORTED PARAMETERS π
every single one, bestie, we're not skipping a single parameter, that would be rude π
implementationβ which iSCSI target daemon implementation you're running. Has to be one of"iet","tgt","lio","lio-t", or"scst". If you leave it unspecified, it picks one for you based on which management utilities are actually available β trying"iet"first, then"tgt", then"lio", then"lio-t", then"scst". lowkey a whole audition process π
(optional, string, no default)
target_iqnβ the iSCSI Qualified Name (IQN) that this Logical Unit belongs to. yes, she needs to know her family π
(required, string, no default)
lunβ the Logical Unit number (LUN) exposed to initiators. the number on her name tag π
(required, integer, no default)
pathβ the path to the block device being exposed. some implementations are chill and let this be a regular file too. generous queens π«Ά
(required, string, no default)
scsi_idβ the SCSI ID to configure for this Logical Unit. Defaults to the resource name, truncated to 24 bytes β so if your name's too long, girl gets cut off at the 24-byte mark π
(unique, optional, string, default "RESOURCE_ID")
scsi_snβ the SCSI serial number to configure for this Logical Unit. Defaults to a hash of the resource name, truncated to 8 bytes, which means 26 hex characters. And listen: if you're using XenServer with multipath as the iSCSI client, you MUST make sure this value is set, or else XenServer multipath will not be able to access the LUN. not optional. not a suggestion. she said what she said π
(unique, optional, string, default "b3a49b7f")
emulate_tpuβ the SCSI UNMAP command to configure for this Logical Unit. Set this integer to1and you've got yourself TPU IOCTL emulation enabled β¨
(optional, integer, no default)
emulate_3pcβ the SCSI EXTENDED COPY command to configure for this Logical Unit. Set this integer to1to enable 3PC IOCTL emulation π₯
(optional, integer, no default)
emulate_cawβ the SCSI Compare and Write command to configure for this Logical Unit. Set this integer to1to enable CAW IOCTL emulation π
(optional, integer, no default)
write_cacheβ the write cache mode for this Logical Unit, applied at create time (that'slio-tfileio write_back, SCST write_through). Default0creates a write-through device: acknowledged writes survive a crash or power loss, so she's reliable π.1creates a write-back device: considerably faster, but writes that were never flushed are lost on power failure β high risk, high reward, main character energy honestly. Not applicable tolio-tblock backstores, where the kernel mirrors the backing device's cache mode. And for SCSTvdisk_fileio, use write-back only with non-volatile backing storage, since SCST does not flush the backing device's cache onSYNCHRONIZE_CACHE. π¨
(optional, integer, default 0)
vendor_idβ the SCSI vendor ID to configure for this Logical Unit πΈ
(optional, string, no default)
product_idβ the SCSI product ID to configure for this Logical Unit π
(optional, string, no default)
tgt_bstypeβ TGT-specific backing store type. If you wanna use aio, make sure yourtgtadmis built againstlibaio. Seetgtadm(8)bestie, it's all in there π¦
(optional, string, no default)
tgt_bsoflagsβ TGT-specific backing store open flags (direct|sync). Seetgtadm(8)β¨
(optional, string, no default)
tgt_bsoptsβ TGT-specific backing store options. Seetgtadm(8)π
(optional, string, no default)
tgt_device_typeβ TGT-specific device type. Seetgtadm(8)π
(optional, string, no default)
additional_parametersβ extra LU parameters! A space-separated list of"name=value"pairs that get passed straight through to the iSCSI daemon's management interface. Which parameters are supported is implementation dependent, and heads up: neither the name nor the value may contain whitespace. no spaces, no exceptions π
(optional, string, no default)
allowed_initiatorsβ allowed initiators. A space-separated list of initiators allowed to connect to this lun, and they can be listed in any syntax the target implementation allows. Big warning though: if this parameter is empty or not set, access to this lun will not be allowed from any initiator β unless the target is in demo mode. she's exclusive π
This parameter is only necessary when using LIO.
(optional, string, no default)
lio_iblockβ LIO iblock device name, a number starting from0. Using distinct values here avoids a warning in LIO called"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 intcm_coreonmkdir()in/sys/kernel/config/target/core/. so yeah, give them all different numbers, she's begging π«Ά
(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 async IO, set this to'fileio'β and async I/O works with block devices too, however, you need to understand the consequences. Seetargetcli(8). If you're using the file backend, you need to create the file in advance. If you want SCSI Passthrough, set this to'pscsi'. And do not use PSCSI unless you know exactly how it will be used β for real, don't be reckless with it π
(optional, string, default "block")
block_sizeβ override the block size presented to initiators for this Logical Unit. Accepted values are512,1024,2048, or4096. This sets theblock_sizeattribute in the LIO kernel target (configfs) or theblocksizeattribute in SCST. Requires thelio-torscstimplementation. If unset, the kernel default (typically512) is used β
(optional, integer, no default)
scst_bstypeβ the SCST device handler to use when creating the backstore. Use"vdisk_blockio"for direct I/O (that's the default) or"vdisk_fileio"for page-cache-backed I/O. The fileio handler is required when presenting smaller block sizes on 4K-native backing devices. Requires thescstimplementation π
(optional, string, default "vdisk_blockio")
π₯ SUPPORTED ACTIONS π₯
this resource agent supports the following actions (operations), and yes they each come with suggested timeouts because boundaries are healthy π
startβ starts the resource. Suggested minimum timeout:10s. get her going β¨stopβ stops the resource. Suggested minimum timeout:10s. bye bestie π¦statusβ performs a status check. Suggested minimum timeout:10s. Suggested interval:10s. quick little vibe check πΈmonitorβ performs a detailed status check. Suggested minimum timeout:10s. Suggested interval:10s. the full deep-dive check-in, she's thorough πmeta-dataβ retrieves resource agent metadata (internal use only). Suggested minimum timeout:5s. don't worry about this one, it's behind the scenes πvalidate-allβ performs a validation of the resource configuration. Suggested minimum timeout:10s. making sure everything's giving what it's supposed to give β
π§ EXAMPLE CRM SHELL π§
here's what a iSCSILogicalUnit resource looks like using the crm(8) shell, copy it, love it, live it:
primitive p_iSCSILogicalUnit ocf:heartbeat:iSCSILogicalUnit \
params \
target_iqn=string \
lun=integer \
path=string \
op monitor timeout="10s" interval="10s" depth="0"
π EXAMPLE PCS π
and here's the same situation but using pcs(8), for the pcs girlies:
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 β
go check out http://clusterlabs.org/ β the mothership, the origin story, the blueprint π
π AUTHOR π
ClusterLabs contributors (see the resource agent source for information about individual authors). we stan a collaborative community, fr fr π«Ά
and that's the page, bestie! π this gem is from resource-agents version UNKNOWN, dated 10/01/2026 β so go forth, manage those Logical Units, and remember: no cap, you ate π
β¨π
π¦ where this page comes from
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms