[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.