HOWTO update from Willem Boterenbrood <w.boterenbrood@gmail.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6651 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2015-11-10 03:58:45 +00:00
parent 72ca9f8055
commit 3325903ee7

View File

@@ -1,5 +1,5 @@
==============================================
SCST 2.x Installation on Gentoo Linux
SCST 3.x Installation on Gentoo Linux
==============================================
This howto will get you a working SCST installation on Gentoo Linux, it
@@ -15,12 +15,11 @@ Prerequisites:
- User with root privileges
- Read the official iSCSI-SCST howto for more options and information
Assumptions for this howto:
Assumptions for the examples used in this howto:
- User logged on as root
- Gentoo Sources version 2.6.39-r3 installed
- Manual build kernel without initramfs
- Gentoo AMD64 version
- Grub bootloader
- Grub 1 bootloader (use of GRUB2 should be an easy change)
- /boot on a separate partition
- One iSCSI target with 2 LUNS, both LUNS virtual disk files
- One iSCSI target with one LUN, LUN is a real device
@@ -29,17 +28,32 @@ When the above options differ from your environment/setup you will need
to change some of the commands provided in this howto for things to
work.
1. Download SCST.
1. Download the latest SCST version.
Choose to download a specific branch or the latest development version
a) Latest development version
cd /root
svn co https://scst.svn.sourceforge.net/svnroot/scst/trunk scst
svn checkout svn://svn.code.sf.net/p/scst/svn/trunk scst
b) Specific branch (3.0 used in example)
cd /root
svn checkout svn://svn.code.sf.net/p/scst/svn/branches/3.0.x scst
2. Patch the kernel (Optional but required for the best speed)
cd /usr/src/linux-2.6.39-gentoo-r3
patch -p1 < /root/scst/iscsi-scst/kernel/patches/put_page_callback-2.6.39.patch
If the SCST version downloaded above does not have the patches for the correct kernel
you can try the newest patches available, note the errors (if any) during the patch
and fix those manually by looking at the sourcefile.rej files generated by the patch
that list the failed changes. Use vi or nano to find and change the correct places for
the patch changes. (I had to change 2 lines in one source file and add 2 in another
when patching a 4.1.12 kernel with 3.18 patch files, so the majority of changes did
work perfectly)
cd /usr/src/linux
patch -p1 < /root/scst/iscsi-scst/kernel/patches/put_page_callback-3.18.patch
patch -p1 < /root/scst/scst/kernel/scst_exec_req_fifo-3.18.patch
make clean
@@ -49,6 +63,9 @@ work.
Select Networking support -> Networking options -> TCP/IP networking
Select Networking support -> Networking options -> TCP/IP zero-copy transfer completion notification
Select Device Drivers -> SCSI device support -> SCSI disk support
Select Device Drivers -> InfiniBand support
Select Device Drivers -> InfiniBand support -> InfiniBand SCSI RDMA Protocol
Select Device Drivers -> InfiniBand support -> iSCSI Extension for RDMA (iSER)
Select Enable the block layer -> IO Schedulers -> CFQ I/O Scheduler
Set Enable the Block layer -> IO Schedulers -> Default I/O Scheduler to 'CFQ'
Set Processor type and features -> Preemption Model to 'No Forced Preemption (Server)'
@@ -60,8 +77,8 @@ work.
4. Install the new kernel and reboot the system
mount /boot
cp arch/x86_64/boot/bzImage /boot/kernel-2.6.39-gentoo-r3-SCST
nano -w /boot/grub/grub.conf (add a new boot entry with the newly compiled kernel)
cp arch/x86_64/boot/bzImage /boot/kernel-4.1.12-gentoo-SCST
nano -w /boot/grub/grub.conf (GRUB1: add a new boot entry with the newly compiled kernel)
umount /boot
shutdown -r now
@@ -113,23 +130,13 @@ to all ip's
8. Run SCST automatically at startup
For SCST 2.1 SVN version r3805 and newer do:
rc-update add scst default
For SCST 2.0 and for a SVN version before r3805 and Gentoo with the old baselayout without OpenRC do:
rc-update add scst default
For SCST 2.0 and for a SVN version before r3805 and you have the new Gentoo baselayout do:
echo "/etc/init.d/scst start" >> /etc/local.d/scst.start
echo "/etc/init.d/scst stop" >> /etc/local.d/scst.stop
chmod 775 /etc/local.d/scst.*
(the SCST init script doesn't work with openRC and changing it would be a lot of work so local.d is used as an easy workaround)
9. Using SCST access control (optional)
9. Using SCST accesscontrol (optional)
SCST listens on all the targets IP addresses and allows access to any
initiators per default. There are a couple of ways to restict access and
initiators per default. There are a couple of ways to restrict access and
here I will give some examples. For the full documentation see the
README file in the scst/iscsi-scst/ directory
@@ -137,7 +144,7 @@ To make a target accessible on only one IP address do:
scstadmin -set_tgt_attr iqn.2011-08.nl.feka:storage.vdisk1 -driver iscsi -attributes allowed_portal=192.168.100.15
(Remember the IP address is the address of the target machine, not of
the allowed initiator, you can add multiple entries on the same target
by repeating the above command, you can also use the wildcards * and ?
by repeating the above command, you can also use the wild cards * and ?
where the ? stands for any single digit)
To make targets only accessible by specific inititators add a group to
@@ -162,7 +169,7 @@ Notes
==============================================
SCST's vdisk_fileio handler will use a default blocksize of 512b, this
is the only safe option for vmware ESXi or older windows versions, for
is the only safe option for VMware ESXi or older windows versions, for
best performance with newer windows versions a blocksize of 4096 will be
much faster.