diff options
author | mav <mav@FreeBSD.org> | 2015-02-01 21:50:28 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2015-02-01 21:50:28 +0000 |
commit | 8adb86862b914637b98b57e7708b6d2171e108e1 (patch) | |
tree | 73947d5774a365e2dbdf24d9296d66ac4cb8e566 /usr.sbin/ctld/ctl.conf.5 | |
parent | 034497915685715efafad305dcd278c391b06ee4 (diff) | |
download | FreeBSD-src-8adb86862b914637b98b57e7708b6d2171e108e1.zip FreeBSD-src-8adb86862b914637b98b57e7708b6d2171e108e1.tar.gz |
CTL LUN mapping rewrite.
Replace iSCSI-specific LUN mapping mechanism with new one, working for any
ports. By default all ports are created without LUN mapping, exposing all
CTL LUNs as before. But, if needed, LUN mapping can be manually set on
per-port basis via ctladm. For its iSCSI ports ctld does it via ioctl(2).
The next step will be to teach ctld to work with FibreChannel ports also.
Respecting additional flexibility of the new mechanism, ctl.conf now allows
alternative syntax for LUN definition. LUNs can now be defined in global
context, and then referenced from targets by unique name, as needed. It
allows same LUN to be exposed several times via multiple targets.
While there, increase limit for LUNs per target in ctld from 256 to 1024.
Some initiators do not support LUNs above 255, but that is not our problem.
Discussed with: trasz
MFC after: 2 weeks
Relnotes: yes
Sponsored by: iXsystems, Inc.
Diffstat (limited to 'usr.sbin/ctld/ctl.conf.5')
-rw-r--r-- | usr.sbin/ctld/ctl.conf.5 | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/usr.sbin/ctld/ctl.conf.5 b/usr.sbin/ctld/ctl.conf.5 index 0b8014f..789161f 100644 --- a/usr.sbin/ctld/ctl.conf.5 +++ b/usr.sbin/ctld/ctl.conf.5 @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 24, 2014 +.Dd February 1, 2015 .Dt CTL.CONF 5 .Os .Sh NAME @@ -60,9 +60,14 @@ file is: .Dl ... } +.No lun Ar name No { +.Dl path Ar path +} + .No target Ar name { .Dl auth-group Ar name .Dl portal-group Ar name +.Dl lun Ar number Ar name .Dl lun Ar number No { .Dl path Ar path .Dl } @@ -95,6 +100,10 @@ Create a configuration context, defining a new portal-group, which can then be assigned to any number of targets. +.It Ic lun Ar name +Create a +.Sy lun +configuration context, defining a LUN to be exported by some target(s). .It Ic target Ar name Create a .Sy target @@ -312,6 +321,10 @@ IPv4 or IPv6 address to redirect initiators to. When configured, all initiators attempting to connect to this target will get redirected using "Target moved temporarily" login response. Redirection happens after successful authentication. +.It Ic lun Ar number Ar name +Export previously defined +.Sy lun +by the parent target. .It Ic lun Ar number Create a .Sy lun @@ -387,21 +400,21 @@ target iqn.2012-06.com.example:target0 { } } +lun example_1 { + path /dev/zvol/tank/example_1 +} + target iqn.2012-06.com.example:target1 { chap chapuser chapsecret - lun 0 { - path /dev/zvol/tank/example_1 - } + lun 0 example_1 } target iqn.2012-06.com.example:target2 { auth-group ag0 portal-group pg0 - lun 0 { - path /dev/zvol/tank/example2_0 - } + lun 0 example_1 lun 1 { - path /dev/zvol/tank/example2_1 + path /dev/zvol/tank/example_2 option foo bar } } |