Hi Natalia, When a volume is attached to a disk it has some more additional attributes like:
virtualmachineid = 52a21f95-4209-45a4-ad7b-c117f16d451a vmdisplayname = VM-52a21f95-4209-45a4-ad7b-c117f16d451a vmname = VM-52a21f95-4209-45a4-ad7b-c117f16d451a vmstate = Running zoneid = ba5aa0d4-9518-4663-abb5-9f0ac183d577 using cloudmonkey you can easily call the listVolumes API and monitor this, for example: On management install cloudmonkey (pip install —upgrade cloudmonkey) $> cloudmonkey $> list volume id=[ID] ==> returns a JSON with the volume attributes You can also choose a different response format if you want to filter the data. $> set display csv default json table xml When you expunge a VM the attached disk will remain, this way it cloud be attached to different VM of the same hypervisor type, but it will be missing the mentioned attributes. So If you’re looking to delete volumes that are not attached to VMs you can look for volumes without these attributes. Thanks, Boris. > On Feb 3, 2017, at 12:02 PM, Natalia Costas Lago <[email protected]> wrote: > > > HI, > > > I have seen that when a VM that has attached an additional disk is expunged > the volume that has attached remains in the storage. > > Most of the times I end up with many volumes that we are unsure if they > should be deleted or not. The information about the VM that has been > connected to the data volume is lost. > > How do you handle cleaning up of those data volumes? > > Thanx, > Regards, > -- > ==================================================== > Natalia Costas Lago > Senior Communications Technician > Galicia Supercomputing Centre (CESGA) > (CESGA on Twitter <https://twitter.com/#%21/CESGA_> | CESGA on Facebook > <https://www.facebook.com/profile.php?id=100000707537407>) > > Avenida de Vigo, s/n (Campus Vida) > 15705 Santiago de Compostela - SPAIN > > E-mail: [email protected] > Cell: +34 981 56 98 10 (ext. 237) > Fax: +34 981 59 46 16 > Web: https://www.cesga.es/ > ==================================================== > [IMPORTANTE] La información contenida en este mensaje y > sus posibles documentos adjuntos es privada y confidencial > y está dirigida únicamente a su destinatario/a. Si usted no > es el/la destinatario/a original de este mensaje, por favor > elimínelo. La distribución o copia de este mensaje no está > autorizada. [email protected] www.shapeblue.com 53 Chandos Place, Covent Garden, London WC2N 4HSUK @shapeblue
