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 to 1 and 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 to 1 to 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 to 1 to enable CAW IOCTL emulation πŸ‘‘

(optional, integer, no default)

  • write_cache β€” the write cache mode for this Logical Unit, applied at create time (that's lio-t fileio write_back, SCST write_through). Default 0 creates a write-through device: acknowledged writes survive a crash or power loss, so she's reliable πŸ’–. 1 creates 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 to lio-t block backstores, where the kernel mirrors the backing device's cache mode. And for SCST vdisk_fileio, use write-back only with non-volatile backing storage, since SCST does not flush the backing device's cache on SYNCHRONIZE_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 your tgtadm is built against libaio. See tgtadm(8) bestie, it's all in there πŸ¦‹

(optional, string, no default)

  • tgt_bsoflags β€” TGT-specific backing store open flags (direct|sync). See tgtadm(8) ✨

(optional, string, no default)

  • tgt_bsopts β€” TGT-specific backing store options. See tgtadm(8) 🌈

(optional, string, no default)

  • tgt_device_type β€” TGT-specific device type. See tgtadm(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 from 0. 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 in tcm_core on mkdir() 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. See targetcli(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 are 512, 1024, 2048, or 4096. This sets the block_size attribute in the LIO kernel target (configfs) or the blocksize attribute in SCST. Requires the lio-t or scst implementation. If unset, the kernel default (typically 512) 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 the scst implementation πŸ‘‘

(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