mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 10:41:26 +00:00
Merge r7491 from trunk
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@7739 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -41,49 +41,7 @@ b) Specific branch (3.0 used in example)
|
||||
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)
|
||||
|
||||
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
|
||||
|
||||
|
||||
3. Build the kernel
|
||||
|
||||
make menuconfig
|
||||
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)'
|
||||
Exit
|
||||
make
|
||||
make modules_install
|
||||
|
||||
|
||||
4. Install the new kernel and reboot the system
|
||||
|
||||
mount /boot
|
||||
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
|
||||
|
||||
|
||||
5. Build SCST
|
||||
2. Build SCST
|
||||
|
||||
! Important: SCST 3.1.x and trunk: Gentoo Hardened kernels uses
|
||||
Grsec/PaX patchset. If you happen to use one of those kernels
|
||||
@@ -99,7 +57,7 @@ work perfectly)
|
||||
make scstadm scstadm_install
|
||||
|
||||
|
||||
6. Make a clean config and start SCST
|
||||
3. Make a clean config and start SCST
|
||||
|
||||
echo "HANDLER vdisk_fileio {" >> /etc/scst.conf
|
||||
echo "}" >> /etc/scst.conf
|
||||
@@ -110,7 +68,7 @@ work perfectly)
|
||||
/etc/init.d/scst start
|
||||
|
||||
|
||||
7. Configure SCST
|
||||
4. Configure SCST
|
||||
|
||||
In this example disk01 is a virtual disk that is stored in the file
|
||||
/vdisks/vdisk1 and is mounted read_only, disk02 is the same as disk01
|
||||
@@ -135,12 +93,12 @@ to all ip's
|
||||
scstadmin -write_config /etc/scst.conf
|
||||
|
||||
|
||||
8. Run SCST automatically at startup
|
||||
5. Run SCST automatically at startup
|
||||
|
||||
rc-update add scst default
|
||||
|
||||
|
||||
9. Using SCST accesscontrol (optional)
|
||||
6. 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 restrict access and
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
Recompiling a RHEL 5 / CentOS 5 kernel
|
||||
--------------------------------------
|
||||
|
||||
- Look up the version of the installed kernel, e.g. through the
|
||||
following command:
|
||||
uname -r
|
||||
|
||||
- Choose a RHEL / CentOS mirror
|
||||
|
||||
- Download the source RPM matching the installed kernel version, e.g.
|
||||
kernel-2.6.18-92.1.22.el5.src.rpm
|
||||
|
||||
- Now generate a kernel source tree from this source RPM by running
|
||||
the following commands as root:
|
||||
|
||||
useradd mockbuild
|
||||
rpm -i kernel-2.6.18-92.1.22.el5.src.rpm
|
||||
|
||||
The above commands will create a kernel spec file
|
||||
/usr/src/redhat/SPECS/kernel-2.6.spec and will create the files for
|
||||
building the kernel source tree in /usr/src/redhat/SOURCES/.
|
||||
|
||||
- The kernel source tree can now be built by running the commands
|
||||
below. These commands will not only create a kernel source tree but will
|
||||
also install a kernel .config file:
|
||||
|
||||
yum install unifdef
|
||||
rm -rf /usr/src/redhat/BUILD
|
||||
mkdir -p /usr/src/redhat/BUILD
|
||||
chown mockbuild /usr/src/redhat/BUILD
|
||||
sudo -u mockbuild rpmbuild -bp /usr/src/redhat/SPECS/kernel-2.6.spec
|
||||
|
||||
- Next, apply the SCST patches to this kernel source tree:
|
||||
|
||||
cd "/usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.$(uname -m)"
|
||||
patch -p1 <${SCST_SOURCE_DIR}/scst/kernel/rhel/scst_exec_req_fifo-rhel5.patch
|
||||
patch -p1 <${SCST_SOURCE_DIR}/iscsi-scst/kernel/patches/rhel/put_page_callback-rhel5.patch
|
||||
|
||||
- Modify EXTRAVERSION in Makefile from "-prep" into "-scst". The text
|
||||
assigned to the EXTRAVERSION variable will be appended to the kernel
|
||||
version 2.6.18 and will appear a.o. in the GRUB boot menu. Choosing a
|
||||
name that refers to the SCST project will help to recognize the
|
||||
customized kernel.
|
||||
|
||||
- If you are familiar with kernel configuration, you can decrease
|
||||
kernel compilation time significantly by minimizing the kernel
|
||||
configuration as follows:
|
||||
|
||||
yum install qt-devel
|
||||
lsmod
|
||||
make xconfig &
|
||||
|
||||
- Now compile and install the kernel:
|
||||
|
||||
make && make modules
|
||||
mkdir -p /lib/modules/2.6.18-scst && make modules_install && make install
|
||||
|
||||
- Edit the bootloader menu such that the newly compiled kernel is
|
||||
loaded by default:
|
||||
|
||||
vi /boot/grub/menu.lst
|
||||
|
||||
- Boot into the new kernel:
|
||||
|
||||
reboot
|
||||
Reference in New Issue
Block a user