ISCSI Commands

Jump to: navigation, search

Liquidweb 728x90.jpg



This command will return YOURVOLUME(S):

iscsiadm -m discovery -t sendtargets -p $SANGROUPIP

Log in to the iSCSI volume:

iscsiadm -m node -T $YOURVOLUME --login

Restart the iSCSI service:

/etc/init.d/iscsi restart

check for an existing iscsi connection:

iscsiadm -m session

You can disconnect from this session with the following:

iscsiadm -m node -T $YOURVOLUME --logout


Common commands

/etc/init.d/ocfs2 start | stop | restart

See what nodes are mounted:

mounted.ocfs2 -f

To learn the status of the cluster, do:

/etc/init.d/o2cb status





Make sure the correct ports / IPs are allowed:

vim /etc/sysconfig/iptables

-A RH-Firewall-1-INPUT -s -m tcp -p tcp --dport 694 -j ACCEPT
-A RH-Firewall-1-INPUT -s -m udp -p udp --dport 694 -j ACCEPT
-A RH-Firewall-1-INPUT -s -m tcp -p tcp --dport 7788 -j ACCEPT
-A RH-Firewall-1-INPUT -s -m udp -p udp --dport 7788 -j ACCEPT 

/etc/init.d/iptables restart


service drbd start | stop | restart

watch drbd-overview

Watch the status of drbd syncing:

cat /proc/drbd

The second line starts the detailed status information for an individual resource. The individual field headings are as follows:

    cs: connection state
    st: node state (local/remote)
    ld: local data consistency
    ds: data consistency
    ns: network send
    nr: network receive
    dw: disk write
    dr: disk read
    pe: pending (waiting for ack)
    ua: unack'd (still need to send ack)
    al: access log write count


In DRBD, there are two distinct ways of data being transferred between peer nodes:

  • Replication refers to the transfer of modified blocks being transferred from the primary to the secondary node. This happens automatically when the block is modified on the primary node, and the replication process uses whatever bandwidth is available over the replication link. The replication process cannot be throttled, because you want to transfer of the block information to happen as quickly as possible during normal operation.
  • Synchronization refers to the process of bringing peers back in sync after some sort of outage, due to manual intervention, node failure, disk swap, or the initial setup. Synchronization is limited to the syncer rate configured for the DRBD device.

Unfortunately, if the synchronization rate is set too high, then the synchronization process uses up all the available network bandwidth between the primary and secondary nodes. In turn, the bandwidth available for replication of changed blocks is zero, which stalls replication and blocks I/O, and ultimately the application fails or degrades.

To avoid enabling the syncer rate to consume the available network bandwidth and prevent the replication of changed blocks, set the syncer rate to less than the maximum network bandwidth.