[Openstack] ephemeral disks location

Eugen Block eblock at nde.ag
Wed Jan 25 08:19:00 UTC 2017


Hi

> where are the ephemeral disks stored?

if you decide to use local storage, your instance's disk would be stored in

---cut here---
compute1:~ # ls -l /var/lib/nova/instances/
insgesamt 60
drwxr-xr-x 2 nova nova 4096  3. Jan 11:05 14b75237-7619-481f-9636-792b64d1be17
drwxr-xr-x 2 nova nova 4096  9. Jan 14:58 284007bf-cd6b-42ee-9529-274d259e6812
drwxr-xr-x 2 nova nova 4096  9. Jan 16:13 2c408a5b-8f35-4e12-911a-36005ccff067
drwxr-xr-x 2 nova nova 4096 15. Jan 20:49 3d96bceb-4c9b-4e3c-9275-5d0bf119d47a
drwxr-xr-x 2 nova nova 4096  4. Jan 09:30 3ec7f722-12ef-4962-8059-38accf6f9a63
drwxr-xr-x 2 nova nova 4096  9. Jan 10:55 5b02c021-0b94-4d10-afc0-e0f66b492899
drwxr-xr-x 2 nova nova 4096 16. Dez 07:45 69d3e9da-2842-418c-8d62-5d2fbe805df1
drwxr-xr-x 2 nova nova 4096 19. Dez 10:13 6c30a7a8-6115-416a-820f-2bf3f9c7822f
drwxr-xr-x 2 nova nova 4096 27. Okt 15:20 911b252e-c763-4af2-a1d9-70d0880ee380
drwxr-xr-x 2 nova nova 4096 16. Jan 16:43 931f9a1e-2022-4571-909e-6c3f5f8c3ae8
drwxr-xr-x 2 nova nova 4096  4. Jan 11:19 _base
-rw-r--r-- 1 nova nova   30 25. Jan 08:33 compute_nodes
drwxr-xr-x 2 nova nova 4096 18. Jan 08:15 e96c2932-9bef-414e-bf5c-772f2c28613f
drwxr-xr-x 2 nova nova 4096 16. Dez 07:46 f87aadbf-f39d-4349-bca7-c7097e8c456e
drwxr-xr-x 2 nova nova 4096 24. Jan 13:06 locks

compute1:~ # ls -l  
/var/lib/nova/instances/14b75237-7619-481f-9636-792b64d1be17/
insgesamt 2192
-rw-rw---- 1 nova nova       0  3. Jan 11:05 console.log
-rw-r--r-- 1 nova nova      79  3. Jan 11:05 disk.info
-rw-r--r-- 1 nova nova 2233488  3. Jan 11:05 kernel
-rw-r--r-- 1 nova nova    3259 12. Jan 12:54 libvirt.xml

compute1:~ # cat  
/var/lib/nova/instances/14b75237-7619-481f-9636-792b64d1be17/disk.info
{"/var/lib/nova/instances/14b75237-7619-481f-9636-792b64d1be17/kernel": "raw"}
---cut here---

All these instances are in our ceph cluster.

The instance path is defined in nova.conf:

# Where instances are stored on disk (string value)
instances_path = $state_path/instances

If one compute node fails but it's able to initiate a migration, the  
same instance directory is created on the new host and the disks are  
copied to its new compute node.

> can I have both options?

I haven't tried it explicitly, but you can switch the option  
"images_type" in nova.conf and everytime you restart  
nova-compute.service, new instances would be created either on the  
compute nodes or in your storage (ceph) etc.
But I would not recommend that, the impact on existing instances could  
be large, e.g. if you try to resize an instance or migrate it. I don't  
think this would be a good idea. But as I said, I didn't try it  
myself, in my environment we just switched from file based instances  
to ceph. To get a better understanding how ceph works, I switched  
between file based and ceph based glance images, but only temporarily,  
of course.


Regards,
Eugen


Zitat von Manuel Sopena Ballesteros <manuel.sb at garvan.org.au>:

> Hi,
>
> I have been searching on the internet and could not find an answer  
> to this question.
>
> I understand that ephemeral disks lives until the VM is destroyed,  
> but where are the ephemeral disks stored? On local host hosting the  
> VM or in centralized storage (e.g. Ceph) or can I have both options?
>
> If ephemeral can be stored on the same host the instance is  
> running... what would happen if the host fails and the instance is  
> migrated to another one? Will the ephemeral disk be moved across?  
> Will the data persist?
>
> Thank you very much
>
> Manuel Sopena Ballesteros | Big data Engineer
> Garvan Institute of Medical Research
> The Kinghorn Cancer Centre, 370 Victoria Street, Darlinghurst, NSW 2010
> T: + 61 (0)2 9355 5760 | F: +61 (0)2 9295 8507 | E:  
> manuel.sb at garvan.org.au<mailto:manuel.sb at garvan.org.au>
>
> NOTICE
> Please consider the environment before printing this email. This  
> message and any attachments are intended for the addressee named and  
> may contain legally privileged/confidential/copyright information.  
> If you are not the intended recipient, you should not read, use,  
> disclose, copy or distribute this communication. If you have  
> received this message in error please notify us at once by return  
> email and then delete both messages. We accept no liability for the  
> distribution of viruses or similar in electronic communications.  
> This notice should not be removed.



-- 
Eugen Block                             voice   : +49-40-559 51 75
NDE Netzdesign und -entwicklung AG      fax     : +49-40-559 51 77
Postfach 61 03 15
D-22423 Hamburg                         e-mail  : eblock at nde.ag

         Vorsitzende des Aufsichtsrates: Angelika Mozdzen
           Sitz und Registergericht: Hamburg, HRB 90934
                   Vorstand: Jens-U. Mozdzen
                    USt-IdNr. DE 814 013 983





More information about the Openstack mailing list