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

Re: [linux-lvm] segmentation fault problems



Henning Hogue wrote:
> 
> I have been having a problem getting the LVM working due to lvcreate causing a
> segmentation fault when it's run. I am running redhat 7.1 on a SMP system with
> kernel 2.4.9. I have had the same problem with versions 1.0.1rc2 and the CVS
> code. A copy of the output from the command /sbin/lvcreate -d -l1000 -ntestlv
> volume_1  2> debug.out is available at http://www.randomfactor.net/~henning/deb
> ug.out

This sounds like the lvcreate problem I am seeing.  I modified
lvcreate.c to use lv_create_remove() rather than the lv_create() inline,
as illustrated below, and it worked.

This suggests a problem with the lv_create() inline in
lib/lv_create_remove.c.  gdb shows that it is messing up the three
parameters vg, lv and lv_name.

*** tools/lvcreate.c    Thu Jul 26 00:22:19 2001
--- tools.patched/lvcreate.c    Tue Oct  2 14:14:27 2001
***************
*** 788,794 ****
     /* create it in kernel */
     if ( opt_v > 0)
        printf ( "%s -- creating logical volume VGDA in kernel\n", cmd);
!    if ( ( ret = lv_create ( vg, vg->lv[l], vg->lv[l]->lv_name)) < 0) {
        fprintf ( stderr,
                  "%s -- ERROR \"%s\" creating VGDA for \"%s\" in
kernel\n",
                          cmd, lvm_error ( ret), lv_name_ptr);
--- 788,794 ----
     /* create it in kernel */
     if ( opt_v > 0)
        printf ( "%s -- creating logical volume VGDA in kernel\n", cmd);
!    if ( ( ret = lv_create_remove ( vg, vg->lv[l], vg->lv[l]->lv_name,
LV_CREATE)) < 0) {
        fprintf ( stderr,
                  "%s -- ERROR \"%s\" creating VGDA for \"%s\" in
kernel\n",
                          cmd, lvm_error ( ret), lv_name_ptr);


-- 
Sean Burford    x34135
ITS Systems Specialist
Adelaide University



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