[sheepdog] deleting vdi image not deleting snapshots

Alexandre DERUMIER aderumier at odiso.com
Tue Oct 16 08:43:43 CEST 2012


>>Currently, we need to specify '-s' option to delete snapshots. I 
>>think deleting snapshots by default is not good since users may want 
>>to keep them for creating other cloned images. 

Is the snapshot usable without the main image ? 
does the snapshot not handle only the delta of new writes ?)

(I tell the question because it's work like that with other storage like ceph,zfs,... 
destroying the main image, breaks all the snapshots)



----- Mail original ----- 

De: "MORITA Kazutaka" <morita.kazutaka at lab.ntt.co.jp> 
À: "Alexandre DERUMIER" <aderumier at odiso.com> 
Cc: sheepdog at lists.wpkg.org 
Envoyé: Mardi 16 Octobre 2012 06:43:49 
Objet: Re: [sheepdog] deleting vdi image not deleting snapshots 

At Mon, 15 Oct 2012 10:43:03 +0200 (CEST), 
Alexandre DERUMIER wrote: 
> 
> Hi, 
> I just see that delete an vdi image not deleting snapshots of the image. 
> is it normal ? 
> 
> #collie vdi create image1 100MB 
> #collie vdi snapshot image1 -s snap1 
> 
> # collie vdi list 
> Name Id Size Used Shared Creation time VDI id Copies Tag 
> s image1 1 100 MB 0.0 MB 0.0 MB 2012-10-15 10:38 737a91 2 snap1 
> image1 2 100 MB 0.0 MB 0.0 MB 2012-10-15 10:38 737a95 2 
> 
> 
> # collie vdi delete image1 
> # collie vdi list 
> 
> Name Id Size Used Shared Creation time VDI id Copies Tag 
> s image1 1 100 MB 0.0 MB 0.0 MB 2012-10-15 10:38 737a91 2 snap1 

Currently, we need to specify '-s' option to delete snapshots. I 
think deleting snapshots by default is not good since users may want 
to keep them for creating other cloned images. 

> 
> Also, with clone, we can delete the parent image or snapshot, I think we need to add some protections, 
> to avoid that 
> 
> # collie vdi create image1 100MB 
> # collie vdi snapshot image1 -s snap1 
> # collie vdi clone image1 -s snap1 image2 
> 
> 
> # collie vdi list 
> Name Id Size Used Shared Creation time VDI id Copies Tag 
> c image2 1 100 MB 0.0 MB 0.0 MB 2012-10-15 10:41 737578 2 
> s image1 1 100 MB 0.0 MB 0.0 MB 2012-10-15 10:40 737a91 2 snap1 
> image1 2 100 MB 0.0 MB 0.0 MB 2012-10-15 10:40 737a96 2 
> 
> 
> # collie vdi delete image1 
> # collie vdi list 
> Name Id Size Used Shared Creation time VDI id Copies Tag 
> c image2 1 100 MB 0.0 MB 0.0 MB 2012-10-15 10:41 737578 2 
> s image1 1 100 MB 0.0 MB 0.0 MB 2012-10-15 10:40 737a91 2 snap1 
> 
> # collie vdi delete image1 
> # collie vdi list 
> Name Id Size Used Shared Creation time VDI id Copies Tag 
> c image2 1 100 MB 0.0 MB 0.0 MB 2012-10-15 10:41 737578 2 

It looks like a bug in vdi deletion code. The snapshot should be 
deleted with 
$ collie vdi delete image1 -s snap1 

Thanks, 

Kazutaka 



More information about the sheepdog mailing list