From owner-freebsd-stable@FreeBSD.ORG Tue Mar 29 21:05:57 2011 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6ED21065674 for ; Tue, 29 Mar 2011 21:05:57 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 34E0B8FC1C for ; Tue, 29 Mar 2011 21:05:56 +0000 (UTC) Received: by fxm11 with SMTP id 11so722956fxm.13 for ; Tue, 29 Mar 2011 14:05:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:references:x-comment-to :sender:date:in-reply-to:message-id:user-agent:mime-version :content-type; bh=hfVDwbe4zw7qByhAG5lFbYc050+AVjGXPP1EEt4IWIE=; b=DA6IHc7Uj5dpOPkQGW7h+YbKM3F4b7qmDZFtJoqQAyo7m8W/LiCh5QCffnMO8QAs/1 2ISefVikXdhRt/mkPfA35cyIwd5GKCa6E2iBd9K/YVJ5AmgoYVBi+uVENYfERvQy3gje YMuKPgOVUObO18t5WPUGwA7hVZ6WTGVSwf+OI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:x-comment-to:sender:date:in-reply-to :message-id:user-agent:mime-version:content-type; b=Guaprm9GfggtQ0UUrQAcCHZQJu3E5zcOrqFG0A6ionbjtCJ07hTJSf52D58wuDYVos 6J5qXhZK9bwFKg8H3jLtE3DVjao77WBsj+2CQX0j6cIwoUGDzlbeVBX1BVeWldnTxoRL 0WP2fMGsV/gvoG/oLgQ0sIWSqPZ+gIP9wc0UI= Received: by 10.223.44.89 with SMTP id z25mr311741fae.74.1301430995231; Tue, 29 Mar 2011 13:36:35 -0700 (PDT) Received: from localhost ([95.69.172.154]) by mx.google.com with ESMTPS id l4sm2131243fan.14.2011.03.29.13.36.33 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 29 Mar 2011 13:36:34 -0700 (PDT) From: Mikolaj Golub To: Denny Schierz References: <1301397421.11113.250.camel@pcdenny> X-Comment-To: Denny Schierz Sender: Mikolaj Golub Date: Tue, 29 Mar 2011 23:36:32 +0300 In-Reply-To: <1301397421.11113.250.camel@pcdenny> (Denny Schierz's message of "Tue, 29 Mar 2011 13:17:01 +0200") Message-ID: <86ipv1ll4f.fsf@kopusha.home.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: stable@freebsd.org Subject: Re: way for failover zpool (no HAST needed) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Mar 2011 21:05:57 -0000 On Tue, 29 Mar 2011 13:17:01 +0200 Denny Schierz wrote: DS> hi, DS> my two nodes are running fine with 8.2-stable and the LSI 9200-8e and DS> now, I want to build a failover for the Zpool (and later ISCSI target) DS> Both nodes are connected to the same disks (jbod) and now I need a way, DS> to get the zpool(s) running on the node with the CARP public IP. You don't need HAST but might you want to try net-mgmt/hastmon? :-) I wrote it because didn't like much failovering with CARP. For hastmon you need at least 3 hosts: 2 cluster nodes (primary/secondary) and watchdog. Watchdog is polling the states of the cluster nodes. Secondary decides to failover when: 1) There is no connection with primary. 2) There are complaints from watchdog. The configuration is simple and would look like below (on all 3 hosts): resource iscsi { exec /etc/iscsi.sh on hostA { remote hostB priority 0 } on hostB { remote hostA priority 1 } on hostW { remote hostA hostB } } /etc/iscsi.sh script should support at least 3 arguments: start -- switch node to primary (iscsi up, IP up, etc); stop -- switch node to secondary; status -- return current status (0 - UP, 1 - DOWN, 2 - UNKNOWN). You can find more information in README: http://code.google.com/p/hastmon/wiki/README -- Mikolaj Golub