RHEL5 boot from iSCSI

Posted on

We're struggeling a bit with getting RHEL5 to work with boot from iSCSI. One of the challenges is that we need to define a static route to the iSCSI target. Installing RHEL5 from DVD works fine, since it's then using the default route for accessing the storage, and the machine works fine afterwards. Until we do a yum upgrade and a new initrd is created.

In the initrd created during install from DVD I find this in the initrd:

   initrd/init:network --device eth0 --bootproto static --ip 192.168.138.199 --netmask 255.255.255.192 --gateway 192.168.138.193 --domain "lysetele.net"

after we've completed the network configuration with the following routes:

# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
213.167.97.128  0.0.0.0         255.255.255.192 U     0      0        0 vlan278
192.168.138.0   192.168.138.193 255.255.255.192 UG    0      0        0 eth0
192.168.138.192 0.0.0.0         255.255.255.192 U     0      0        0 eth0
169.254.95.0    0.0.0.0         255.255.255.0   U     0      0        0 usb0
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 vlan278
0.0.0.0         213.167.97.129  0.0.0.0         UG    0      0        0 vlan278

and do a "yum update", a new initrd is created with:

init:network --device eth0 --bootproto static --ip 192.168.138.199 --netmask 255.255.255.192 --gateway 213.167.97.129 --domain "lysetele.net"

and when booting the node afterwards it fails to boot with the message "iscsistart: cannot make a connection to 192.168.138.5:3260 (-1,100)" repeating again and again. This is because the gateway here is wrong. Anybody know how to tell mkinitrd (or similar) to use a given static route ?

Another problem we're experiencing is that there are lots of errormessages about not being able to write to /var/lock/subsys/iptables, /var/lock/subsys/syslog, etc.. during boot. All filesystems created during install hs the option _netdev (and _rnetdev for /). I think this means the filesystem woun't be mounted before late in the boot process. Are we really supposed to have this option on all filesystems ?

 

Responses