[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-users] xen-create-image puts "swap" before "root"
On Sat, May 17, 2014 at 4:04 AM, Alexandre Kouznetsov <alk@xxxxxxxxxx> wrote: > Hello. > > I'm setting up a Xen hypervisor on a Debian Wheezy, and facing a issue I > wanted to deal with since a long time ago. > > It's about the order in which xen-create-image handles DomU's disks. By > design of /usr/bin/xen-create-image perl script, the "swap" partition always > goes in the first place on the list, followed by "/" and then the rest of > them. > > Between other things, this setup makes it tricky for PyGrub, there has to be > specific code in xm.tmpl to make the "/" to appear in the first place. > > I'm wondering why is it so. I would expect the "/" to go first, followed by > swap and then the rest of them. Even better, if a partition schema from > /etc/xen-tools/partitions.d is used, why not to use the disks in the same > order as they appear in the partitions file, for sake of predictability. > > This is not feature request. There must be a reason to handle the partitions > in this order. I'm very curious to know which is it, before proposing any > change. IIRC in the old days, the earliest most-common implementation for xen backend storage was a file formatted as loopback device, without any paritition. This makes it easy if you want to do stuff like extend the storage, but makes it very different from "normal", non-virtualized system. Among others, most OS installer won't work on it, you need to setup the OS using a special way (e.g. using tar.gz-ed template). After that, comes the age of a file / LVM , with paritiion. Since you're more likely to extend storage for fileystem (e.g. "/") compared to swap, the swap space is placed first, and "/" last. This makes extending the storage somewhat easy enough for experts: you need to create a new partition table, but you don't need to move any data around. Back to the present, LVM seems to be the norm nowadays, so it shouldn't matter where "/" or swap is located on the disk image. You simply add another disk/file/block device to the VM, and have LVM (inside the VM) handle the rest. This setup also makes it similar to non-virtualized system. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxx http://lists.xen.org/xen-users
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |