From owner-freebsd-rc@FreeBSD.ORG Sun Apr 24 19:53:53 2011 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 107761065673 for ; Sun, 24 Apr 2011 19:53:53 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) by mx1.freebsd.org (Postfix) with ESMTP id C47DF8FC14 for ; Sun, 24 Apr 2011 19:53:52 +0000 (UTC) Received: from elsa.codelab.cz (localhost.codelab.cz [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id 6B6D619E02D; Sun, 24 Apr 2011 21:37:51 +0200 (CEST) Received: from [192.168.1.2] (ip-86-49-61-235.net.upcbroadband.cz [86.49.61.235]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id 300F319E02F; Sun, 24 Apr 2011 21:37:49 +0200 (CEST) Message-ID: <4DB47C0C.1040708@quip.cz> Date: Sun, 24 Apr 2011 21:37:48 +0200 From: Miroslav Lachman <000.fbsd@quip.cz> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1.18) Gecko/20110320 SeaMonkey/2.0.13 MIME-Version: 1.0 To: freebsd-rc@freebsd.org, Daniel Braniss References: <4B621C9D.8050101@quip.cz> In-Reply-To: <4B621C9D.8050101@quip.cz> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: rc script for iSCSI initiator X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 19:53:53 -0000 Miroslav Lachman wrote: > Hi, > > iSCSI initiator is in the base for a long time, but there is not > rc.d/iscsi script to start iSCSI sessions. I found one old in mailing > list and take it as base for my work. > I attached two versions. > > *rc.d_iscsi.all.txt* manage all defined targets at start / stop command > > *rc.d_iscsi.individual.txt* can selectively start / stop individual > sessions (targets defined in /etc/iscsi.conf and in rc.conf > iscsi_targets="") > > It is not intended to direct commit, it is just work in progress and > needs some discussion and improvements from rc folks. > > Scripts are too verbose for better debugging. > > Both of them can be called as: > > /etc/rc.d/iscsi start|stop > > The "individual" version can be called: > > /etc/rc.d/iscsi start|stop [target_name] > > For example: > > # /etc/rc.d/iscsi start styx_storage_1 > debug.iscsi_initiator: 2 -> 0 > Starting iSCSI session for styx_storage_1 > Waiting for /dev/ufs/styx0p1: . OK > /dev/ufs/styx0p1: FILE SYSTEM CLEAN; SKIPPING CHECKS > /dev/ufs/styx0p1: clean, 856565848 free (896 frags, 107070619 blocks, > 0.0% fragmentation) > /dev/ufs/styx0p1 on /vol1 (ufs, local, soft-updates, fsid 2d3d5e4b8b67f290) > > > # /etc/rc.d/iscsi stop styx_storage_1 > Unmounting iSCSI volumes for styx_storage_1 > /dev/ufs/styx0p1: unmount from /vol1 > Stopping iSCSI session for: styx_storage_1 > .....All iSCSI sessions were stopped [...] > I am open to any comments, sugesstions, warnings etc. It is more than one year without comments, sugesstions etc.. The 9.0 release cycle is comming and we still have no rc script for iSCSI initiator in base. Are there somebody willing to commit the script? I can dedicate some of my free time to rewrite it in some "better" way if somebody will tell me what is wrong in an earlier version and what will be the right name for the script. http://lists.freebsd.org/pipermail/freebsd-rc/2010-January/001841.html Miroslav Lachman