[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-users] Questions on qcow, qcow2 versus LVM
On Mon, Jan 4, 2010 at 8:08 PM, Matthew Law <matt@xxxxxxxxxxxxxxxxxx> wrote: > On Mon, January 4, 2010 12:37 pm, Fajar A. Nugraha wrote: >> udev should create the partition block device file (i.e /dev/xvda1) as >> necessary. Try doing "fdisk -l" and "ls -la /dev/xvda1". >> If that doesn't work, you could always try mapping it as hda/sda >> instead of xvda. It should work with 2.6.18 kernel. > > fdisk -l > > Disk /dev/xvda: 42.9 GB, 42949672960 bytes > 255 heads, 63 sectors/track, 5221 cylinders > Units = cylinders of 16065 * 512 = 8225280 bytes > Disk identifier: 0x00000000 > > Disk /dev/xvda doesn't contain a valid partition table > > Here are the exact commands I ran to create and partition the LV, based on > your previous suggestions: > > lvcreate -C y -L 40G -n testvm VolGroupVM > echo \"1,,L,*\" | sfdisk /dev/VolGroupVM/testvm > mkfs.ext3 /dev/mapper/VolGroupVM-testvm > > Have I missed something? That's wrong :) The commands to sfdisk were intended to automatically create one partition table, where you can use kpartx later. Basically it replace parted with sfdisk. Instead, you do mkfs on /dev/VolGroupVM/testvm directly? You got two choices: (1) mkfs directly on /dev/VolGroupVM/testvm. In this scenario you won't need kpartx or sfdisk. It'd be better if you assign the LV directly as xvda1 (or hda1/sda1) instead of what you did now (assign it as xvda). (2) back to your original setup, replacing parted with sfdisk. In this case the sfdisk command line becames echo "1,,L,*" | sfdisk /dev/VolGroupVM/testvm Note how I didn't escape the quote. verify that the partition table gets created correctly afterwards (see my previous mail), then you stilll need to do kpartx like you did in your original script. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-users
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |