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

Bug#275586: Bug#245704: [PATCH] LVM on Software RAID




On Fri, 15 Oct 2004, Joey Hess wrote:
> Alex Owen wrote:
> > --- partman/partman-lvm/init.d/lvm	(revision 22848)
> > +++ partman/partman-lvm/init.d/lvm	(working copy)
> > @@ -32,6 +34,9 @@
> >
> >      for id in $partitions; do
> >  	lvm=no
> > +	if pvdisplay $(cat $dev/device) >/dev/null 2>&1 ; then
> > +	    lvm=yes
> > +	fi
> >  	open_dialog GET_FLAGS $id
> >  	while { read_line flag; [ "$flag" ]; }; do
> >  	    if [ "$flag" = lvm ]; then
>
> I don't understand the point of checking pvdisplay here.

[SNIP]

> I do know of one bug: After setting up a md device and marking it to be
> used as for lvm, and going into lvmcfg and setting up the lvm, partman
> restarts. And at this point it loses track of the method field of the md
> device.

Hi Joey,

I've had a quick look at your patch and as ever it seems a lot neater than
my initial hack! I'll try and find time to test it this weekend...

I think the 3-line patch hunk above was my simple attempt at fixing the
"loses track of the method field of the md device" bug you identified when
partman restarts after using lvmcfg. I aggree that for normal partitions
this does not work. But for the special case of md devices which are used
as a single device (not partitioned) this code, although a hack, should at
least work. I guess the real fix lies somewhere in the partman-md code.


Random thoughts:
================
The real problem is that we do not (yet) have a consistent method for
saving this "lvm" flag meta data. It's OK on a DOS type partition we set
the patition type to 0x8E or whatever it is. When this is commited to disk
we have a non-voletile canonical source for the "lvm" flag when partman is
restarted. For md devices my understanding is that there is nowhere to
commit this information. My understanding of partition systems other than
DOS is a bit rusty but I can't think of an anaolgy for 0x8E for say an SGI
partition table or Mac Partition table.

I think we need a way to commit this "lvm" flag to disk in an
arch-neutral way. What form this might take I don't know! (pvcreate ?)

Bye for now

Alex Owen







Reply to: