- Notes/Warnings
- This works with Intel I350 Gbit NICs, as on a Supermicro X9DRT motherboard, which uses the igb (1Gbit) or ixgbe (10Gbit) module as the NIC device driver, and the iscsi_ibft module for iscsi boot. You'll have to change the module names if using Broadcom or other chips.
- Once booted, you're in a Busybox environment... some commands will be limited or may not work the way in which you are accustomed on a full Linux system.
- As a best practice, use all lower-case named target and initiator names (some firmwares may silently convert case).
- WARNING: If you do not have your LUNs properly masked, do not specify the installation target correctly, and so forth, you may destroy your data. Know what you are doing, and use at your own risk.
- Connect up the Intel NICs
- Configure the iscsi target to allow access from this initiator (hint: this is done on your SAN), and mask out other LUNs to be NOT visible to this initiator
- Boot off the CD and enter the busybox command environment
- Manually configure the ip address and enable the interfaces, and verify connectivity
- ifconfig eth0 inet 10.10.10.15 netmask 255.255.255.0 up
- route add default gw 10.10.10.1
- ping 10.10.10.1; ping www.google.com
- At this point you can enable ssh to access this from a different computer over the network, if you need to:
- ssh-keygen -f /etc/ssh_host_rsa_key -t rsa (use an empty passphrase)
- ssh-keygen -f /etc/ssh_host_dsa_key -t dsa (use an empty passphrase)
- /usr/sbin/sshd
- echo "root:supersecret" | chpasswd
- (now, copy the hashed password for root from /etc/passwd to /etc/shadow
- Prepare iscsi:
- mkdir /etc/iscsi
- echo "InitiatorName=iqn.2014-01.local:hostname" > /etc/iscsi/initiatorname.iscsi (replace the initiator name and/or hostname as appropriate)
- echo "node.startup = automatic" > /etc/iscsi/iscsid.conf
- echo "node.session.initial_logon_retry_max = 60" >> /etc/iscsi/iscsid.conf
- modprobe iscsi_ibft
- modprobe scsi_transport_iscsi
- modprobe iscsi_tcp
- iscsid -c /etc/iscsi/iscsid.conf -i /etc/iscsi/initiatorname.iscsi -f &
- detect iscsi targets (where 10.10.10.20 is the IP address of the iSCSI SAN target) (only do this if you are not going to use the ibft boot stuff from an OS installer)
- iscsiadm -m discovery -t sendtargets -p 10.10.10.20
- iscsiadm -m node -l
- set up multipath (if you have multiple paths)
- modprobe dm-multipath
- multipath -l -r
- multipath -l -r (verify that the paths exist and are recognized...)
- At this point, you can use the multipath device to access your iSCSI LUNs as needed.
- If you want to run an OS installer, at this point start the installer
- (in CentOS or XenServer installation media, append --use_ibft)
- (use --mpath if you have set up multipath)
- (use --network_device=eth0 , or the correct iSCSI network device, if needed)
2014/10/06
iSCSI stuff in Busybox on Linux
Labels:
CentOS,
Citrix XenServer,
grub,
HowTo,
iSCSI,
networking,
tips,
Xen
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment