SCST iSCSI Gateway

The SCST iSCSI gateway provides shared disks that support SCSI-3 PRs. Windows guests use these disks to build WSFC clusters on StarlingX.

The gateway is included in a patch release as an extension to the Rook Ceph application. By default, the gateway is disabled and must be configured through Helm overrides.

Gateway Overview

WSFC uses SCSI-3 Persistent Reservations to decide which cluster node owns a shared disk. Ceph RBD volumes presented directly to a guest do not provide this capability, and WSFC disk validation fails without it.

The gateway presents Ceph RBD images as iSCSI LUNs from a target that implements persistent reservations. The Windows guests connect to it with the Windows iSCSI initiator that is built into the guest operating system. The hypervisor takes no part in the reservation path.

Gateway Components

Component

Description

SCST kernel modules

The scst, scst_vdisk, and iscsi_scst modules are installed by the patch release for both the standard and the low-latency kernels. They are loaded at boot on each controller, whether or not the gateway is enabled.

Gateway pod

The scst-iscsi-gateway deployment in the rook-ceph namespace runs one replica on the host network. It runs the iSCSI target daemon and configures SCST. It does not run in privileged mode. It has only the SYS_ADMIN, SYS_MODULE, SYS_RAWIO, and MKNOD capabilities.

Device plugin

A DaemonSet on the control-plane nodes exposes the SCST control device, /dev/iscsi-scst-ctl, as the extended resource starlingx.io/scst-iscsi-ctl. The gateway pod requests this resource to access the device without running in privileged mode.

Disk storage

Each LUN is one Ceph RBD image in the kube-rbd pool. The gateway maps each image on the active controller with the kernel RBD client and exports it as an iSCSI LUN. The gateway creates an image that does not exist when it starts. It never deletes an image on its own. The gateway does not use a pool or a Ceph client of its own. It uses the kube-rbd pool and the client.kube-rbd identity that the platform provides.

Reservation state

Persistent reservation registrations are saved under /opt/platform/scst/pr, which is on the DRBD replicated platform filesystem. The state follows the active controller, so reservations survive a restart of the gateway and a swact.

Portal address

The gateway listens on TCP port 3260 at the cluster-host floating address. The address moves with the active controller.

Placement

A SM service named scst-gw-exit labels the active controller. The deployment requires that label, so the gateway runs only on the active controller, next to the replicated filesystem and the portal address.

Only one gateway runs at a time. The Ceph exclusive lock on each image keeps a second controller from writing to a LUN that is in use.

Supported Configurations

Configuration

Support

AIO-DX

Supported.

Standard

Supported. The gateway runs on a controller.

AIO-SX

Supported, with no controller failover. There is no second controller to move to, so the gateway is unavailable while the controller is down. The pod is restarted if it fails.

The access controls are as follows.

  • Initiator access is controlled by groups. Each group lists the IQNs of the initiators that may connect and the LUN IDs that those initiators can see. Several WSFC clusters can share one gateway, each in its own group, and a cluster sees only its own disks.

  • Authentication with one-way CHAP is optional. The credentials are held in a Kubernetes Secret and are not written to the chart configuration.

  • Network access to port 3260 is limited to the networks that you list. See Provide Network Access to the Portal.

  • Auditing: iSCSI logins, logouts, initiator names, and authentication failures are written to the gateway log.

Prerequisites to Enable the Gateway

Before you enable the gateway, confirm the following.

  • The patch release that delivers the gateway is applied to both controllers. See Apply the Patch Release.

  • The system is AIO-DX, Standard, or AIO-SX.

  • The Rook Ceph application is applied, and the ceph-rook storage backend provides the block service. See Install Rook Ceph.

  • The rook-ceph-provisioner chart is enabled. It creates the kube-rbd client and the ceph-pool-kube-rbd Secret that the gateway uses.

  • The NFD application is applied. The Rook Ceph application checks the loaded kernel modules that NFD reports.

  • The SCST kernel modules are loaded on each controller.

    ~(keystone_admin)]$ lsmod | grep -E '^(scst|scst_vdisk|iscsi_scst) '
    ~(keystone_admin)]$ ssh controller-1 lsmod | grep -E '^(scst|scst_vdisk|iscsi_scst) '
    

    Each command must list all three modules. On AIO-SX, run the first command only.

  • You know the name and size of each LUN, the IQN of each Windows initiator that may connect and the LUNs it may see, and the subnets that the Windows guests connect from.

The apply of the Rook Ceph application fails with a message that names the missing item if the chart is enabled and one of the following is true.

  • The NFD application is not applied.

  • An SCST module is not loaded on a controller. NFD can take up to an hour to report a module that was loaded after NFD started. A module that is loaded at boot is reported when NFD starts.

  • The block service is not provided, or the rook-ceph-provisioner chart is disabled.

  • The overrides set ceph.pool.name, ceph.user, ceph.keyringSecret, or ceph.keyringSecretKey to anything other than the platform values.

Enable and Configure the Gateway

  1. Create an override file, for example scst-gateway-overrides.yaml.

    enabled: true
    
    luns:
      - name: lun01
        rbdImage: wsfc-lun01
        lunId: 0
        sizeGiB: 50
      - name: lun02
        rbdImage: wsfc-lun02
        lunId: 1
        sizeGiB: 100
    
    iscsi:
      targetIQN: "iqn.2026-01.com.example:scst-gateway"
      groups:
        - name: wsfc-cluster-1
          initiatorACLs:
            - iqn.1991-05.com.microsoft:wsfc-node-a
            - iqn.1991-05.com.microsoft:wsfc-node-b
          luns: [0, 1]
    
    networkPolicy:
      initiatorSubnets:
        - 172.16.10.0/24
        - fd00:172:16:10::/64
    

    Each group lists the initiators that may connect and the LUN IDs that they can see. Add one group for each WSFC cluster. At least one LUN is required. For all overrides and their limits, see Override Parameters Reference.

  2. Optional: Enable CHAP authentication.

    1. Create a Secret in the rook-ceph namespace with the user name and password. The password must have at least 12 characters. Neither value can contain white space or double quotes.

      ~(keystone_admin)]$ kubectl -n rook-ceph create secret generic scst-chap --from-literal=username=<user> --from-literal=password=<password>
      
    2. Add the following to the override file.

      iscsi:
        chap:
          enabled: true
          secretName: scst-chap
      
  3. Set the overrides.

    ~(keystone_admin)]$ system helm-override-update rook-ceph scst-iscsi-gateway rook-ceph --values scst-gateway-overrides.yaml
    
  4. Enable the chart.

    ~(keystone_admin)]$ system helm-chart-attribute-modify --enabled true rook-ceph scst-iscsi-gateway rook-ceph
    
  5. Apply the Rook Ceph application.

    ~(keystone_admin)]$ system application-apply rook-ceph
    

    Wait until the application is applied.

    ~(keystone_admin)]$ system application-show rook-ceph
    

    If the apply is rejected, the message names the missing prerequisite. See Prerequisites to Enable the Gateway. Correct it and apply again.

  6. Verify the gateway.

    1. Confirm that the pod is running on the active controller.

      ~(keystone_admin)]$ kubectl -n rook-ceph get pods -l app.kubernetes.io/name=scst-iscsi-gateway -o wide
      

      The pod must show 1/1 and Running, on the active controller.

    2. Confirm that SM manages the placement service. Skip this step on AIO-SX, where the service is not used.

      ~(keystone_admin)]$ sudo sm-dump | grep scst-gw-exit
      

      The service must be enabled-active on the active controller.

    3. Confirm that the portal is listening.

      ~(keystone_admin)]$ getent hosts controller-cluster-host
      ~(keystone_admin)]$ sudo ss -ltn 'sport = :3260'
      

      The address that the first command returns is the portal address. The second command must show a listener on port 3260.

  7. In each Windows guest, use the Windows iSCSI initiator to connect.

    Discover the portal at the portal address on port 3260, and connect to the target. If you enabled CHAP, supply the user name and password. The guest sees only the LUNs of its group.

The gateway now exports the configured LUNs on the cluster-host floating address. The Windows guests can use the disks, including persistent reservations, as shared cluster disks.

Change the Configuration

To add or remove a LUN, change a group, or change the subnets, edit the override file, set the overrides again, and apply the application.

~(keystone_admin)]$ system helm-override-update rook-ceph scst-iscsi-gateway rook-ceph --values scst-gateway-overrides.yaml
~(keystone_admin)]$ system application-apply rook-ceph

Warning

Applying a change to the gateway configuration, such as the LUNs or the groups, restarts the gateway. All LUNs are unavailable while it restarts, and the Windows initiators reconnect afterward. Make changes when the cluster can tolerate the interruption.

The gateway creates the image for a LUN in luns if the image does not exist when the gateway starts. The size is used only when the image is created. Removing a LUN from the list stops exporting it but does not delete its image.

Override Parameters Reference

Set these values with system helm-override-update. The values that you do not set keep the defaults.

Gateway Overrides

Override

Default

Description

enabled

false

Deploys the gateway when true. Also enable the chart with system helm-chart-attribute-modify. The apply fails if the gateway is enabled and luns is empty.

luns[].name

None

Name of the LUN device. Required. It is unique, has at most 16 characters, and uses only letters, digits, ., _, and -.

luns[].rbdImage

None

Name of the Ceph RBD image in the kube-rbd pool. It uses only letters, digits, ., _, and -.

luns[].lunId

None

LUN ID, 0 to 255, unique. Groups refer to LUNs by this ID.

luns[].sizeGiB

None

Size in GiB, a positive integer. It is used only when the image is created.

iscsi.targetIQN

Set by the chart

IQN of the target. It must be a valid iqn. or eui. name.

iscsi.groups[].name

None

Name of the initiator group.

iscsi.groups[].initiatorACLs

None

IQNs of the initiators that may connect. The key initiators is also accepted.

iscsi.groups[].luns

None

LUN IDs that the group can see.

iscsi.chap.enabled

false

Requires one-way CHAP from initiators.

iscsi.chap.secretName

Empty

Secret with username and password keys, in the rook-ceph namespace.

networkPolicy.initiatorSubnets

Empty

Subnets that may reach port 3260. Nothing is widened if the list is empty.

networkPolicy.hostEndpointSelector

Both controllers

Calico selector for the host endpoints that the policy applies to. Narrow it to admit port 3260 on one platform network only.

scst.threadsNum

4

Number of SCST threads for each device.

gateway.portal.port

3260

iSCSI port. The system selects the portal address.

gateway.rbd.lockTimeoutSeconds

30

How long the gateway waits for a held image lock when it maps an image.

gateway.securityContext.privileged

false

Runs the gateway privileged when true. A privileged gateway does not use the device plugin. Leave it false unless instructed by support.

cleanup.deletePool

false

Stops the gateway and deletes the LUN images that are listed in luns when true. See Disable the Gateway.

Note

The scst.nvCache and scst.writeThrough overrides ensure write durability across controller failovers, which is required by WSFC. Do not change these settings to improve performance.

If you use an existing RBD image, it can have only the layering and exclusive-lock features. The gateway rejects an image with the object-map, fast-diff, deep-flatten, or journaling feature, and an image that is encrypted with LUKS. The images that the gateway creates have only the two supported features.

Provide Network Access to the Portal

The gateway listens on TCP port 3260 at the cluster-host floating address. Each Windows guest must be able to route to that address.

By default, the platform firewall on each network admits traffic only from the network’s own subnet. A guest that reaches the portal across a router arrives with a source address from its own subnet, and the platform drops its connection before it reaches the gateway.

To admit the guests, list their subnets in networkPolicy.initiatorSubnets and apply the override. The gateway then creates a Calico global network policy named scst-iscsi-gateway-portal. The policy:

  • admits TCP port 3260 only, from the listed subnets only

  • applies to the host endpoints of both controllers by default

  • adds to the platform policies and does not replace them, so other platform ports stay closed to those subnets

To confirm the policy, run the following command.

~(keystone_admin)]$ kubectl get globalnetworkpolicy scst-iscsi-gateway-portal

Understand Failover Behavior

The gateway always runs on the active controller. The SM service scst-gw-exit follows the active role. On AIO-SX there is only one controller, the service is not used, and the gateway does not fail over.

Planned Swact

A planned swact moves the active controller role to the other controller in a controlled way. During a planned swact, the gateway moves to the new active controller as follows.

  1. SM removes the placement label from the outgoing controller and deletes the gateway pod there, which closes the target, unmaps the images, and releases their Ceph locks.

  2. SM labels the new active controller. The gateway pod starts there.

  3. An init container holds the pod until the platform DRBD filesystem is mounted, so that the gateway never starts on an empty reservation store.

  4. The gateway maps the images, configures the target, and opens the portal only when every LUN is ready.

Registrations and reservations are preserved because their state is stored on the DRBD filesystem. The Windows initiators reconnect to the same portal address. The disks are typically unavailable for one to two minutes.

Unplanned Controller Failure

If the active controller fails without releasing its Ceph locks, the new active gateway detects the held locks. It confirms that the previous holder is not a live client, blocklists it, removes the lock, and maps the image. A live holder is never forced off. Recovery is automatic. Blocklisting needs a permission that the rook-ceph-provisioner chart grants to client.kube-rbd when the Rook Ceph application is applied.

Caution

Recovery after an unplanned loss of the active controller takes longer than a planned swact, and the time depends on how quickly Ceph detects the loss and marks the OSDs of the failed controller down. Windows initiators time out and report the disk as failed if the portal is unavailable for longer than their reconnect timeout. Plan the WSFC timeouts and maintenance accordingly.

Monitor the Gateway

The gateway does not generate its own alarms. Check the following components instead.

  • Pod status.

    ~(keystone_admin)]$ kubectl -n rook-ceph get pods -l app.kubernetes.io/name=scst-iscsi-gateway -o wide
    
  • The gateway log, which records iSCSI logins, logouts, initiator names, and authentication failures.

    ~(keystone_admin)]$ kubectl -n rook-ceph logs deployment/scst-iscsi-gateway
    
  • The placement service and its log. Not applicable to AIO-SX.

    ~(keystone_admin)]$ sudo sm-dump | grep scst-gw-exit
    ~(keystone_admin)]$ sudo tail /var/log/ceph/scst-iscsi-gateway-service.log
    

The pod is ready only when the portal address is local to the controller, the platform DRBD filesystem is mounted, the target is enabled, and every LUN in the applied configuration is present.

Back Up and Restore the Gateway State

When the gateway is enabled, the platform backup includes the persistent reservation state stored in /opt/platform/scst. The platform restore operation restores this state. See Back Up System Data Overview and Restore Platform System Data and Storage.

The Helm overrides are saved in the system database backup. The Ceph images are kept as long as the Ceph cluster survives.

The platform backup does not include the data in your LUNs. You are responsible for protecting that data, for example with backups done inside the guest, Ceph RBD snapshots, or Ceph pool mirroring.

Disable the Gateway

  1. Stop all initiators from using the disks. Take the WSFC disk resources offline and disconnect the initiators in the guests.

  2. Disable the chart and apply the application.

    ~(keystone_admin)]$ system helm-chart-attribute-modify --enabled false rook-ceph scst-iscsi-gateway rook-ceph
    ~(keystone_admin)]$ system application-apply rook-ceph
    

Disabling the gateway stops the service, unmaps the images, and releases their Ceph locks. The Ceph images and application overrides are retained. To re-enable the gateway, re-enable the chart and reapply the application. See Enable and Configure the Gateway.

Delete the LUN Images

Warning

This permanently deletes the data in the images. Back up anything you need first.

To delete the images, set cleanup.deletePool: true in the overrides and apply the application. The gateway stops and a job deletes only the images listed in luns. The kube-rbd pool is shared with other consumers and is never deleted or changed. Set cleanup.deletePool back to false before you enable the gateway again.

Warning

Deleting the images does not delete their persistent reservation state under /opt/platform/scst/pr, which is named after the LUN. A LUN that you create again with the same name inherits the old registrations. Use a new LUN name for new images.

Apply the Patch Release

The patch release requires a reboot of each controller. Apply it with the standard software deployment procedure, manual or orchestrated. See Manual Metapackage Host Software Deployment.

The patch release installs the software that provides the gateway, including the SCST kernel modules. The gateway stays disabled until you enable it. To use it, follow Prerequisites to Enable the Gateway after the reboot of the last controller.

Remove the Patch Release

The patch release requires a reboot. The system prevents removal while the gateway is enabled.

  1. Disable the gateway. See Disable the Gateway.

  2. Remove the patch release with the standard procedure. See Manual Removal Host Software Deployment.

If the gateway is still enabled, the removal stops at the start of the deployment and prints the steps to disable it first.

Note

You can force the removal with the --force option. The system then stops the gateway pod on the active controller, which releases the Ceph locks, removes the scst-gw-exit service from SM, and removes the placement label. The service on the standby controller is removed when that controller rolls back. The Ceph images are left in place. Use --force only if you cannot disable the gateway first.

Limitations

  • Only one portal and one path is supported. Multipath I/O with several portals is not supported.

  • The gateway is active-passive. Active-active access is not supported.

  • Changing the LUN inventory or the access groups restarts the gateway. All LUNs are briefly unavailable while it restarts.

  • LUN names are limited to 16 characters.

  • The kernel RBD client supports only the layering and exclusive-lock image features.

  • On AIO-SX there is no controller failover.

  • The gateway does not raise its own alarms. Use the pod status and the probes to monitor it.

Troubleshoot the Gateway

Common problems

Problem

Cause and action

The apply is rejected.

A prerequisite is missing. The message names it. See Prerequisites to Enable the Gateway.

The apply fails with an error about no luns, an invalid name, or an invalid IQN.

The override fails validation. Correct it using the limits in Override Parameters Reference.

The pod stays Pending.

No controller has the placement label. Check that scst-gw-exit is enabled-active with sudo sm-dump.

The pod stays in Init.

The platform DRBD filesystem is not mounted on that controller. The init container log names the node and the reason.

The pod fails or restarts repeatedly after CHAP is enabled.

The CHAP password may have fewer than 12 characters, or a value contains white space or a double quote. Also confirm that the Secret exists in the rook-ceph namespace with both username and password keys. Check the pod events and the gateway log.

The pod restarts and the log reports an unsupported image feature or an encrypted image.

The image has a feature other than layering and exclusive-lock, or it is encrypted with LUKS. Use a different image. See Override Parameters Reference.

The pod is running but not ready.

A LUN is missing, or the wrong device is behind a LUN. Check the gateway log for the LUN and its image.

An initiator cannot reach the portal.

The initiator subnet is not in networkPolicy.initiatorSubnets, or there is no route from the guest to the portal address. See Provide Network Access to the Portal.

An initiator connects but sees no disk.

Its IQN is not in initiatorACLs of the group, or the group does not list the LUN ID.

A LUN does not come up after a controller failure.

A stale Ceph lock is held. The gateway breaks it after it fences the previous holder. Check the gateway log for the lock and the blocklist messages. See Understand Failover Behavior.