From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joseph Wolff Subject: Re: Stacked disks Date: Sun, 02 Sep 2007 17:36:07 -0700 Message-ID: <46DB56F7.4070909@osdf.com> References: <46DB062E.5070004@osdf.com> <64F9B87B6B770947A9F8391472E032160D70630A@ehost011-8.exch011.intermedia.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Dor Laor Return-path: In-Reply-To: <64F9B87B6B770947A9F8391472E032160D70630A-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Thanks, Dor, we'll plan accordingly, and make the base images read-only. Cheers, joe Dor Laor wrote: >> Hello, >> >> I would like to set up stacked disk images as follows: >> >> 1) Base-image of Ubuntu, with ubuntu-minimal installed. >> >> 2) Multiple other images all based on the single image above, with >> various single-purpose packages installed; eg Apache, Exim, etc. >> >> Now, comes the hard part: >> >> Q2: What happens if I change the underlying ubuntu-minimal image (For a >> good example, to apply security updates), while several of the other >> "upper" images (Apache Exim, etc) are running? >> >> Q1: Easier: If everything is down, can I change the underlying image > and >> will the changes be properly reflected in the "upper" (dependent) >> images? >> >> >> I see problems with simply a file-based algorithm which looks first in >> the upper image, and then in the base image.. >> >> It's really a reconciliation problem.. > > > The quick answer: > You can't do that (both 1, 2). > This disks are block devices that represent a physical disk. Doing > something > to a block in the base image can erase information that the next image > relays on. > Actually it is good practice to chmod a-w BASE_IMG if there are > children. > > So you shouldn't mess with the base image, you can replicate it and > update all of them. > > A better answer: > There is unionFS that might help here: All VMs will mount ro the base > image while > having another drive for their private applications. UnionFs work in the > file level > above and do the merge between the base and private images so basically > you can > update the base image once in a while (when unionFS is down/inactive). > >> >> FYI: I was a KVM forum attendee; I'm building a hosting infrastructure >> based on KVM, and so clearly saving / consolidating space & updates > such >> as in the example above is of keen interest to me. >> >> And Thanks again to the Qumranet team for an informative and successful >> conference! >> >> >> Thanks, >> Joe > > Thanks for the participation and for choosing KVM. > We enjoyed the forum too. > -Dor ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/