Netapp: create_volume_from_snapshot of a different size
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Low
|
Navneet |
Bug Description
Hi,
Netapp driver currently does not support creating volume from snapshot of a different size:
if vol_size != snap_size:
msg = _('Cannot create volume of size %(vol_size)s from '
raise exception.Error(msg % locals())
Attached patch (for Folsom) allows you to create bigger volume from the original snapshot. Eg, 20G volume out of 10G snapshot:
# euca-describe-
SNAPSHOT snap-00000042 vol-0000045a available 2013-01-
# euca-create-volume -z na.dev-netapp --snapshot snap-00000042 -s 20
VOLUME vol-00000462 20 snap-00000042 na.dev-netapp creating 2013-01-
# euca-describe-
VOLUME vol-00000462 20 snap-00000042 na.dev-netapp available 2013-01-
> lun show
...
/vol/OpenStack
/vol/OpenStack
/vol/OpenStack
Creating volume of _smaller_ size than the original snapshot will produce an error.
# euca-create-volume -z na.dev-netapp --snapshot snap-00000042 -s 5
VOLUME vol-00000463 5 snap-00000042 na.dev-netapp creating 2013-01-
# euca-describe-
VOLUME vol-00000463 5 snap-00000042 na.dev-netapp error 2013-01-
2013-01-11 12:27:14 TRACE nova.rpc.amqp raise exception.Error(msg % locals())
2013-01-11 12:27:14 TRACE nova.rpc.amqp Error: Cannot create volume of size 5 from snapshot of size 10
2013-01-11 12:27:14 TRACE nova.rpc.amqp
Regards,
Brano Zarnovican
Changed in cinder: | |
assignee: | nobody → Rushi Agrawal (rushiagr) |
status: | New → In Progress |
tags: |
added: drivers removed: driver |
Changed in cinder: | |
assignee: | Rushi Agrawal (rushiagr) → Ben Swartzlander (bswartz) |
Changed in cinder: | |
assignee: | Ben Swartzlander (bswartz) → Navneet (singn) |
Changed in cinder: | |
assignee: | Navneet (singn) → Ben Swartzlander (bswartz) |
Changed in cinder: | |
assignee: | Ben Swartzlander (bswartz) → Navneet (singn) |
tags: | added: navneet-netapp-backport |
Changed in cinder: | |
milestone: | none → havana-rc1 |
status: | Fix Committed → Fix Released |
Changed in cinder: | |
milestone: | havana-rc1 → 2013.2 |
Changed in cinder: | |
importance: | Undecided → Low |
tags: | removed: grizzly-backport-potential |
We just discovered an issue with this feature implementation.
When the original snapshot was too small (eg. 6G) compared to the new volume size (100G), create_ volume_ from_snapshot( ) method fails with a stacktrace. It is due to LUN resize failing on target filer:
> lun resize /vol/OpenStack_ 103a49bb861e485 ea05aa78f9b0216 bd/vol- 00000521/ vol-00000521 100g
lun resize: New size exceeds this LUN's initial geometry
lun resize: max size: 65535m (68718428160)
Right at this moment I don't know how to implement the feature to work with arbitrary sizes, sorry..