cinder boot from lvm snapshot volume

asked 2015-01-14 04:11:11 -0500

likid0 gravatar image


I'm running IceHouse, and what I would like to do if possible is:

1.snapshot a cinder boot volume(lvm-iscsi backend). 2.boot the instance from the proper snapshot(not from a clone of the snapshot).

So right now, what I was able to do is:

  1. Create the snapshot of a boot volume:

    cinder snapshot-list +--------------------------------------+--------------------------------------+-----------+----------------+------+ | ID | Volume ID | Status | Display Name | Size | +--------------------------------------+--------------------------------------+-----------+----------------+------+ | 6071c186-2e6a-43cb-984e-51f3fca12ae8 | 46886de4-ce5f-4200-ac03-04132940cacf | available | fedora-os-snap | 8 | +--------------------------------------+--------------------------------------+-----------+----------------+------+

And then boot from a clone volume of the snapshot using:

nova boot --flavor m1.tindydisk --block-device-mapping vda=6071c186-2e6a-43cb-984e-51f3fca12ae8:snap::0 --key-name fomvs-key --nic net-id=a835bb18-d3fb-44d5-afd5-0c75887e4b21 --security-groups default fedora-test3

But what I need/would like, is to be able to boot from snapshot lvol directly:

[root@controller ~(keystone_fomvs)]# lvs LV VG Attr LSize Pool Origin Data% Move Log Cpy%Sync Convert _snapshot-6071c186-2e6a-43cb-984e-51f3fca12ae8 cinder-volumes swi-a-s--- 8.00g volume-46886de4-ce5f-4200-ac03-04132940cacf 0.00

let's say we have a classroom with 50 students, and we need to fire 50 instances, and we have very little space left in the cinder volumes(50 gigs). What I would do before(using lvm/virsh) is create 50 1gig lvol snapshots from a master, and then boot 50 Vms each from the 1 gig lvm snapshot.

Is it posible to do something like this with cinder/nova?, first create snapshots with different size from the original volume, and then tell nova to boot from those snapshots?.


edit retag flag offensive close merge delete