rc script for iSCSI initiator

Miroslav Lachman 000.fbsd at quip.cz
Sun Apr 24 19:53:53 UTC 2011


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


More information about the freebsd-rc mailing list