bug-parted
[Top][All Lists]
Advanced

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

Re: GPT and Type 8e (LVM) Partitions go toghether ??


From: Bryn M. Reeves
Subject: Re: GPT and Type 8e (LVM) Partitions go toghether ??
Date: Mon, 30 Mar 2009 15:33:28 +0100

On Mon, 2009-03-30 at 16:02 +0200, Axel Werner wrote:
> thanks fer reply!
> 
> Am 30.03.2009 14:58, Bryn M. Reeves schrieb: 
> > The partition type codes are specific to the MSDOS MBR partition table.
> > They are meaningless in other partitioning schemes.
> > 
> >   
> 
> so its impossible to create such a Type 8e "lvm" Partition on a GPT
> labeled drive?

Correct.

> > > so how to make a type 8e partition on my GPT Disk-Drive using parted ???
> > > 
> > > and if not possible to creat a Type 8e (lvm) partition with parted.. 
> > > WHAT ELSE partition type should i create so i can put a lvm volume on ?
> > >     
> > 
> > It doesn't actually matter; the lvm2 tools have never checked the
> > partition code used (it's more-or-less "documentation" nowadays). 
> u mean i could create/use ANY type of partition to use as a "lvm
> container" ? like ext3 or swap ?

Yes; this is mostly a user-interface issue. The current parted UI is not
great in that it prompts for all sorts of irrelevant information when
you are creating a partition on a label format that does not support or
use that information. For e.g., this is what you'll see creating a
partition on a GPT volume:

(parted) mklabel gpt
(parted) mkpart
Partition type?
[primary]?                                               
File system type?
[ext2]?                                                
Start? 0 
End? 100M
(parted)
p                                                                
Disk geometry for /dev/mapper/t0-l0: 0.000-152.000 megabytes
Disk label type: gpt
Minor    Start       End     Filesystem  Name                  Flags
1          0.017    100.000

The whole primary/extended/logical distinction only matters for the
MSDOS partition table format and the 2nd question (file system type)
assumes that you want to put a file system on the device when you
actually want to make it an LVM PV.

> and what if i create an ext3 partition as a container for an lvm-PV -
> am i required to set that lvm flag thingy within the partition table ?
> or whatfor is that flag then ?

Setting the LVM flag is the right thing to do; it will set the
partition's UUID to be the LVM GPT UUID. This is a bit like the MSDOS
type codes but for the GPT format. It shouldn't cause any problem to set
this but, a bit like the MSDOS partition codes it's mainly documentation
as few tools actually check GPT UUIDs (although looking at the anaconda
sources it does appear to check/set this flag on the GPT volumes it
creates and interprets).

Regards,
Bryn.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]