Network LVM-storage

From ISPWiki
Jump to: navigation, search
Hierarchy: VMmanager KVM -> Cluster configuration
VMmanager Cloud -> Cluster configuration

A network LVM-storage is similar to a common lvm except for the following details. However the physical volume where a group of volumes is located, is a network device (for example, a disk connected through the iSCSI protocol)


When creating a virtual machine, on the same cluster node a virtual disk is created, and it will be accessible on all the cluster node. It will be active only on one node.

When migrating a virtual machine, the virtual disk will not copy, but will activate on the target node. On the source node, the disk will be disabled.

Example of configuration using open-iscsi

Network storage configuration

  • Install iSCSI:
# yum install scsi-target-utils
  • Configure lvm:
# pvcreate /dev/sda2
  Physical volume "/dev/sda2" successfully created
# vgcreate vg0 /dev/sda2
  Volume group "vg0" successfully created
  • Configure the tgtd file:
# cat /etc/tgt/targets.conf
  backing-store /dev/sda2
  initiator-address #IP address of cluster node

# service tgtd restart
Stopping SCSI target daemon:                               [  OK  ] 
Starting SCSI target daemon:                               [  OK  ]
  • Add iptables rules if needed:
iptables -I INPUT 1 -p tcp --dport 3260 -j ACCEPT
service iptables save

Connecting to cluster nodes

  • Connect the disk on each cluster node
iscsiadm -m discovery -t st -p 
iscsiadm -m node --login -p

Once completed you can add a "network LVM" storage named vg0 into VMmanager.