WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Questions on qcow, qcow2 versus LVM

To: matt@xxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Questions on qcow, qcow2 versus LVM
From: "Fajar A. Nugraha" <fajar@xxxxxxxxx>
Date: Wed, 30 Dec 2009 17:39:12 +0700
Cc: Xen User-List <xen-users@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 30 Dec 2009 02:39:46 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <04021cd9972767b675ff2157e0f8596d.squirrel@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <2ff3192ddfc512732cd0a6955fa51595.squirrel@xxxxxxxxxxxxxxxxxxxxxx> <83c17d8cd6753530b00f134159151864.squirrel@xxxxxxxxxxxxxxxxxxxxxx> <7207d96f0912240624hf1d0d17w658048dac8311cb5@xxxxxxxxxxxxxx> <f17de79d17fea73fa0ea0c22259f779d.squirrel@xxxxxxxxxxxxxxxxxxxxxx> <7207d96f0912241358o1bdcf15bi1514f6628b86068d@xxxxxxxxxxxxxx> <aa8fed56d2dbf587df790cda9f9525de.squirrel@xxxxxxxxxxxxxxxxxxxxxx> <7207d96f0912291404h24d7daeat3ea634edc368357f@xxxxxxxxxxxxxx> <5557c7d0881f6365cacb5d022142c283.squirrel@xxxxxxxxxxxxxxxxxxxxxx> <4B3AD245.1090308@xxxxxxxxxxxxxxx> <04021cd9972767b675ff2157e0f8596d.squirrel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
On Wed, Dec 30, 2009 at 4:52 PM, Matthew Law <matt@xxxxxxxxxxxxxxxxxx> wrote:
> Seems like getting a newer version of parted on CentOS is not so
> straightforward - it has dependencies on a few libs and although they are
> all installed they are waay too old for the version of parted with the fix
> in it.  This  method, or perhaps an expect script to do the same might be
> the best option in the short term.

Why not use sfdisk? Here's an example

# cat partlist.txt
1,,L,*

# lvcreate -L 10G -n testpartlv rootvg
  Logical volume "testpartlv" created

# sfdisk /dev/rootvg/testpartlv < partlist.txt
Checking that no-one is using this disk right now ...
BLKRRPART: Invalid argument
OK

Disk /dev/rootvg/testpartlv: 1305 cylinders, 255 heads, 63 sectors/track

sfdisk: ERROR: sector 0 does not have an msdos signature
 /dev/rootvg/testpartlv: unrecognized partition table type
Old situation:
No partitions found
New situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/rootvg/testpartlv1   *      1    1304    1304   10474380   83  Linux
/dev/rootvg/testpartlv2          0       -       0          0    0  Empty
/dev/rootvg/testpartlv3          0       -       0          0    0  Empty
/dev/rootvg/testpartlv4          0       -       0          0    0  Empty
Successfully wrote the new partition table

Re-reading the partition table ...
BLKRRPART: Invalid argument

If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)

# lvremove /dev/rootvg/testpartlv
Do you really want to remove active logical volume testpartlv? [y/n]: y
  Logical volume "testpartlv" successfully removed

-- 
Fajar

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users