Blog

Friday, May 10, 2013

Configuring iSCSI on CentOS 5.6

I recently had to load CentOS 5.6 on several HP BL2x220C blade servers to run Enomaly SpotCloud. One of the requirements was to provision disk for KVM virtual machine storage. This could be local disk or optionally iSCSI disk. The following describes the steps I went through to configure iSCSI successfully.

1. You will need to configure your storage system. I was using a HDS HNAS Mercury cluster. The configuration of the HNAS is probably beyond the scope of this post but in essence you need to create a File System of your required size. Then assign that File System to an EVS (Hitachi terminology for a virtual storage system) with an assigned cluster node and IP address on the storage VLAN. You then need to create iSCSI Logical Units within the File System. One LUN will be required for each host. Lastly create iSCSI targets within the EVS iSCSI domain with access configuration only permitted from the host that will use it along with the LUN ID and LUN name. You will end up with is a series of Globally Unique Names that are of a finite size (eg. 500GB)  that are only accessible from a single host: iqn.2011-04.spotcloud:sc-evs-iscsi01.sc-target01.

2. Back to the CentOS side of things - make sure your interfaces are configured correctly and you can ping the storage system. I have two Virtual Connect modules in the HP C7000 enclosure - hence two interface were available. Static IPs were used on the storage network. I edited:

/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/sysconfig/network-scripts/ifcfg-eth1
/etc/sysconfig/network

3. Make sure the iSCSI daemons are installed. You can do this via yum or from the original source media. Via yum:

yum install iscsi

Via virtual media:

mount /dev/cdrom /mnt
cd /mnt/CentOS
rpm -ivh iscsi*
cd /
umount /mnt

Don't forget to eject the virtual media.

4. Make sure iSCSI starts on boot and start the daemon:

chkconfig iscsi on
service iscsi start

5. Discover your iSCSI targets:

iscsiadm -m discovery -t sendtargets -p 10.255.4.10

The IP address is that of the storage system.

6. Delete any unnecessary iSCSI nodes:

service iscsi stop
iscsiadm -m node <nodename> -o delete
service iscsi start

The <nodename> is the UIN mentioned earlier. Sometimes you will always discover multiple nodes - so you need to configure the storage system to filter available LUNs by client source IP address.

7. Work out which device is the iSCSI node:

fdisk -l

8. Create a partition then format it:

fdisk /dev/sdb
mkfs.ext4 /dev/sdb1

9. Label the device:

e2label /dev/sdb1 /sc-node01

10. Configure the mount in /etc/fstab (note the _netdev mount option to ensure the iSCSI LUN is mounted after networking has been brought up):

LABEL=/sc-node01 /var/lib/xen/images ext3 defaults,_netdev,noatime 0 0

And that's it - you are in business. Lastly, if you are interested here is the Virtual Connect configuration used to configure the blades. This configures blade 1A and 1B interfaces 1 and 2. Interface 1 is assigned untagged VLAN of 1050 (eth0) and tagged VLAN 1051 (eth0.1051). Interface 2 is assigned untagged VLAN 1052 (eth1) - which is the storage network.

add profile D4-C2-B01 -NoDefaultEnetConn -NoDefaultFcConn -NoDefaultFcoeConn
add enet-connection D4-C2-B01
add enet-connection D4-C2-B01
add server-port-map D4-C2-B01:1 SC-Management VlanID=1050 Untagged=True
add server-port-map D4-C2-B01:1 SC-VM VlanID=1051
add server-port-map D4-C2-B01:2 SC-iSCSI VlanID=1052 Untagged=True
assign profile D4-C2-B01 enc0:1A

add profile D4-C2-B02 -NoDefaultEnetConn -NoDefaultFcConn -NoDefaultFcoeConn
add enet-connection D4-C2-B02
add enet-connection D4-C2-B02
add server-port-map D4-C2-B02:1 SC-Management VlanID=1050 Untagged=True
add server-port-map D4-C2-B02:1 SC-VM VlanID=1051
add server-port-map D4-C2-B02:2 SC-iSCSI VlanID=1052 Untagged=True
assign profile D4-C2-B02 enc0:1B
Thursday, May 31, 2012

Identifying HDS HNAS Mercury M100 Hardware Revision

The BlueArc / HDS HNAS Mercury M100 has had minimally two distinct hardware revisions. The initial revision of the hardware was sometimes unreliable. To determine which hardware revision you are running do the following:

  1. Determine the management IP addresses of the nodes in your Mercury cluster . To do this log into the SMU (eg. https://smu) as admin. Then go to Home -> Server Settings -> Cluster Configuration and record the IP addresses of the cluster nodes (eg. 192.0.2.200 and 192.0.2.201).
  2. Then ssh into the SMU (eg. ssh [email protected]). Hit q to get to the command prompt.
  3. At the command prompt of the SMU ssh to each cluster node individually (eg. ssh 192.0.2.200).
  4. Run the following command: ver -h | grep Tachyon
  5. The output of that command will determine which hardware revision you are running:
    1. Rev A hardware is identified as follows: Tachyon: QX4 1.2 (HPFC-6440C)
    2. Rev B hardware is identified as follows: Tachyon: QE4+ 1.1 (PM8036 (Rev B))
Tuesday, May 22, 2012

HDS HNAS Bluarc EVS Routing

You may have the need to set a default gateway on a BlueArc EVS (Enterprise Virtual Server). After you have configured the networking side of your EVS (via Home -> Server Settings -> EVS Management). Then go into Home -> Network Configuration -> Routing and add a gateway route for the subnet in question.

 

Saturday, May 19, 2012

Disabling CIFS Authentication on a HDS HNAS EVS In Standalone Security Mode

You might need to create a BlueArc EVS (Enterprise Virtual Server) with CIFS security disabled. You can't do this through the GUI. So at the SMU command line:

1. Work out the EVS ID:

evs list

2. Select the EVS:

evs-select <id>

3. Disable domain authentication for CIFS:

cifs-auth off

Recent Posts



Tags


Archive

    Sign up for Product Updates and Discounts
    Captcha Image
    ×