Example of enabling SECURITY PROTOCOL IN/OUT op code with scst

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Example of enabling SECURITY PROTOCOL IN/OUT op code with scst

Yasuhisa Ishikawa
This post was updated on .
Here is an example of enabling SECURITY PROTOCOL IN/OUT op code with scst.
I have tested KMS feature of NetBackup 7.1 on AIX 6.1 media server thru iSCSI.
(NBU's ovpass driver on AIX does not support iSCSI..., so robot is controlled by linux media server)

For quick deployment, I built VTL on Scientific Linux CERN 5.6.

1) Install Required Packages
# yum install gcc
# yum install kernel-devel
# yum install rpm-build

2) Build and install scst
# wget http://linuxsoft.cern.ch/cern/slc56/updates/x86_64/SRPMS/scst-1.0.1.1-3.cern.src.rpm
# mkdir -p /usr/src/redhat
# rpm -i scst-1.0.1.1-3.cern.src.rpm
# cd /usr/src/redhat/SOURCES
# tar xzf scst-1.0.1.1.tar.gz
# mv scst-1.0.1.1.tar.gz scst-1.0.1.1.tar.gz.org
# cp scst-1.0.1.1/src/scst_cdbprobe.h scst-1.0.1.1/src/scst_cdbprobe.h.org
# vi scst-1.0.1.1/src/scst_cdbprobe.h
# diff  scst-1.0.1.1/src/scst_cdbprobe.h.org scst-1.0.1.1
/src/scst_cdbprobe.h
417,418c417,418
<       {0xA2, "                ", "",
<        SCST_DATA_NONE, FLAG_NONE, 0, get_trans_len_none},
---
>      {0xA2, "OO   O          ", "SECURITY PROTOCOL IN",
>       SCST_DATA_READ, FLAG_NONE, 6, get_trans_len_4},
474a475,476
>      {0xB5, "OO   O          ", "SECURITY PROTOCOL OUT",
>       SCST_DATA_WRITE, FLAG_NONE, 6, get_trans_len_4},
# tar czf scst-1.0.1.1.tar.gz scst-1.0.1.1
# cd /usr/src/redhat/SPECS
# rpmbuild -ba scst.spec
# cd /usr/src/redhat/RPMS/x86_64
# ls
kernel-module-scst-2.6.18-238.12.1.el5-1.0.1.1-3.cern.x86_64.rpm
scst-kernel-headers-1.0.1.1-3.cern.x86_64.rpm
# rpm -i kernel-module-scst-2.6.18-238.12.1.el5-1.0.1.1-3.cern.x86_64.rpm
# yum install kernel-module-iscsi-scst-`uname -r`
# yum install scstadmin
# yum install iscsi-scst-target-utils
# cd
# cp -p /etc/init.d/scst /tmp/scst.org
# vi /etc/init.d/scst
# diff /tmp/scst.org /etc/init.d/scst
24c24
< SCST_MODULES="scst scst_disk scst_vdisk"
---
> SCST_MODULES="scst scst_disk scst_vdisk scst_changer scst_tape"
#

3) Install mhvtl
# tar xzf mhvtl-2011-06-25.tgz
# cd mhvtl-0.18/kernel
# make
# make install
# rpm -i mhvtl-0.18-17.x86_64.rpm
# cp -p /etc/init.d/mhvtl /tmp/mhvtl.org
# vi /etc/init.d/mhvtl
# diff /tmp/mhvtl.org /etc/init.d/mhvtl
31c31
< # chkconfig: - 30 30
---
> # chkconfig: - 40 88
# chkconfig --del mhvtl
# chkconfig --add mhvtl
# service mhvtl start


4) Example configuration for default settings
# cat /etc/scst.conf
[HANDLER vdisk]

[HANDLER vcdrom]

[HANDLER changer]
DEVICE 0:0:0:0
DEVICE 0:0:8:0

[HANDLER tape]
DEVICE 0:0:1:0
DEVICE 0:0:2:0
DEVICE 0:0:3:0
DEVICE 0:0:4:0
DEVICE 0:0:9:0
DEVICE 0:0:10:0
DEVICE 0:0:11:0
DEVICE 0:0:12:0

[GROUP Default_iqn.2011-06.myvtl:l700]

[ASSIGNMENT Default_iqn.2011-06.myvtl:l700]
DEVICE 0:0:0:0,0
DEVICE 0:0:1:0,1
DEVICE 0:0:2:0,2
DEVICE 0:0:3:0,3
DEVICE 0:0:4:0,4

[GROUP Default_iqn.2011-06.myvtl:python]

[ASSIGNMENT Default_iqn.2011-06.myvtl:python]
DEVICE 0:0:8:0,0
DEVICE 0:0:9:0,1
DEVICE 0:0:10:0,2
DEVICE 0:0:11:0,3
DEVICE 0:0:12:0,4

# cat /etc/iscsi-scstd.conf
Target iqn.2011-06.myvtl:l700
Target iqn.2011-06.myvtl:python

# cat /etc/initiators.deny
ALL ALL

# cat /etc/initiators.allow
iqn.2011-06.myvtl:l700 myserver1, myserver2
iqn.2011-06.myvtl:python myserver2

5) Start scst & iscsi-scst
# service scst start
# service iscsi-scst start
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Example of enabling SECURITY PROTOCOL IN/OUT op code with scst

Mark Harvey
Very nice write up.

Cheers
Mark
nia
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Example of enabling SECURITY PROTOCOL IN/OUT op code with scst

nia
Administrator
In reply to this post by Yasuhisa Ishikawa
Mark Harvey wrote
Very nice write up.

Cheers
Mark
Yes indeed .. This was much easier than the kernel patching and recompiling that I had to do for scst.
Loading...