Re: RHEL7 vs SLES12 targetcli brain damage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am responsible for much of the SLE12 target code, so perhaps I can
help answer your questions.

On 12/10/2014 04:05 PM, Dax Kelson wrote:
> This is my first time trying to use targetcli on SLES12. I have quite
> a bit of experience with it on Fedora and RHEL7. I'm trying to setup
> an iSCSI target configuration that behaves identical no matter if is
> on RHEL7 or SLES12. To me at least, ideally I could just plop down a
> /etc/target/saveconfig.json on both and enable service and be done.
> This unfortunately is not the case.
> 
> RHEL7 (targetcli-2.1.fb34-1.el7.noarch)  :
> 
> /iscsi/iqn.19...station3/tpg1> get auth <TAB><TAB>
> mutual_password  mutual_userid    password         userid
> ........................................parameter
> 
> SLES12 (targetcli-2.1-3.8.x86_64):
> 
> /iscsi/iqn.19...station3/tpg1> get auth <TAB><TAB>
> authenticate_target  password             password_mutual      userid
>              userid_mutual
> ........................................parameter
> 
> In case it isn't clear the problem is
> 
> mutual_password vs password_mutual
> mutual_userid vs userid_mutual

This has been addressed by Andy already.

> 
> Also on SLES12, this command silently fails:
> 
> /> /backstores/fileio create name=t1 file_or_dev=/srv/iscsi-luns/station1

The syntax is wrong, though it's a bug that you are not getting an error
message, and I have filed a SLE 12 bug on this "no message" problem.

Try specifying a size. And you do not need to specify the param names
unless you want to. So:

  backends/fileio create t1 /srv/iscsi-luns/station1 <SIZE-IN-BYTES>

I believe it will work.

> 
> 
> /> ls /backstores/fileio
> o- fileio .......................................................................................................
> [0 Storage Object]
> />
> 
> Also on SLES12 there is no "targetcli restoreconfig". There is a
> /usr/bin/load_targetcli_config command. How do I save a config ala
> /etc/target/saveconfig.json on SLES12 and have it loaded automatically
> on boot?
> 

There is no restoreconfig command in the targetcli package, period. I'm
guessing this is another difference between targetcli and targetcli-ng.

If you configuration is working correctly, you should not need a
"restoreconfig" command, since the lio-utils package (aka the "target"
service) should save your config when you shutdown and restore it when
you boot up.

But ... I wanted to be able to restore one of various different
configurations, so I'm the one that created the "load_targetcli_config"
command. Simply run "load_targetcli_config FILENAME" to load a
configuration. The "targetcli saveconfig" command saves your current
configuration in "/etc/target/scsi_target.lio". I believe it wouldn't be
too hard to write a "save_targetcli_config FILENAME" script if you know
a little Python. This list could probably help you get the syntax right.

Note: there is currently a bug in the lio-utils package on SLE 12 which
causes this systemd service to sometimes start before configfs is
mounted. The following patch will fix this:

--- a/usr/lib/systemd/system/target.service
+++ b/usr/lib/systemd/system/target.service
@@ -1,6 +1,8 @@
 [Unit]
 Description="Generic Target Mode service"
 DefaultDependencies=No
+Requires=sys-kernel-config.mount
+After=sys-kernel-config.mount

 [Service]
 Type=oneshot

-- 
Lee Duncan
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux