Cinder NFS backend with image-volume cache creates volumes with wrong size
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
New
|
Low
|
Pete Zaitcev |
Bug Description
Cinder version (commit SHA): 83089b92467d8de
backend configuration in cinder.conf:
[vm]
image_volume_
image_volume_
image_volume_
nas_secure_
nas_secure_
nfs_mount_options = rsize=65535,
nfs_qcow2_volumes = True
nfs_shares_config = /etc/cinder/
nfs_snapshot_
report_
volume_backend_name = vm
volume_driver = cinder.
Debian 11 image: https:/
Image in Glance:
+------
| Field | Value |
+------
| checksum | 06e481ddd23682a
| container_format | bare |
| disk_format | qcow2 |
| id | 7673db9f-
| name | debian11 |
| size | 254672896 |
| virtual_size | 2147483648 |
+------
Creating volume without image-volume cache, like this:
root@oscp99:~# openstack volume create --image debian11 --size 11 test
+------
| Field | Value |
+------
| attachments | [] |
| availability_zone | office |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2022-09-
| description | None |
| encrypted | False |
| id | 4eb3d4e8-
| migration_status | None |
| multiattach | False |
| name | test |
| properties | |
| replication_status | None |
| size | 11 |
| snapshot_id | None |
| source_volid | None |
| status | creating |
| type | vm |
| updated_at | None |
| user_id | b14242e3bdef45e
+------
Produces the log `cinder-
+------
| Field | Value |
+------
| attachments | [] |
| availability_zone | office |
| bootable | true |
| consistencygroup_id | None |
| created_at | 2022-09-
| description | None |
| encrypted | False |
| id | 4eb3d4e8-
| migration_status | None |
| multiattach | False |
| name | test |
| os-vol-
| os-vol-
| os-vol-
| os-vol-
| properties | |
| replication_status | None |
| size | 11 |
| snapshot_id | None |
| source_volid | None |
| status | available |
| type | vm |
| updated_at | 2022-09-
| user_id | b14242e3bdef45e
| volume_
+------
But the size on the NFS share is wrong:
qemu-img info /vm/cinder/
image: /vm/cinder/
file format: qcow2
virtual size: 2 GiB (2147483648 bytes)
disk size: 700 MiB
cluster_size: 65536
Format specific information:
compat: 1.1
lazy refcounts: false
refcount bits: 16
corrupt: false
Image-volume cache volume:
+------
| Field | Value |
+------
| attachments | [] |
| availability_zone | office |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2022-09-
| description | None |
| encrypted | False |
| id | 4a85b808-
| migration_status | None |
| multiattach | False |
| name | image-7673db9f-
| os-vol-
| os-vol-
| os-vol-
| os-vol-
| properties | readonly='True' |
| replication_status | None |
| size | 2 |
| snapshot_id | None |
| source_volid | 4eb3d4e8-
| status | available |
| type | vm |
| updated_at | 2022-09-
| user_id | b14242e3bdef45e
+------
Creating volume for the second time (with image-volume cache populated):
openstack volume create --image debian11 --size 11 tttt
produces `cinder-
qemu-img create -f qcow2 -o backing_
and after that, volume never gets resized to the requested size.
Created volume has expected size in DB:
+------
| ID | Name | Status | Size | Attached to |
+------
| 21be2d3a-
+------
But not on the NFS share:
root@oscn99:~# qemu-img info /vm/cinder/
image: /vm/cinder/
file format: qcow2
virtual size: 2 GiB (2147483648 bytes)
disk size: 700 MiB
cluster_size: 65536
Format specific information:
compat: 1.1
lazy refcounts: false
refcount bits: 16
corrupt: false
Supposed fix: https:/
Related bug: https:/
When using LVM backend, logical volume is created with expected size.
Changed in cinder: | |
importance: | Undecided → Low |
tags: | added: cache drivers generic-nfs glance image nfs |
Changed in cinder: | |
assignee: | nobody → Pete Zaitcev (zaitcev) |