📄 readme
字号:
iSCSI boot initialization module for Linux version 4.0.2.* The module iSCSI-init may be helpful if you intend to get your root filesystem oniSCSI LUN. There is nothing tricky, you just need to build the Initial RAM Disk right.You'll have to load your network interface card driver as a module from INITRD, iSCSIinitiator module iscsi_sfnet (see http://linux-iscsi.sourceforge.net/), and then justload iscsi_init module which is doing all dirty work of initializing the networkinterface, configuring need environment and controlling iSCSI module to start iSCSIboot session. DHCP/BOOTP code for iSCSI-init is mostly derived from ipconfig.c kernelmodule. There are four kernel arguments supported by iscsi_init module: - iscsi-if=<if_name1>[:<ip_addr1>:<netmask1>:<gateway>][,<if_name2>[:<ip_addr2>:<netmask2>]] initializes specified network interface like eth0, eth1, etc. This is not mandatory parameter and you can omit it. In this case the first available interface will be chosen. As an optional parameters you can specify an IP address, netmask, and default gateway for the interface. In this case the module will skip dynamic interface initialization via DHCP and assign an IP address to the interface statically. Multiple interfaces can be listed in this parameter via comma. Please keep in mind that interfaces will be configured in the same order as they listed in this option. - iscsi-initiator=<initiator_name> this is not mandatory parameter. The initiator name should be specified here. This parameter can be obtained via DHCP "option root-path" as well. Just keep in mind that kernel arguments take precedence over parameters retrieved via DHCP. - iscsi-target=[if_name1:]<target_ip1>:<target_name1>[,[if_name2:]<target_ip2>:<target_name2>] or iscsi-target=[if_name1:]<target_ip1>[,[if_name2:]<target_ip2>]:<target_name> this is not mandatory parameter. You can omit it here and specify in "option root-path" of your DHCP server configuration. This kernel argument also takes precedence over parameter retrieved via DHCP. You can specify here multiple targets or multiple IP's for targets. Use comma as separator. Prefixed if_name's will induce routing table setup for target IP's which don't belong to subnets on these interfaces. It may be useful for multipath configurations. - iscsi-timeout=<seconds> In most cases you don't have to specify this option. Default value 5 sec. is quite reasonable timeout for most environments. Use this option to increase timeout in very congested network environments.The format of DHCP "option root-path" is next:--option root-path "[if_name1:]<target_ip1>[,[if_name2:]<target_ip2>]:/<target_name>[/<initiator_name>]";--For example:--option root-path "192.168.1.2:/iqn.1992-08.com.netapp:sn.16804546/iqn.1987-05.com.cisco:01.26ffb046ec";--or without initiator name:--option root-path "192.168.1.2:/iqn.1992-08.com.netapp:sn.16804546";--or with multiple targets listed via comma:--option root-path "192.168.1.2:/iqn.1992-08.com.netapp:sn.16804546,192.168.2.2:/iqn.1992-08.com.netapp:sn.16804874";--or with multiple portal groups and binding to interfaces eth0 and eth1:--option root-path "eth0:192.168.1.2,eth1:192.168.2.2:/iqn.1992-08.com.netapp:sn.16804546:/iqn.1992-08.com.netapp:sn.16804874";--Please keep in mind that multiple targets can be also obtained via multiple interfaces for DHCP "root-path".Your bootloader configuration could be like this:--title Fedora Core (2.6.10-1.741) root (hd0,0) kernel /vmlinuz-2.6.10-1.741 ro root=/dev/sda1 iscsi-if=eth0 iscsi-initiator=iqn.1987-05.com.cisco:01.26ffb046ec iscsi-target=192.168.1.2:iqn.1992-08.com.netapp:sn.16804546 initrd /initrd-2.6.10-1.741-iscsi.img--or if you want to assign an IP statically:--title Fedora Core (2.6.10-1.741) root (hd0,0) kernel /vmlinuz-2.6.10-1.741 ro root=/dev/sda1 iscsi-if=eth0:192.168.1.10:255.255.255.0:192.168.1.1 iscsi-initiator=iqn.1987-05.com.cisco:01.26ffb046ec iscsi-target=192.168.1.2:iqn.1992-08.com.netapp:sn.16804546 initrd /initrd-2.6.10-1.741-iscsi.img--or for multiple static interfaces:--title Fedora Core (2.6.10-1.741) root (hd0,0) kernel /vmlinuz-2.6.10-1.741 ro root=/dev/sda1 iscsi-if=eth0:192.168.1.10:255.255.255.0:192.168.1.1,eth1:192.168.2.10:255.255.255.0 iscsi-initiator=iqn.1987-05.com.cisco:01.26ffb046ec iscsi-target=192.168.1.2:iqn.1992-08.com.netapp:sn.16804546 initrd /initrd-2.6.10-1.741-iscsi.img--or if you prefer to get everything via DHCP:--title Fedora Core (2.6.10-1.741) root (hd0,0) kernel /vmlinuz-2.6.10-1.741 ro root=/dev/sda1 iscsi-if=eth0 initrd /initrd-2.6.10-1.741-iscsi.img--or via DHCP with multiple interfaces:--title Fedora Core (2.6.10-1.741) root (hd0,0) kernel /vmlinuz-2.6.10-1.741 ro root=/dev/sda1 iscsi-if=eth0,eth1 initrd /initrd-2.6.10-1.741-iscsi.img-- You can run iscsid daemon later on after booting. However, you must use differentinitiator name for your iscsid sessions. The module has the same facilities as CONFIG_IP_PNP kernel option, i.e. it will assignnodename, domainname, and support /proc/net/pnp for your name services configurationaccording to the parameters obtained via DHCP. The sample of dhcpd.conf for isc-dhcpd v3you will find in this package. A modified Initial Ram Disk for Fedora Core could be likebelow:--bin *insmod @hotplug -> /sbin/nash @modprobe -> /sbin/nash *nash *udev @udevstart -> udevdev -console -null +ram -sstty -tty1 -tty2 -tty3 -tty4etc udev udev.conf iscsi.conflib crc32c.ko e1000.ko ext3.ko iscsi_init.ko iscsi_sfnet.ko jbd.ko libcrc32c.ko md5.ko scsi_mod.ko scsi_transport_iscsi.ko sd_mod.koloopfsproc~sbin -> binsyssysroot*init--For SuSE Linux it could be like below:--bin *ash *cat *mount *umountdev -console -fb0 +md0 -null @ram -> ram0 +ram0 +ram1 +ram2 @ramdisk -> ram0 +sda1 -tty1 -tty2 -zeroetc fstab iscsi.conflib ld-2.3.3.so @ld-linux.so.2 -> ld-2.3.3.so libc-2.3.3.so @libc.so.6 -> libc-2.3.3.so modules 2.6.6-1.427 kernel crypto md5.ko crc32c.ko libcrc32c.ko drivers net tg3.ko scsi megaraid.ko scsi_mod.ko sd_mod.ko fs jbd jbd.ko reiserfs reiserfs.ko misc iscsi_init.ko iscsi_sfnet.ko scsi_transport_iscsi.komntprocsbin *insmod*linuxrc--Please note that linix-iscsi-4.* requires crypt and crc32c kernel modules. Youneed to copy libcrc32c.ko, md5.ko, and crc32c.ko to your Initial RAM Disk andload them from linuxrc.The sample of init script for Fedora Core you will also find in this package. Optionally, you can use iscsi.conf configuration file placed in the InitialRAM Disk. The /etc/iscsi.conf file is similar to /etc/iscsi.conf used by iscsiddaemon from linux-iscsi package. See iscsi.conf.SAMPLE for details. Please keepin mind that ImmediateData is turned on by default in iscsi-init. If your targetdoes not support this option, you will have to turn it off in /etc/iscsi.confof Initrd. Installation This module has been tested in Fedora Core-3 with linux-iscsi initiatorversion 4.0.1.11. I believe it should work everywhere with kernel 2.6.10. If itdoes not, please email me. The version number 4.0.1 means it supports linux-iscsiinitiator module version 4.0.1 and higher. Third digit is reserved for localiscsi-init vesrion numbers. If there are significant changes in linux-iscsiinitiator module which require changes in iscsi-init module, first two digitsof the version number will be derived again from the version number oflinux-iscsi and so on. Licensing This module is distributed in the hope that it will be useful, but WITHOUTANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESSFOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.---------------------------------------------------Igor Feoktistov <ifeoktistov@users.sourceforge.net>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -