From: Gordan B. <go...@bo...> - 2009-12-29 08:28:06
|
For the sake of education and diversity I have just finished the first attempt at this, purely to see if there is an inherent problem in OpenVZ that might shoot this down. Well - I haven't found any such problems! :D The basic setup was this: Two identical host machines (virtual, because it was easier, but fully virtualized with KVM, CentOS 5.4). The host OS was stripped down to a bare minimum (a "mere" 850MB...) since I didn't feel applying the more sensibly sized OSR init root was vital for now and modding it would require extra work. Shared virtual disk (shared image, presented as an IDE device), with GFS on top. So far, so standard. The shared GFS device was mounted under /vz/private (where OpenVZ keeps the VM fs trees). CentOS 5.4 guest template was initialized in there. The guest config file was the same on both hosts, except for the IP address (the IP is configured on the host rather than the guest, but each guest can have independent iptables rules if required). Thus - the two guests were running on a GFS shared root. The one thing remaining would be to set up the entries in fstab to make sure that /cdsl.local gets bind mounted correctly at boot-up time, but other than that, I'd say the preliminary prototype test has passed. :) The basic thing I wanted to achieve is to have a cleaner separation between the host provided shared rootfs and the guest so that there are no issues during shutdown with unmounting file systems, etc. This prototype appears to have completely met those requirements. There is also an added bonus benefit that I hadn't thought of before - the guest can be cleanly rebooted without rebooting the host (which also means without triggering fencing and suchlike). Gordan |