iSCSI on Debian/Ubuntu - High Availability

Linux

Audience
Public
Product
FlashBlade
FlashArray
Technology Integrations
Linux
Source Type
Documentation

iSCSI Path Redundancy Model

iSCSI/dm-multipath Failover Sequence

Failover Timing

iSCSI Failover Parameters

Parameter Default Recommended Description
replacement_timeout 120s 20s Time before failing over to alternate path
fast_io_fail_tmo 5s 5s Time before marking path as failed
no_path_retry fail queue Behavior when all paths fail
polling_interval 5s 5s Path checking frequency

Configure timeouts in /etc/iscsi/iscsid.conf:

# Aggressive failover (faster, may cause false positives in busy networks)
node.session.timeo.replacement_timeout = 20

# Conservative failover (slower, more tolerant of network glitches)
node.session.timeo.replacement_timeout = 60

Path States

dm-multipath Path Groups

Failback Behavior

Automatic failback (default for active/active arrays):

  • When failed path recovers, I/O is automatically rebalanced

  • No manual intervention required

Manual failback (for active/passive arrays):

# Check current path states
multipathd show paths

# Force path check
multipathd reconfigure

# Manually switch path group
multipathd switchgroup <multipath_device> <group_number>

Cluster Configuration with Pacemaker

Install cluster packages:

# Install Pacemaker and Corosync
sudo apt install -y pacemaker corosync crmsh fence-agents

# Configure Corosync
sudo tee /etc/corosync/corosync.conf > /dev/null <<'EOF'
totem {
    version: 2
    cluster_name: iscsi-cluster
    transport: udpu
    interface {
        ringnumber: 0
        bindnetaddr: 192.168.1.0
        broadcast: yes
        mcastport: 5405
    }
}

nodelist {
    node {
        ring0_addr: 192.168.1.11
        name: node1
        nodeid: 1
    }
    node {
        ring0_addr: 192.168.1.12
        name: node2
        nodeid: 2
    }
}

quorum {
    provider: corosync_votequorum
    two_node: 1
}

logging {
    to_logfile: yes
    logfile: /var/log/corosync/corosync.log
    to_syslog: yes
}
EOF

# Start cluster services
sudo systemctl enable --now corosync
sudo systemctl enable --now pacemaker

# Check cluster status
sudo crm status

Shared Storage Resources

Configure iSCSI LVM as cluster resource:

# Create LVM volume group on multipath device
sudo vgcreate vg_iscsi /dev/mapper/mpatha

# Create logical volume
sudo lvcreate -L 100G -n lv_data vg_iscsi

# Create filesystem
sudo mkfs.ext4 /dev/vg_iscsi/lv_data

# Add to cluster as resource
sudo crm configure primitive fs_data Filesystem \
    params device="/dev/vg_iscsi/lv_data" directory="/mnt/data" fstype="ext4" \
    op monitor interval="20s"

# Verify
sudo crm status