RHEV 3.0 GUI doesn’t show non-empty LUNs

RHEV  stores virtual machines on a specific type of storage domain, the so called “data domain”.

While creating a new iSCSI data domain you need to perform these steps:

  1. Set the host used as iscsi initiator, the IP address/port of the iSCSI target.
  2. Eventually add the credentials to perform a CHAP authentication.
  3. Discovery and login to a particular iqn.
  4. Expand the LUNs lists shown by the GUI and select the LUN/LUNs that you want to add to the data domain.

Note that the GUI will show you only the un-initializated LUNs discarding pre-formatted or too small LUNs. This is done intentionally but not explicity in order to avoid the risk of overwriting existing data.

If you want to force RHEV to use a LUN with existing data you can wipe out at least the first 512 bytes of the LUN to convince RHEV that the LUN is empty by executing this simple command:

# dd if=/dev/zero of=/dev/mapper/lun_name bs=1M count=10

The value of 10M is arbitrary but feel free to choose another value.

Now perform a new cycle discovery+login and the GUI will show you the LUNs!

And now a question for Red Hat developers: hey guys, why don’t you show a simple alert???

P.S. On #rhev we found that this behaviour will be modified with 3.1 release: administrator will see the unselectable LUNs also 😉

RHEV: extending a storage domain

Rhev – Red Hat Enterprise Virtualization 3.0 – stores data on special areas named Storage Domains (aka SD). An iscsi SD has lun attached – which is usually a Logical Volume (aka LV).

With current releases, you can’t grow a SD modifying the underlying LVs. This is probably due to the complex structure of the Storage Pool Manager which coordinates storage access from various hypervisors.

Let’s grow our “my_iscsi”. If we’re lucky we can do:
1- edit it in the rhev-manager interface;
2- add another LUN/Target to it.

In case the target lun exists but the rhev-manager can’t discover it, we may need to rediscover it trying to create a new storage domain. So:
a- try to create a new iscsi storage domain (don’t save it!);
b- discover for the missing target/lun so that rhev-manager is now aware of it;
c- close the create menu WITHOUT saving.

Now let’s re-select the “my_iscsi” and edit and we should see the new target! Once added to the SD click on “save” and we’re done.

Improve your iSCSI performance using jumbo frames

What are jumbo frames? Jumbo frames are ethernet frames with more than 1500 bytes of payload. Conventionally, jumbo frames can carry up to 9000 bytes of payload, but variations exist and some care must be taken when using the term.

Why use jumbo frames? Enabling them on your network equipment and on your NICs you will experiment a performance boost specially with iSCSI protocol that works over a standard ethernet network.

Implementation of Jumbo frames must be done with some rules:

  • Same MTU for all server present in the network
  • Network card must support a MTU over 1500
  • Switch must support a MTU over 1500
  • Switch must support a MTU over 1500 on a VLAN

How to enable jumbo frames on RHEL/CentOS? Enabling jumbo frames on linux is really simple: edit the NIC configuration and append MTU=9000.

Don’t forget to enable them also on your switch/router!

# vi /etc/sysconfig/network-script/ifcfg-<your_nic> # ex. eth0


Then restart the single interface…

ifdown eth0; ifup eth0

…or the entire network service

service network restart

After all verify that the new configuration has been correctly applied:

# ifconfig eth0

If the configuration is ok you will see a response like this:

eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx
inet addr:x.x.x.x  Bcast:x.x.x.x  Mask:x.x.x.x

If you’re using bonding, you need to enable jumbo frames only on bond device configuration:

# vi /etc/sysconfig/network-script/ifcfg-bond0


Do you know iSCSI?

Internet SCSI (iSCSI) is a network protocol that allows you to use of the SCSI protocol over TCP/IP networks. It’s good alternative to Fibre Channel-based SANs. You can easily manage, mount and format iSCSI volumes under Linux.

Definitions: the iSCSI Target is the server that hosts and exports volumes to the clients. The iSCSI Initiator is the client that use the configured volumes.

On the server you need to install this package, start the related service and ensure that it starts on boot:

# yum -y install scsi-target-utils

# service tgtd start

# chkconfig tgtd on

On the client side you need to install this package, start the related service and ensure that it starts on boot:

# yum -y install iscsi-initiator-utils

# service iscsid start

# chkconfig iscsid on

Now configure your LUNs on the target:

# vim /etc/tgt/targets.conf

This is a basic configuration for target:

<target iqn.yyyy-mm.reverse-hostname:label>

# use backing-store to export a specific volume…

backing-store /dev/vol_group_name/logical_volume_name

# …or use direct-store to export the entire device

# direct-store /dev/sdb


Don’t forget to restart the tgtd service after a configuration update:

# service tgtd restart

Now it’s time to check if your LUNs are being exported correctly. The next command will show two LUNs for each target. The first one (LUN 0) is the controller, the second one (LUN 1) is your volume. Run this command on the target:

# tgtadm –lld iscsi –op show –mode target

Remember to enable iSCSI ports on iptables in order to accept connection on port 3260 for both TCP and UDP protocols!

Ok, your target is now fully configured. You can logon on your client and start to use the remote storage. On the client run these commands to show the exported volumes and login to them:

iscsiadm -m discovery -t sendtargets -p target_ipaddress

iscsiadm -m node -T target_name_iqn -p target_ipaddress –login

Now restart the iscsid service, use fdisk to show the mounted device on /dev and create partitions on it.

If you need to detach from the target you have to logout from it:

iscsiadm -m node -T target_name_iqn -p target_ipaddress –logout