[Openstack] Changing the location of Nova's instances

Razique Mahroua razique.mahroua at gmail.com
Wed May 15 15:05:33 UTC 2013


Just use sed and some bashing : 
	virsh shutdown
	virsh edit XXXXX
	sed -> /var/lib/nova/instances -> /your/new/dir	
	cd /var/lib/nova/instances/
	sed every libvirt.xml file
	qemu img-convert -> /var/lib/nova/instances/_base/XXXX -f qcow2 -O /your/new/dir	
	cp /var/lib/nova/instances/instance-XXX/disk /your/new/dir
make a prayer then   :
	virsh start everything



Razique Mahroua - Nuage & Co
razique.mahroua at gmail.com
Tel : +33 9 72 37 94 15



Le 15 mai 2013 à 15:36, "Mac Innes, Kiall" <kiall at hp.com> a écrit :

> On 15/05/13 14:22, Daniel Ellison wrote:
>> On May 15, 2013, at 9:08 AM, "Mac Innes, Kiall" <kiall at hp.com> wrote:
>>> Personally, I would make use of a bind mount[1] rather than trying to relocate..
>>> 
>>> A bind mount is just like a symlink, with the exception of AppArmor (and I presume SELinux) will handle it "correctly"..
>> Ok, so I would move the entire /var/lib/nova directory to /home/storage, then do a bind mount back to /var/lib/nova? And that would require no config changes at all. Nice! Thanks for the tip, Kiall.
>> 
>> Regards,
>> Daniel
> Yup - Or, you could just bind mount /var/lib/nova/instances, leaving the
> rest on the local disks (I have *no clue* if Nova will handle that
> nicely.. But bind mounts certainly will ;))
> 
> I use them pretty heavily inside instances to transparently re-locate
> data (e.g. MySQL DB's, /var/log etc) the the instances second disk.
> Doing this with a symlink, or by updating my.cnf would require
> additional AppArmor config changes for the relocation to work. Using a
> bind mount get's past this issue..
> 
> Anyway - As always, read up and experiment before deciding to go to
> production!
> 
> Thanks,
> Kiall
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack at lists.launchpad.net
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20130515/8c8a9e62/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NUAGECO-LOGO-Fblan_petit.jpg
Type: image/jpeg
Size: 10122 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20130515/8c8a9e62/attachment.jpg>


More information about the Openstack mailing list