I started making some notes on how EBS volume creation can be tracked and troubleshot in Eucalyptus (Eucalyptus 3.X + btw). I figured this would make a good blog post, so I’ve just dumped all the information into here and I’ll let Google do the rest
I’ll update it as I go along and provide more hints in the troubleshooting section, this will also make it into the Eucalyptus Knowledge Base, albeit in different form and smaller chunks. I hope this is useful to some.
Creating & Managing Elastic Block Storage (EBS) Volumes
The Volume Creation Process
# euca-create-volume -z eucalyptus -s 5
# ls -lsrth /var/lib/eucalyptus/volumes/
total 1.1M
1.1M -rw-r–r– 1 root root 5.1G Jan 23 08:57 vol-391D44BE
# losetup -a
/dev/loop0: [fd00]:394108 (//var/lib/eucalyptus/volumes/vol-391D44BE)
# pvdisplay
— Physical volume —
PV Name /dev/loop0
VG Name vg-1lS3pg..
PV Size 5.00 GB / not usable 4.00 MB
Allocatable yes (but full)
PE Size (KByte) 4096
Free PE 0
Allocated PE 1280
PV UUID u8vTQh-pEhU-9ID2-ewEO-kOIh-iwQx-Kb7BrZ
# vgdisplay
— Volume group —
VG Name vg-1lS3pg..
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 5.00 GB
PE Size 4.00 MB
Total PE 1280
Alloc PE / Size 1280 / 5.00 GB
Free PE / Size 0 / 0
VG UUID eMYWz3-DkhN-IM9I-8T6j-cbnI-vAJe-H9OJgh
Total PE 1280
# lvdisplay
— Logical volume —
LV Name /dev/vg-1lS3pg../lv-28NzTQ..
VG Name vg-1lS3pg..
LV UUID Goyv51-3WRJ-GOiq-yrjU-osw8-efqF-UGQt60
LV Write Access read/write
LV Status available
# open 1
LV Size 5.00 GB
Current LE 1280
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:3
# tgt-admin -s
Target 4: iqn.2009-06.com.eucalyptus.eucalyptus:store4
System information:
Driver: iscsi
State: ready
I_T nexus information:
LUN information:
LUN: 0
Type: controller
SCSI ID: IET 00040000
SCSI SN: beaf40
Size: 0 MB, Block size: 1
Online: Yes
Removable media: No
Readonly: No
Backing store type: null
Backing store path: None
Backing store flags:
LUN: 1
Type: disk
SCSI ID: IET 00040001
SCSI SN: beaf41
Size: 5369 MB, Block size: 512
Online: Yes
Removable media: No
Readonly: No
Backing store type: rdwr
Backing store path: /dev/vg-1lS3pg../lv-28NzTQ..
Backing store flags:
Account information:
eucalyptus
ACL information:
ALL
Attaching Volumes to Instances
# euca-describe-volumes
# euca-attach-volume -i i-133F3E53 -d /dev/sdb1 vol-391D44BE
# iscsiadm -m discovery -t sendtargets -p 172.22.0.13
172.22.0.13:3260,1 iqn.2009-06.com.eucalyptus.eucalyptus:store4
Jan 23 11:03:31 Pod-04 kernel: scsi3 : iSCSI Initiator over TCP/IP
Jan 23 11:03:32 Pod-04 kernel: Vendor: IET Model: Controller Rev: 0001
Jan 23 11:03:32 Pod-04 kernel: Type: RAID ANSI SCSI revision: 05
Jan 23 11:03:32 Pod-04 kernel: scsi 3:0:0:0: Attached scsi generic sg5 type 12
Jan 23 11:03:32 Pod-04 kernel: Vendor: IET Model: VIRTUAL-DISK Rev: 0001
Jan 23 11:03:32 Pod-04 kernel: Type: Direct-Access ANSI SCSI revision: 05
Jan 23 11:03:32 Pod-04 kernel: SCSI device sdd: 10485760 512-byte hdwr sectors (5369 MB)
Jan 23 11:03:32 Pod-04 kernel: sdd: Write Protect is off
Jan 23 11:03:32 Pod-04 kernel: SCSI device sdd: drive cache: write back
Jan 23 11:03:32 Pod-04 kernel: SCSI device sdd: 10485760 512-byte hdwr sectors (5369 MB)
Jan 23 11:03:32 Pod-04 kernel: sdd: Write Protect is off
Jan 23 11:03:32 Pod-04 kernel: SCSI device sdd: drive cache: write back
Jan 23 11:03:32 Pod-04 kernel: sdd: unknown partition table
Jan 23 11:03:32 Pod-04 kernel: sd 3:0:0:1: Attached scsi disk sdd
Jan 23 11:03:32 Pod-04 kernel: sd 3:0:0:1: Attached scsi generic sg6 type 0
Jan 23 11:03:33 Pod-04 kernel: peth0: received packet with own address as source address
Jan 23 11:03:33 Pod-04 kernel: peth0: received packet with own address as source address
Jan 23 11:03:33 Pod-04 iscsid: Connection2:0 to [target: iqn.2009-06.com.eucalyptus.eucalyptus:store4, portal: 172.22.0.13,3260] through [iface: default] is operational now
Disk /dev/sdd: 5368 MB, 5368709120 bytes
166 heads, 62 sectors/track, 1018 cylinders
Units = cylinders of 10292 * 512 = 5269504 bytes
Disk /dev/sdd doesn’t contain a valid partition table
[root@Pod-04 i-133F3E53]# pwd
/var/lib/eucalyptus/instances/work/CEK7XDHLEBSVR1SATAZMT/i-133F3E53
[root@Pod-04 i-133F3E53]# ll vol*
-rw-rw—- 1 eucalyptus eucalyptus 535 Jan 23 11:03 vol-391D44BE.xml
<?xml version=”1.0″ encoding=”UTF-8″?>
<volume>
<hypervisor type=”xen” capability=”xen+hw” bitness=”64″/>
<id>vol-391D44BE</id>
<user>CEK7XDHLEBSVR1SATAZMT</user>
<instancePath>/var/lib/eucalyptus/instances/work/CEK7XDHLEBSVR1SATAZMT/i-133F3E53</instancePath>
<os platform=”linux” virtioRoot=”false” virtioDisk=”false” virtioNetwork=”false”/>
<backing>
<root type=”image”/>
</backing>
<diskPath targetDeviceType=”disk” targetDeviceName=”sdb2″ targetDeviceBus=”scsi” sourceType=”block”>/dev/sdd</diskPath>
</volume>
virsh attach-device <domain> <file>
virsh dumpxml <domain_id>
<disk type=’block’ device=’disk’>
<driver name=’phy’/>
<source dev=’/dev/sdd’/>
<target dev=’sdb2′ bus=’scsi’/>
</disk>
Disk /dev/sdb2: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0×00000000
Disk /dev/sdb2 doesn’t contain a valid partition table
# mkfs.ext3 /dev/sdb2
# mkdir /media/data
# mount /dev/sdb2 /media/data
Detaching Volumes
euca-detach-volume -i i133F3E53 vol-391D44BE
virsh detach-device <domain> <file>
Snapshotting Volumes
euca-create-snapshot <volume_id>
[root@Pod-03 lester]# euca-describe-snapshots
SNAPSHOT snap-C2DF3CF2 vol-D02E43C2 pending 2012-01-30T15:44:04.853Z 0% None
[root@Pod-03 lester]# ll /var/lib/eucalyptus/volumes/
total 17015932
-rw-r–r– 1 root root 8589934592 Jan 30 07:32 snap-26EE3E3A
-rw-r–r– 1 root root 3224145920 Jan 30 07:44 snap-C2DF3CF2
-rw-r–r– 1 root root 5368709120 Jan 30 06:49 snap-D7E53AC0
-rw-r–r– 1 root root 10741612544 Jan 20 09:56 vol-178C3E9C
-rw-r–r– 1 root root 5372903424 Jan 23 08:57 vol-391D44BE
-rw-r–r– 1 root root 16110321664 Jan 30 07:43 vol-D02E43C2
-rw-r–r– 1 root root 8053063680 Jan 30 07:44 vol-D02E43C2MsmGAIzx
[root@Pod-03 volumes]# losetup -a
/dev/loop0: [fd00]:393652 (//var/lib/eucalyptus/volumes/vol-178C3E9C)
/dev/loop1: [fd00]:394108 (//var/lib/eucalyptus/volumes/vol-391D44BE)
/dev/loop2: [fd00]:393631 (//var/lib/eucalyptus/volumes/vol-D02E43C2)
/dev/loop3: [fd00]:394121 (//var/lib/eucalyptus/volumes/vol-D02E43C2MsmGAIzx)
[root@Pod-03 volumes]# vgdisplay
— Volume group —
VG Name vg-WsNskQ..
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 5
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 2
Act PV 2
VG Size 22.50 GB
PE Size 4.00 MB
Total PE 5759
Alloc PE / Size 5759 / 22.50 GB
Free PE / Size 0 / 0
VG UUID Dh0Xs7-Pvlr-vUbm-d1mA-7pCf-I94z-dS3r0l
[root@Pod-03 volumes]# lvdisplay
— Logical volume —
LV Name /dev/vg-WsNskQ../lv-OWzOIQ..
VG Name vg-WsNskQ..
LV UUID JFyFII-F1K8-QGYD-0s77-1dZf-ALQm-33AOr9
LV Write Access read/write
LV snapshot status source of
/dev/vg-WsNskQ../lv-snap-CfzmRA.. [active]
LV Status available
# open 1
LV Size 15.00 GB
Current LE 3840
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:4— Logical volume —
LV Name /dev/vg-WsNskQ../lv-snap-CfzmRA..
VG Name vg-WsNskQ..
LV UUID 0S4AAC-g4ip-0Zjs-0dQV-Yfym-tTNA-tPV1rA
LV Write Access read/write
LV snapshot status active destination for /dev/vg-WsNskQ../lv-OWzOIQ..
LV Status available
# open 1
LV Size 15.00 GB
Current LE 3840
COW-table size 7.50 GB
COW-table LE 1919
Allocated to snapshot 0.00%
Snapshot chunk size 4.00 KB
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:5
dd if /dev/vg-WsNskQ../lv-snap-CfzmRA.. of //var/lib/eucalyptus/volumes/snap-C2DF3CF2 bs 1M
[root@Pod-03 ~]# ll /var/lib/eucalyptus/volumes/
total 29607236
-rw-r–r– 1 root root 8589934592 Jan 30 07:32 snap-26EE3E3A
-rw-r–r– 1 root root 16106127360 Jan 30 07:48 snap-C2DF3CF2
-rw-r–r– 1 root root 5368709120 Jan 30 06:49 snap-D7E53AC0
-rw-r–r– 1 root root 10741612544 Jan 20 09:56 vol-178C3E9C
-rw-r–r– 1 root root 5372903424 Jan 23 08:57 vol-391D44BE
-rw-r–r– 1 root root 16110321664 Jan 30 07:43 vol-D02E43C2
| <euca:StoreSnapshotType xmlns:euca=”http://msgs.eucalyptus.com”>
| <euca:WalrusDataRequestType>
| <euca:WalrusRequestType>
| <euca:correlationId>9105e2c8-b228-4dfa-b622-e384a232852f</euca:correlationId>
| <euca:_return>true</euca:_return>
| <euca:_services/>
| <euca:_disabledServices/>
| <euca:_notreadyServices/>
| <euca:accessKeyID>KGPY0PMLTKX4XUORAC8IK</euca:accessKeyID>
| <euca:timeStamp>2012-01-30T15:48:34.688Z</euca:timeStamp>
| <euca:bucket>snapset-ccc92f77-ab62-4554-9151-973e45fcc974</euca:bucket>
| <euca:key>snap-C2DF3CF2</euca:key>
| </euca:WalrusRequestType>
| <euca:randomKey>snapset-ccc92f77-ab62-4554-9151-973e45fcc974.snap-C2DF3CF2.JAoH7pTIt7gbzQ..</euca:randomKey>
| </euca:WalrusDataRequestType>
| <euca:snapshotSize>16106127360</euca:snapshotSize>
| </euca:StoreSnapshotType>
INFO WalrusManager.putObject(WalrusManager.java):1020 | Transfer complete: snapset-ccc92f77-ab62-4554-9151-973e45fcc974.snap-C2DF3CF2
[root@Pod-03 eucalyptus]# ll /var/lib/eucalyptus/bukkits/
total 24
drwxr-xr-x 2 eucalyptus eucalyptus 4096 Jan 30 05:05 euca-centos
drwxr-xr-x 2 eucalyptus eucalyptus 4096 Jan 16 06:50 euca-ubuntu
drwxr-xr-x 2 eucalyptus eucalyptus 4096 Jan 30 08:35 snapset-80efb05e-f0d7-444d-946d-9cfdad3845ad
drwxr-xr-x 2 eucalyptus eucalyptus 4096 Jan 30 06:51 snapset-ad471308-c3f9-4908-a4f0-1e8790d8b99f
drwxr-xr-x 2 eucalyptus eucalyptus 4096 Jan 30 09:08 snapset-ccc92f77-ab62-4554-9151-973e45fcc974
drwxr-xr-x 2 eucalyptus eucalyptus 4096 Jan 30 07:35 snapset-f394c343-2580-4406-a29b-b5b62b2b9fd1
Correct me if I am wrong here but the volume specific xml is how eucalyptus 3 deals with it in previous version of eucalyptus the xml part was dynamically injected to the xml config of the instance?
great read
That’s absolutely right and thanks for highlighting this. I had actually compiled these notes against Eucalyptus 3. I’ll update my post to include some information about this.
Good stuff here man. I really like how you how the collaboration between Eucalyptus and other services, like tgtd, lvm, etc. Agree with Deependra on this one. Good read.
Good reading. We tried the same way too and got the same results. Once we know the limitation, we created our own to provision EBS like volume functionality. The openstack does in a quite simillar way when they deploy block device through iscsi. In Openstack they create a SAN adapted i.e. nexenta, HP storageworks to work with SAN based rather than software based target i.e. ietd, tgtd and others.
Hi, thanks for your feedback. Yes, in Eucalyptus we have the SAN adapter which is an alternative to the open source target software. This currently allows one to use NetApp and Dell Equallogic iSCSI devices directly via their native API, thus shifting the EBS operations from SC to the array itself.