linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] [PATCH] vg_check_name.c
@ 2002-04-23 16:59 Jim Pick
  2002-04-25  5:09 ` Heinz J . Mauelshagen
  0 siblings, 1 reply; 2+ messages in thread
From: Jim Pick @ 2002-04-23 16:59 UTC (permalink / raw)
  To: 140957; +Cc: linux-lvm

This in regards to the following bug report I filed with Debian:


http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=140957&msg=4&repeatmerged=y
es

I did some more debugging to figure out what bit me, and it turns out that
my problem was that my volume group was named just "a", and there was a new
check added to 1.1rc1 in vg_check_name.c that matched it against "ataraid"
(defined in _devdir[] in lvm_dir_cache.c).  Very confusing.  I don't think
the check was intended to work that way, so here's a patch:

Index: vg_check_name.c
===================================================================
RCS file: /data/cvs/LVM/tools/lib/vg_check_name.c,v
retrieving revision 1.7
diff -u -r1.7 vg_check_name.c
--- vg_check_name.c 2002/03/12 13:58:04 1.7
+++ vg_check_name.c 2002/04/23 21:40:15
@@ -84,7 +84,7 @@
             else
                filter = _devdir[d];

-            if ( strncmp ( vg_name, filter, strlen ( vg_name)) == 0) {
+            if ( strncmp ( vg_name, filter, strlen ( filter)) == 0) {
                ret = -LVM_EVG_CHECK_NAME;
                break;
             }

This bit me on several machines, since I used the same naming convention.
:-(

Cheers,

 - Jim

BTW, I don't believe that the Debian bug severity should have been
downgraded to just "important", as I almost lost all my data.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [linux-lvm] [PATCH] vg_check_name.c
  2002-04-23 16:59 [linux-lvm] [PATCH] vg_check_name.c Jim Pick
@ 2002-04-25  5:09 ` Heinz J . Mauelshagen
  0 siblings, 0 replies; 2+ messages in thread
From: Heinz J . Mauelshagen @ 2002-04-25  5:09 UTC (permalink / raw)
  To: linux-lvm

Jim,

thanks for pointing this out.

It is in LVM1 CVS now.

On Tue, Apr 23, 2002 at 03:00:36PM -0700, Jim Pick wrote:
> This in regards to the following bug report I filed with Debian:
> 
> 
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=140957&msg=4&repeatmerged=y
> es
> 
> I did some more debugging to figure out what bit me, and it turns out that
> my problem was that my volume group was named just "a", and there was a new
> check added to 1.1rc1 in vg_check_name.c that matched it against "ataraid"
> (defined in _devdir[] in lvm_dir_cache.c).  Very confusing.  I don't think
> the check was intended to work that way, so here's a patch:
> 
> Index: vg_check_name.c
> ===================================================================
> RCS file: /data/cvs/LVM/tools/lib/vg_check_name.c,v
> retrieving revision 1.7
> diff -u -r1.7 vg_check_name.c
> --- vg_check_name.c 2002/03/12 13:58:04 1.7
> +++ vg_check_name.c 2002/04/23 21:40:15
> @@ -84,7 +84,7 @@
>              else
>                 filter = _devdir[d];
> 
> -            if ( strncmp ( vg_name, filter, strlen ( vg_name)) == 0) {
> +            if ( strncmp ( vg_name, filter, strlen ( filter)) == 0) {
>                 ret = -LVM_EVG_CHECK_NAME;
>                 break;
>              }
> 
> This bit me on several machines, since I used the same naming convention.
> :-(
> 
> Cheers,
> 
>  - Jim
> 
> BTW, I don't believe that the Debian bug severity should have been
> downgraded to just "important", as I almost lost all my data.

Sorry to hear that :-(

> 
> 
> 
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

-- 

Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
Mauelshagen@Sistina.com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-04-25  5:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-23 16:59 [linux-lvm] [PATCH] vg_check_name.c Jim Pick
2002-04-25  5:09 ` Heinz J . Mauelshagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).