From owner-svn-src-all@freebsd.org Sat Sep 12 10:23:25 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B5B4A01CF1; Sat, 12 Sep 2015 10:23:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B12F1ABA; Sat, 12 Sep 2015 10:23:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8CANP1Z082165; Sat, 12 Sep 2015 10:23:25 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8CANOmx082162; Sat, 12 Sep 2015 10:23:24 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509121023.t8CANOmx082162@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 12 Sep 2015 10:23:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287707 - in head: share/man/man4 sys/cam/ctl usr.sbin/ctladm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Sep 2015 10:23:25 -0000 Author: mav Date: Sat Sep 12 10:23:23 2015 New Revision: 287707 URL: https://svnweb.freebsd.org/changeset/base/287707 Log: CTL documentation update, mostly for HA. Modified: head/share/man/man4/ctl.4 head/sys/cam/ctl/README.ctl.txt head/usr.sbin/ctladm/ctladm.8 Modified: head/share/man/man4/ctl.4 ============================================================================== --- head/share/man/man4/ctl.4 Sat Sep 12 09:56:23 2015 (r287706) +++ head/share/man/man4/ctl.4 Sat Sep 12 10:23:23 2015 (r287707) @@ -1,4 +1,5 @@ .\" Copyright (c) 2013 Edward Tomasz Napierala +.\" Copyright (c) 2015 Alexander Motin .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -23,7 +24,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd August 9, 2015 +.Dd September 12, 2015 .Dt CTL 4 .Os .Sh NAME @@ -80,6 +81,8 @@ Mode sense/select support .It Error injection support .It +High Availability clustering support with ALUA +.It All I/O handled in-kernel, no userland context switch overhead .El .Pp @@ -99,9 +102,57 @@ log commands with errors; .It 2 log all commands; .It 4 -log received data for commands except READ/WRITE. +log data for commands other then READ/WRITE. .El Defaults to 0. +.It Va kern.cam.ctl.ha_id +Specifies unique position of this node within High Availability cluster. +Default is 0 -- no HA, 1 and 2 -- HA enabled at specified position. +.It Va kern.cam.ctl.ha_mode +Specifies High Availability cluster operation mode: +.Bl -tag -offset indent -compact +.It 0 +Active/Standby -- primary node has backend access and processes requests, +while secondary can only do basic LUN discovery and reservation; +.It 1 +Active/Active -- both nodes have backend access and process requests, +while secondary node synchronizes processing with primary one; +.It 2 +Active/Active -- primary node has backend access and processes requests, +while secondary node forwards all requests and data to primary one; +.El +All above modes require established connection between HA cluster nodes. +If connection is not configured, secondary node will report Unavailable +state; if configured but not established -- Transitioning state. +Defaults to 0. +.It Va kern.cam.ctl.ha_peer +String value, specifying method to establish connection to peer HA node. +Can be "listen IP:port", "connect IP:port" or empty. +.It Va kern.cam.ctl.ha_link +Reports present state of connection between HA cluster nodes: +.Bl -tag -offset indent -compact +.It 0 +not configured; +.It 1 +configured but not established; +.It 2 +established. +.El +.It Va kern.cam.ctl.ha_role +Specifies default role of this node: +.Bl -tag -offset indent -compact +.It 0 +primary; +.It 1 +secondary. +.El +This role can be overriden on per-LUN basis using "ha_role" LUN option, +so that for one LUN one node is primary, while for another -- another. +Role change from primary to secondary for HA modes 0 and 2 closes backends, +the opposite change -- opens. +If there is no primary node (both nodes are secondary, or secondary node has +no connection to primary one), secondary node(s) report Transitioning state. +State with two primary nodes is illegal (split brain condition). .It Va kern.cam.ctl.iscsi.debug Verbosity level for log messages from the kernel part of iSCSI target. Set to 0 to disable logging or 1 to warn about potential problems. @@ -132,5 +183,7 @@ subsystem first appeared in .Sh AUTHORS The .Nm -subsystem was written by +subsystem was originally written by .An Kenneth Merry Aq Mt ken@FreeBSD.org . +Later work was done by +.An Alexander Motin Aq Mt mav@FreeBSD.org . Modified: head/sys/cam/ctl/README.ctl.txt ============================================================================== --- head/sys/cam/ctl/README.ctl.txt Sat Sep 12 09:56:23 2015 (r287706) +++ head/sys/cam/ctl/README.ctl.txt Sat Sep 12 10:23:23 2015 (r287707) @@ -40,25 +40,24 @@ Features: - Support for multiple ports - Support for multiple simultaneous initiators - Support for multiple simultaneous backing stores + - Support for VMWare VAAI: COMPARE AND WRITE, XCOPY, WRITE SAME and + UNMAP commands + - Support for Microsoft ODX: POPULATE TOKEN/WRITE USING TOKEN, WRITE SAME + and UNMAP commands - Persistent reservation support - Mode sense/select support - Error injection support - - High Availability support + - High Availability clustering support with ALUA - All I/O handled in-kernel, no userland context switch overhead. Configuring and Running CTL: =========================== - - After applying the CTL patchset to your tree, build world and install it - on your target system. - - - Add 'device ctl' to your kernel configuration file. + - Add 'device ctl' to your kernel configuration file or load the module. - If you're running with a 8Gb or 4Gb Qlogic FC board, add - 'options ISP_TARGET_MODE' to your kernel config file. Keep in mind that - the isp(4) driver can run in target or initiator mode, but not both on - the same machine. 'device ispfw' or loading the ispfw module is also - recommended. + 'options ISP_TARGET_MODE' to your kernel config file. 'device ispfw' or + loading the ispfw module is also recommended. - Rebuild and install a new kernel. Modified: head/usr.sbin/ctladm/ctladm.8 ============================================================================== --- head/usr.sbin/ctladm/ctladm.8 Sat Sep 12 09:56:23 2015 (r287706) +++ head/usr.sbin/ctladm/ctladm.8 Sat Sep 12 10:23:23 2015 (r287707) @@ -1,5 +1,6 @@ .\" .\" Copyright (c) 2003 Silicon Graphics International Corp. +.\" Copyright (c) 2015 Alexander Motin .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -34,7 +35,7 @@ .\" $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.8#3 $ .\" $FreeBSD$ .\" -.Dd September 10, 2015 +.Dd September 12, 2015 .Dt CTLADM 8 .Os .Sh NAME @@ -964,6 +965,9 @@ Specifies LUN NAA identifier. Either EUI or NAA identifier should be set to UNIQUE value to allow EXTENDED COPY command access the LUN. Non-unique LUN identifiers may lead to data corruption. +.It Va ha_role +Setting to "primary" or "secondary" overrides default role of the node +in HA cluster, set by kern.cam.ctl.ha_role sysctl. .It Va insecure_tpc Setting to "on" allows EXTENDED COPY command sent to this LUN access other LUNs on this host, not accessible otherwise. @@ -995,7 +999,6 @@ Specify physical block size and offset o .It Va ublockoffset Specify UNMAP block size and offset of the device. .It Va rpm -.It Va rpm Specifies medium rotation rate of the device: 0 -- not reported, 1 -- non-rotating (SSD), >1024 -- value in revolutions per minute. .It Va formfactor