Centos 5.6 ISCSi config issues

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Centos 5.6 ISCSi config issues

marcos_fire
I've been using MHVTL for sometime now and playing with it is awesome.... thnx to Mark for this lovely tool  and Nia for the GUI   !

Now I thoguht of venturing into the ISCSI aspect of it and tried following (religiously) the steps updated by Crippa Andrea

http://mhvtl-linux-virtual-tape-library-community-forums.966029.n3.nabble.com/Centos-5-6-Mhvtl-Scst-WebGUI-GUIDE-STEP-BY-STEP-td3149346.html

But, I get stuck at the point where I need to create the RPMs at the below step:
- make menuconfig
  - Load config file .config
  - General Setup
    - Local version - append to kernel
      - .scst
    - Automatically append version information to the version string
    - enable deprecated sysfs features to support old userspace tools
    - Exit and Save config file
- make rpm ( <-- This Step)
- rpm -i /usr/src/redhat/SRPMS/kernel-2.6.33.7.scst-1.src.rpm
- rpm -i /usr/src/redhat/RPMS/i386/kernel-2.6.33.7.scst-1.i386.rpm

Output:
----------------------------------------------------------------
[root@cntosmhvtl2 linux-2.6.18]# make rpm
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf -s arch/x86_64/Kconfig
/bin/sh /usr/src/kernels/linux-2.6.18/scripts/package/mkspec > /usr/src/kernels/linux-2.6.18/kernel.spec
make clean
set -e; cd ..; ln -sf /usr/src/kernels/linux-2.6.18 kernel-2.6.18.scst
set -e; cd ..; tar -cz --exclude SCCS --exclude BitKeeper --exclude .svn --exclude CVS --exclude .pc --exclude .hg --exclude .git -f kernel-2.6.18.scst.tar.gz kernel-2.6.18.scst/.
set -e; cd ..; rm kernel-2.6.18.scst
set -e; \
        /bin/sh /usr/src/kernels/linux-2.6.18/scripts/mkversion > /usr/src/kernels/linux-2.6.18/.tmp_version
set -e; \
        mv -f /usr/src/kernels/linux-2.6.18/.tmp_version /usr/src/kernels/linux-2.6.18/.version
rpm --target x86_64 -ta ../kernel-2.6.18.scst.tar.gz
--target: unknown option
make[1]: *** [rpm] Error 1
make: *** [rpm] Error 2
----------------------------------------------------------------

it's showing 'unknown option' for both --target and -ta parts..... how do I get this resolved.

-Marcos
- Marcos

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Small steps make way to that Giant Leap...So step up !!
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
nia
Reply | Threaded
Open this post in threaded view
|

Re: Centos 5.6 ISCSi config issues

nia
Administrator
I strongly recommend using "tgt" instead of scst as it is much simpler to implement and does not require a kernel patch/recompile .. In fact, you hardly need to do much to get it working immediately .. Check the iscsi section of the GUI for more details ...tgt will do the job very nicely and had been tested with mhvtl quite a bit already.


-nia



Reply | Threaded
Open this post in threaded view
|

Re: Centos 5.6 ISCSi config issues

marcos_fire
I'll try this..... also... I'm VERY new to this stuff  ... Do u hav any docs or link which I can follow to create targets and host them over to other hosts, so that I can use the libraries over network ?
- Marcos

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Small steps make way to that Giant Leap...So step up !!
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
nia
Reply | Threaded
Open this post in threaded view
|

Re: Centos 5.6 ISCSi config issues

nia
Administrator
This doc is taken from tgt documnetation off the git repository:

This documents an example to set up tgt targets utilising existing SCSI
targets on the host utilizing tgt passthrough module and /dev/sg paths.

The hardware to be 'exported' via the SCSI target framework is an
IBM 3573-TL library with a single LTO4 drive.

Physical tape library connected and configured to host:
# lsscsi -g
[0:0:0:0]    disk    MAXTOR   ATLAS10K4_36SCA  DFM0  /dev/sda  /dev/sg0
[0:0:6:0]    process PE/PV    1x3 SCSI BP      1.1   -         /dev/sg1
[2:0:1:0]    tape    IBM      ULT3580-TD4      8192  /dev/st1  /dev/sg4
[2:0:1:1]    mediumx IBM      3573-TL          6.50  -         /dev/sg5

Please refer to the README.iscsi or README.iser for instructions
specific to setting up the transport layer specific section.

Many of the examples below are using the iSCSI lld (low Level) transport.


Starting the daemon
-------------
Please refer to 'Starting the daemon' in the README.iscsi or README.iser.
on instructions for correctly starting the daemon for your transport of choice.


Configuration
-------------
Everyting is configured via the tgtadm management tool.

Please refer to "Configuration" in README.iscsi or README.iser on how
to configure your target for the transport of choice.

Return to here for further instructions on setting up each logical unit using the
passthrough module.

An example to setup the target (target ID 1) for iSCSI
host:~/tgt# ./usr/tgtadm --lld iscsi --op new --mode target --tid 1 \
	-T iqn.2001-04.com.example:storage.vtl.amiens.sys1.xyz

To display your target configuration:
host:~/tgt# ./usr/tgtadm --lld iscsi --op show --mode target
Target 1: iqn.2001-04.com.example:storage.vtl.amiens.sys1.xyz
    System information:
        Driver: iscsi
        Status: running
    I_T nexus information:
    LUN information:
        LUN: 0
            Type: controller
            SCSI ID: deadbeaf1:0
            SCSI SN: beaf10
            Size: 0
            Backing store: No backing store
    Account information:
    ACL information:

The controller device for management with lun 0 was created
automatically. You can't remove it.

Now it's time to add a logical unit to the target:
 (The tape drive connected via /dev/sg4 - refer to 'lsscsi' output above)
The important flags are:
 - Specify device type as passthruough
                      "--device-type=pt"
 - Backing store type is the '/dev/sg' paths
                      "--bstype=sg"
 - Backing store path to use
                     "-b /dev/sg4"

host:~/tgt# ./usr/tgtadm --lld iscsi --op new --mode logicalunit \
	--tid 1 --lun 1 --bstype=sg --device-type=pt -b /dev/sg4

To display the current configuration:

host:~/tgt# ./usr/tgtadm --lld iscsi --op show --mode target
Target 1: iqn.2001-04.com.example:storage.vtl.amiens.sys1.xyz
    System information:
        Driver: iscsi
        Status: running
    I_T nexus information:
    LUN information:
        LUN: 0
            Type: controller
            SCSI ID: deadbeaf1:0
            SCSI SN: beaf10
            Size: 0
            Backing store: No backing store
        LUN: 1
            Type: (null)
            SCSI ID: IET     00010002
            SCSI SN: beaf12
            Size: 0 MB
            Online: Yes
            Removable media: No
            Backing store type: sg
            Backing store path: /dev/sg4
            Backing store flags:
    Account information:
    ACL information:

To add another logical unit to this target:
host:~/tgt# ./usr/tgtadm --lld iscsi --op new --mode logicalunit \
		--tid 1 --lun 2 --bstype=sg --device-type=pt -b /dev/sg5


If you don't need to configure this target any more, enable the target
to accept any initiators:

host:~/tgt# ./usr/tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL

Note "ACL information" section. "ALL" means that this target accepts
any initiators. The ACL feature also provides the access control based
on initiators' addresses.

For further instructions on ACL and account setup, please refer to the README.iscsi

As above, use the '--op show' option to display your current setup.
host:~/tgt# ./usr/tgtadm --lld iscsi --op show --mode target
Target 1: iqn.2001-04.com.example:storage.vtl.amiens.sys1.xyz
    System information:
        Driver: iscsi
        Status: running
    I_T nexus information:
    LUN information:
        LUN: 0
            Type: controller
            SCSI ID: deadbeaf1:0
            SCSI SN: beaf10
            Size: 0
            Backing store: No backing store
        LUN: 1
            Type: (null)
            SCSI ID: IET     00010002
            SCSI SN: beaf12
            Size: 0 MB
            Online: Yes
            Removable media: No
            Backing store type: sg
            Backing store path: /dev/sg4
            Backing store flags:
        LUN: 2
            Type: (null)
            SCSI ID: IET     00010002
            SCSI SN: beaf12
            Size: 0 MB
            Online: Yes
            Removable media: No
            Backing store type: sg
            Backing store path: /dev/sg5
            Backing store flags:
    Account information:
    ACL information:
        ALL



iSCSI Initiator Information
-------------
After the target accepts initiators, the system information would be
something like the following:

Linux open-iscsi initiator
hostb:~ # iscsiadm -m discovery -t sendtargets -p 10.251.60.20
10.251.60.20:3260,1 iqn.2001-04.com.example:storage.vtl.amiens.sys1.xyz

hostb:~ # iscsiadm -m node -T iqn.2001-04.com.example:storage.vtl.amiens.sys1.xyz \
		 -p 10.251.60.20 --login
Logging in to [iface: default, target: iqn.2001-04.com.example:storage.vtl.amiens.sys1.xyz, portal: 10.251.60.20,3260]
Login to [iface: default, target: iqn.2001-04.com.example:storage.vtl.amiens.sys1.xyz, portal: 10.251.60.20,3260]: successful

hostb:~ # lsscsi -g
[0:0:0:0]    cd/dvd  TSSTcorp DVD-ROM TS-L333A D100  /dev/sr0  /dev/sg0
[2:0:0:0]    disk    SEAGATE  ST3400755SS      NS25  /dev/sda  /dev/sg1
[2:0:1:0]    disk    SEAGATE  ST3400755SS      NS25  /dev/sdb  /dev/sg2
[3:0:0:0]    disk    DGC      DISK             0429  /dev/sdc  /dev/sg3
[3:0:1:0]    disk    DGC      DISK             0429  /dev/sdd  /dev/sg4
[11:0:0:0]   storage IET      Controller       0001  -         /dev/sg5
[11:0:0:1]   tape    IBM      ULT3580-TD4      8192  /dev/st0  /dev/sg6
[11:0:0:2]   mediumx IBM      3573-TL          6.50  -         /dev/sg7


Shutdown the target cleanly
---------------------------
host:~/tgt# tgtadm --op unbind --mode target --tid 1 -I ALL
host:~/tgt# tgtadm --op delete --mode conn --tid 1
host:~/tgt# tgtadm --op delete --mode target --tid 1
host:~/tgt# tgtadm --op delete --mode system


Also this .. it is old but should still be the same .. You many need to use the latest release.

http://mhvtl-linux-virtual-tape-library-community-forums.966029.n3.nabble.com/Testing-MHVTL-with-stgt-release-tgt-1-0-9-tp1685681.html


tgt websites:

http://stgt.sourceforge.net/

https://github.com/fujita/tgt


-nia
Reply | Threaded
Open this post in threaded view
|

Re: Centos 5.6 ISCSi config issues

marcos_fire
Hi Nia,


I have now configured disk drives and Tape libraries (5 Disks + 3 Tape Libraries) across my test NetWorker Estate and I'm going bonkers testing lot of stuff..... thanks 2 you, all the libraries / disks are being hosted from my Centos VM which acts kind of a ISCSI target for all !!!

It's a whole new World to me...   !!
- Marcos

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Small steps make way to that Giant Leap...So step up !!
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=