Chapter 6. Addressing volume size discrepancies with Dell EqualLogic back ends

When Dell EqualLogic (EQL) back ends report volume sizes, they also assess the additional storage that they require for internal volume metadata. This total size is slightly larger than the volume size that the Block Storage services report. However, the volume size that EQL back ends report is the same size that the Image service uses.

As a result, when you create an image-backed volume on an EQL back end, first check the size of the image. If the image was originally volume-backed, then EQL and the Image service report a volume size slightly larger than the Block Storage service reports.

If the image size reported by EQL is slightly larger, then you must accommodate the size discrepancy when you create volumes backed by this image.

6.1. Example Dell EqualLogic volume size discrepancy

To illustrate, when you create a 1GB volume:

# cinder create --display-name vol1 1

+---------------------+--------------------------------------+
|       Property      |                Value                 |
+---------------------+--------------------------------------+
|     attachments     |                  []                  |
|  availability_zone  |                 nova                 |
|       bootable      |                false                 |
|      created_at     |      2014-12-19T03:57:47.730359      |
| display_description |                 None                 |
|     display_name    |                 vol1                 |
|      encrypted      |                False                 |
|          id         | 6bdace69-bd41-42fc-a63a-f834fb65a2e4 |
|       metadata      |                  {}                  |
|         size        |                  1                   |
|     snapshot_id     |                 None                 |
|     source_volid    |                 None                 |
|        status       |               creating               |
|     volume_type     |                 None                 |
+---------------------+--------------------------------------+

The Block Storage service reports a volume size of 1GB, but on the EQL array the size (VolReserve) is slightly bigger:

eql> volume select volume-6bdace69-bd41-42fc-a63a-f834fb65a2e4

eql (volume-6bdace69-bd41-42fc-a63a-f834fb65a2e4)> show

_______________________________ Volume Information ______...
Name: volume-6bdace69-bd41-42fc-a63a-f834fb65a2e4
Size: 1GB
VolReserve: 1.01GB
...

When you create a new image from this volume, the Block Storage service reports the correct volume size of 1GB:

# cinder upload-to-image --disk-format raw --container-format bare vol1 image_vol1

+---------------------+--------------------------------------+
|       Property      |                Value                 |
+---------------------+--------------------------------------+
|   container_format  |                 bare                 |
|     disk_format     |                 raw                  |
| display_description |                 None                 |
|          id         | 6bdace69-bd41-42fc-a63a-f834fb65a2e4 |
|       image_id      | c65f7eae-e2c1-44ba-8af1-e33695897559 |
|      image_name     |              image_vol1              |
|         size        |                  1                   |
|        status       |              uploading               |
|      updated_at     |      2014-12-19T03:57:48.000000      |
|     volume_type     |                 None                 |
+---------------------+--------------------------------------+

However, the Image service reports a slightly larger size:

# glance image-list

...+------------+-------------+------------------+------------+--------+
...| Name       | Disk Format | Container Format | Size       | Status |
...+------------+-------------+------------------+------------+--------+
...| image_vol1 | raw         | bare             | 1085276160 | active |
...+------------+-------------+------------------+------------+--------+

The glance tool reports an image size of approximately 1.01GB. As a result, you cannot create a new 1GB volume backed by this image:

# cinder create --display-name vol2 --image-id c65f7eae-e2c1-44ba-8af1-e33695897559 1

ERROR: Invalid input received: Size of specified image 2 is larger than volume size 1

6.2. Workaround for Dell EqualLogic volume size discrepancy

You must consider the discrepancy between the volume sizes reported by the Image and the Block Storage services when you specify the size of image-backed volumes. This means that when you specify the size of the image-backed volume, you must use the next whole number after the image size reported by the Image service (glance).

In Section 6.1, “Example Dell EqualLogic volume size discrepancy”, the Image service reports an image size of 1.01GB. This means that when you create a volume, you must specify a volume size of 2GB instead of 1GB:

# cinder create --display-name vol2 --image-id c65f7eae-e2c1-44ba-8af1-e33695897559 2

+---------------------+--------------------------------------+
|       Property      |                Value                 |
+---------------------+--------------------------------------+
|     attachments     |                  []                  |
|  availability_zone  |                 nova                 |
|       bootable      |                false                 |
|      created_at     |      2014-12-19T04:54:07.036260      |
| display_description |                 None                 |
|     display_name    |                 vol2                 |
|      encrypted      |                False                 |
|          id         | fcf49715-094d-4bba-9f05-8b7fa6deffce |
|       image_id      | c65f7eae-e2c1-44ba-8af1-e33695897559 |
|       metadata      |                  {}                  |
|         size        |                  2                   |
|     snapshot_id     |                 None                 |
|     source_volid    |                 None                 |
|        status       |               creating               |
|     volume_type     |                 None                 |
+---------------------+--------------------------------------+