Instances' ephemeral storage is normally under /var/lib/nova/instances/INSTANCE_ID. I say "normally" because this directory, and practically all other details, can be configured.
If use_cow_images is configured, and images_type is qcow2, the files under the INSTANCE_ID directory are COW images based on files under the _base directory. You can verify that with the command qemu-img info --force-share FILENAME.qcow2
.
Why does deleting a _base file have no effect? I removed the _base file and ran openstack server reboot
. Let's have a look at the Nova Compute log.
Mar 23 11:17:39 devstack-compute nova-compute[1108]: : libvirtError: Cannot access backing file '/opt/stack/data/nova/instances/_base/fb9365317d7a6f6afbc6eb9f5ad40d5d0f4d8307' of storage file '/opt/stack/data/nova/instances/ef3367f5-6908-4099-b5c0-d6fffb7784c9/disk' (as uid:64055, gid:120): No such file or directory
Mar 23 11:17:39 devstack-compute nova-compute[1108]: DEBUG nova.virt.libvirt.driver [None req-0d26fbe2-d936-4f54-b4e1-18b29f9833a6 demo demo] [instance: ef3367f5-6908-4099-b5c0-d6fffb7784c9] Instance soft reboot failed: Cannot access backing file '/opt/stack/data/nova/instances/_base/fb9365317d7a6f6afbc6eb9f5ad40d5d0f4d8307' of storage file '/opt/stack/data/nova/instances/ef3367f5-6908-4099-b5c0-d6fffb7784c9/disk' (as uid:64055, gid:120): No such file or directory {{(pid=1108) reboot /opt/stack/nova/nova/virt/libvirt/driver.py:2632}}
Mar 23 11:17:39 devstack-compute nova-compute[1108]: WARNING nova.virt.libvirt.driver [None req-0d26fbe2-d936-4f54-b4e1-18b29f9833a6 demo demo] [instance: ef3367f5-6908-4099-b5c0-d6fffb7784c9] Failed to soft reboot instance. Trying hard reboot.: libvirtError: Cannot access backing file '/opt/stack/data/nova/instances/_base/fb9365317d7a6f6afbc6eb9f5ad40d5d0f4d8307' of storage file '/opt/stack/data/nova/instances/ef3367f5-6908-4099-b5c0-d6fffb7784c9/disk' (as uid:64055, gid:120): No such file or directory
Mar 23 11:17:39 devstack-compute nova-compute[1108]: INFO nova.virt.libvirt.driver [None req-0d26fbe2-d936-4f54-b4e1-18b29f9833a6 demo demo] [instance: ef3367f5-6908-4099-b5c0-d6fffb7784c9] Instance destroyed successfully.
At this point, Nova basically recreates the instance but keeps all its attributes like UUID, ephemeral storage and IP address.
Not sure what happens when you run reboot
inside the instance. My guess is that the same qemu process keeps running, and that the "deleted" _base file still exists, although it has no directory entry anymore.
Or your instances use volume storage instead of ephemeral storage. This is the default when launching instances from Horizon.
In any case, I see no reason for deleting files under _base, except if you know that they are left-overs that won't be used anymore.