-----Original Message-----
From: Daniel P. Berrange [mailto:berrange@redhat.com]
Sent: den 6 juli 2009 16:17
To: Henrik Persson E
Cc: veillard(a)redhat.com; libvirt-list(a)redhat.com
Subject: Re: [libvirt] [PATCH] Do a correct format mapping of
partitions 2
On Mon, Jul 06, 2009 at 04:07:32PM +0200, Henrik Persson E wrote:
>
> Hi,
>
> Just to follow up this issue, I haven't found any way to
get this info
> from standard parted :(
Your code was getting the raw MS-Dos partition type. This
isn't really needed by libvirt, and indeed we do need to work
with partition tables that aren't MS-Dos format, eg GPT. As
an alternative it looks like we ought to be able to get
enough data for libvirt's needs by looking at a combo of the
PED_PARTITION_RAID/PED_PARTITION_LVM
flags, the 'fs_type' field of PedPartition.
That could be true for RAID and LVM types, but for all other types we
can only guess since parted does not provide this info unless we create
an FS at the sametime as the partition is created. I guess we could
treat all as 'linux' as long as we don't know anything else.
/Henrik