Re: [PATCH] Bug fix for LVM

2009-08-06 Thread Felix Zielcke
Am Freitag, den 31.07.2009, 20:30 +0200 schrieb Felix Zielcke: > Am Freitag, den 31.07.2009, 22:28 +0800 schrieb Bean: > > Hi, > > > > Committed, grub-probe now now uses space as separator instead of newline. > > > > grub-mkconfig is still broken with it even though you use now spaces > instead

Re: [PATCH] Bug fix for LVM

2009-07-31 Thread Felix Zielcke
Am Freitag, den 31.07.2009, 22:28 +0800 schrieb Bean: > Hi, > > Committed, grub-probe now now uses space as separator instead of newline. > grub-mkconfig is still broken with it even though you use now spaces instead of newlines. insmod doestn't support multiple modules at once. -- Felix Zielc

Re: [PATCH] Bug fix for LVM

2009-07-31 Thread Robert Millan
On Wed, Jul 29, 2009 at 11:22:56AM +0800, Bean wrote: > On Wed, Jul 29, 2009 at 1:42 AM, Robert Millan wrote: > > On Tue, Jul 28, 2009 at 11:15:09PM +0800, Bean wrote: > >> -  buf2 = grub_zalloc (size); > >> +  buf2 = grub_malloc (size); > >>    if (!buf2) > >>      return grub_errno; > >> > >> +  

Re: [PATCH] Bug fix for LVM

2009-07-31 Thread Bean
Hi, Committed, grub-probe now now uses space as separator instead of newline. -- Bean ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel

Re: [PATCH] Bug fix for LVM

2009-07-30 Thread Pavel Roskin
On Tue, 2009-07-28 at 23:15 +0800, Bean wrote: > Hi, > > BTW, I found a regression on r2421 that cause raid5rec to fail: > > http://svn.savannah.gnu.org/viewvc/trunk/grub2/disk/raid6_recover.c?root=grub&r1=2197&r2=2421 > > buf and buf2 are two different variable. > > This new patch include the

Re: [PATCH] Bug fix for LVM

2009-07-30 Thread Patrik Horník
Hello Bean, great, it is working now. However, "grub-probe -t abstraction" separates different modules with newline character, so grub-mkconfig generates incorrect grub.cfg. Patrik Horník On Tue, Jul 28, 2009 at 17:15, Bean wrote: > Hi, > > BTW, I found a regression on r2421 that cause raid5re

Re: [PATCH] Bug fix for LVM

2009-07-28 Thread Bean
On Wed, Jul 29, 2009 at 1:42 AM, Robert Millan wrote: > On Tue, Jul 28, 2009 at 11:15:09PM +0800, Bean wrote: >> -  buf2 = grub_zalloc (size); >> +  buf2 = grub_malloc (size); >>    if (!buf2) >>      return grub_errno; >> >> +  grub_memset (buf, 0, size); > > We just received 'buf' as parameter.  

Re: [PATCH] Bug fix for LVM

2009-07-28 Thread Felix Zielcke
Am Dienstag, den 28.07.2009, 19:42 +0200 schrieb Robert Millan: > On Tue, Jul 28, 2009 at 11:15:09PM +0800, Bean wrote: > > > +static int > > +probe_raid_level (grub_disk_t disk) > > +{ > > + if (disk->dev->id != GRUB_DISK_DEVICE_RAID_ID) > > +return -1; > > + > > + return ((struct grub_raid

Re: [PATCH] Bug fix for LVM

2009-07-28 Thread Robert Millan
On Tue, Jul 28, 2009 at 11:15:09PM +0800, Bean wrote: > - buf2 = grub_zalloc (size); > + buf2 = grub_malloc (size); >if (!buf2) > return grub_errno; > > + grub_memset (buf, 0, size); We just received 'buf' as parameter. Why do we have to zero it here? > +static int > +probe_raid_le

Re: [PATCH] Bug fix for LVM

2009-07-28 Thread Bean
Hi, Oh, the link should be: http://svn.savannah.gnu.org/viewvc/trunk/grub2/disk/raid5_recover.c?root=grub&r1=2197&r2=2421 On Tue, Jul 28, 2009 at 11:15 PM, Bean wrote: > Hi, > > BTW, I found a regression on r2421 that cause raid5rec to fail: > > http://svn.savannah.gnu.org/viewvc/trunk/grub2/dis

Re: [PATCH] Bug fix for LVM

2009-07-28 Thread Bean
Hi, BTW, I found a regression on r2421 that cause raid5rec to fail: http://svn.savannah.gnu.org/viewvc/trunk/grub2/disk/raid6_recover.c?root=grub&r1=2197&r2=2421 buf and buf2 are two different variable. This new patch include the revert raid5_recover.c to r1828. On Tue, Jul 28, 2009 at 9:57 PM

Re: [PATCH] Bug fix for LVM

2009-07-28 Thread Bean
Hi, Oh, I've found the problem. The abstraction is ok, but now partmap is wrong. The original code assumes at most one level of abstraction when detecting partmap, and it doesn't work on two level abstraction like LVM on RAID. If you add module minicmd, you can use lsmod and see pc module is missi

Re: [PATCH] Bug fix for LVM

2009-07-27 Thread Bean
On Tue, Jul 28, 2009 at 4:58 AM, Patrik Horník wrote: > Hello Bean, > > it still does not work, I've tested your patch today against revision > 2448 from SVN. > > - grub-probe works and detects ex2 filesystem on LVM volume on RAID5 arrays. > > - However grub on boot still does not detect filesystem

Re: [PATCH] Bug fix for LVM

2009-07-27 Thread Patrik Horník
Hello Bean, it still does not work, I've tested your patch today against revision 2448 from SVN. - grub-probe works and detects ex2 filesystem on LVM volume on RAID5 arrays. - However grub on boot still does not detect filesystem on root/boot volume. It knows root LVM volume according ls command

Re: [PATCH] Bug fix for LVM

2009-07-25 Thread Felix Zielcke
Am Montag, den 20.07.2009, 03:34 +0800 schrieb Bean: > On Mon, Jul 20, 2009 at 3:11 AM, Patrik Horník wrote: > > Bean, should Grub2 with this patch work if the boot partition is LVM > > volume and LVM is placed on top of RAID 5 arrays? > > Hi, > > Yeah, it should work, please try it out. > I ju

Re: [PATCH] Bug fix for LVM

2009-07-25 Thread Robert Millan
On Thu, Jul 23, 2009 at 02:58:50AM +0800, Bean wrote: > On Thu, Jul 23, 2009 at 1:33 AM, Robert Millan wrote: > > On Sun, Jul 19, 2009 at 05:41:04PM +0800, Bean wrote: > >> +      if (is_raid) > >> +     printf ("raid mdraid"); > >> + > >> +      if (is_lvm) > >> +     printf ((is_raid) ? " lvm" :

Re: [PATCH] Bug fix for LVM

2009-07-22 Thread Bean
On Thu, Jul 23, 2009 at 1:33 AM, Robert Millan wrote: > On Sun, Jul 19, 2009 at 05:41:04PM +0800, Bean wrote: >> +      if (is_raid) >> +     printf ("raid mdraid"); >> + >> +      if (is_lvm) >> +     printf ((is_raid) ? " lvm" : "lvm"); > > Is there a better way to handle this?  Perhaps we could

Re: [PATCH] Bug fix for LVM

2009-07-22 Thread Robert Millan
On Sun, Jul 19, 2009 at 05:41:04PM +0800, Bean wrote: > + if (is_raid) > + printf ("raid mdraid"); > + > + if (is_lvm) > + printf ((is_raid) ? " lvm" : "lvm"); Is there a better way to handle this? Perhaps we could make the list newline separated instead of space separated and a

Re: [PATCH] Bug fix for LVM

2009-07-22 Thread Robert Millan
On Sun, Jul 19, 2009 at 05:41:04PM +0800, Bean wrote: > > Hi, > > I've come up an alternative solution to grub_raid_rescan, we can use > the same trick as lvm, call fini and then init function, this would > have the same effect of rescanning. Now that grub_raid_rescan is gone, > I can simply raid

Re: [PATCH] Bug fix for LVM

2009-07-19 Thread Bean
On Mon, Jul 20, 2009 at 3:11 AM, Patrik Horník wrote: > Bean, should Grub2 with this patch work if the boot partition is LVM > volume and LVM is placed on top of RAID 5 arrays? Hi, Yeah, it should work, please try it out. -- Bean ___ Grub-devel mail

Re: [PATCH] Bug fix for LVM

2009-07-19 Thread Patrik Horník
Bean, should Grub2 with this patch work if the boot partition is LVM volume and LVM is placed on top of RAID 5 arrays? Thanks, Patrik On Sat, Jul 18, 2009 at 16:11, Bean wrote: > Hi, > > This patch fixes a few bug in lvm. > > There can be multiple copies of meta data, it's not an error, ignore

Re: [PATCH] Bug fix for LVM

2009-07-19 Thread Bean
On Sun, Jul 19, 2009 at 4:05 AM, Robert Millan wrote: > On Sat, Jul 18, 2009 at 09:59:55PM +0200, Vladimir 'phcoder' Serbinenko wrote: >> On Sat, Jul 18, 2009 at 9:43 PM, Bean wrote: >> > On Sun, Jul 19, 2009 at 3:11 AM, Robert Millan wrote: >> >> On Sat, Jul 18, 2009 at 10:11:19PM +0800, Bean wrot

Re: [PATCH] Bug fix for LVM

2009-07-18 Thread Robert Millan
On Sat, Jul 18, 2009 at 09:59:55PM +0200, Vladimir 'phcoder' Serbinenko wrote: > On Sat, Jul 18, 2009 at 9:43 PM, Bean wrote: > > On Sun, Jul 19, 2009 at 3:11 AM, Robert Millan wrote: > >> On Sat, Jul 18, 2009 at 10:11:19PM +0800, Bean wrote: > >>>      } > >>> > >>>    grub_raid_rescan (); > >>> +

Re: [PATCH] Bug fix for LVM

2009-07-18 Thread Vladimir 'phcoder' Serbinenko
On Sat, Jul 18, 2009 at 9:43 PM, Bean wrote: > On Sun, Jul 19, 2009 at 3:11 AM, Robert Millan wrote: >> On Sat, Jul 18, 2009 at 10:11:19PM +0800, Bean wrote: >>>      } >>> >>>    grub_raid_rescan (); >>> +  grub_lvm_fini (); >>> +  grub_lvm_init (); >> >> This is aside from this patch, but I don't

Re: [PATCH] Bug fix for LVM

2009-07-18 Thread Robert Millan
On Sun, Jul 19, 2009 at 03:43:10AM +0800, Bean wrote: > On Sun, Jul 19, 2009 at 3:11 AM, Robert Millan wrote: > > On Sat, Jul 18, 2009 at 10:11:19PM +0800, Bean wrote: > >>      } > >> > >>    grub_raid_rescan (); > >> +  grub_lvm_fini (); > >> +  grub_lvm_init (); > > > > This is aside from this p

Re: [PATCH] Bug fix for LVM

2009-07-18 Thread Bean
On Sun, Jul 19, 2009 at 3:11 AM, Robert Millan wrote: > On Sat, Jul 18, 2009 at 10:11:19PM +0800, Bean wrote: >>      } >> >>    grub_raid_rescan (); >> +  grub_lvm_fini (); >> +  grub_lvm_init (); > > This is aside from this patch, but I don't see the purpose of this > grub_raid_rescan() function.

Re: [PATCH] Bug fix for LVM

2009-07-18 Thread Robert Millan
On Sat, Jul 18, 2009 at 10:11:19PM +0800, Bean wrote: > } > >grub_raid_rescan (); > + grub_lvm_fini (); > + grub_lvm_init (); This is aside from this patch, but I don't see the purpose of this grub_raid_rescan() function. It's in raid.mod but only used by grub-fstest, so at least it

[PATCH] Bug fix for LVM

2009-07-18 Thread Bean
Hi, This patch fixes a few bug in lvm. There can be multiple copies of meta data, it's not an error, ignore the extra copy instead of quit. In case of LVM on RAID, the raid device and first disk would have the same lvm header ! The raid device would be found first, so we don't replace pv->disk i