[linux-lvm] lvcreate core dump on large disks, vg name corrupted.

Sean Burford sean.burford at adelaide.edu.au
Thu Sep 27 10:14:17 UTC 2001


Hi,

I am attempting to use the LVM tools under Linux 2.4.9-ac14 to set up
access to a SAN.  lvcreate is seg faulting because main() is passing a
corrupted vg name to lv_create().  I suspect this is due to the large
partitions that are being dealt with (4*100G).

Using:
  LVM 1.0.1-rc2 userland tools
  The LVM kernel modules that came with the kernel.  I could not apply
the 1.0.x patches as they do not compile with the Alan Cox patches.  I
will see if the straight 2.4.9 kernel works with the AMI MegaRAID card
in the box soon, because if it does I will be able to patch the kernel
for LVM 1.0.1-rc2.

Some related output from dmesg is:
SCSI device sdh: 209715200 512-byte hdwr sectors (107374 MB)
 sdh: sdh1
SCSI device sdi: 209715200 512-byte hdwr sectors (107374 MB)
 sdi: sdi1
SCSI device sdj: 209715200 512-byte hdwr sectors (107374 MB)
 sdj: sdj1
SCSI device sdk: 209715200 512-byte hdwr sectors (107374 MB)
 sdk: sdk1
LVM version LVM 0.9.1_beta7(ish)(20 June 2001) module loaded

Following the LVM-Howto, I have configured the LVM as follows:
vgscan
pvcreate /dev/sdh1
pvcreate /dev/sdi1
pvcreate /dev/sdj1
pvcreate /dev/sdk1
vgcreate san_vg /dev/sd[hijk]1
lvcreate -v -L255000 -ndata_lv san_vg

lvcreate segfaults:
# lvcreate -v -L255000 -ndata_lv san_vg
lvcreate -- checking volume group name "san_vg"
lvcreate -- checking volume group existence
lvcreate -- checking volume group activity
lvcreate -- checking logical volume path "/dev/san_vg/data_lv"
lvcreate -- checking stripe count
lvcreate -- checking stripe size
lvcreate -- locking logical volume manager
lvcreate -- getting volume group status from VGDA in kernel
lvcreate -- checking stripe size against volume group physical extent
size
lvcreate -- reading volume group data of "san_vg"
lvcreate -- checking logical volume maximum size
lvcreate -- checking volume group free space
lvcreate -- checking stripe count against physical volume count
lvcreate -- checking for maximum logical volume count
lvcreate -- setting up logical volume
lvcreate -- setting read ahead sectors
lvcreate -- creating logical volume VGDA in kernel
Segmentation fault (core dumped)

I recompiled it with debugging, and got the following output:

[root at backgammon tools]# gdb ./lvcreate
GNU gdb 5.0rh-5 Red Hat Linux 7.1
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux"...
(gdb) run -v -L255000 -ndata_lv san_vg
Starting program: /usr/local/src/LVM/1.0.1-rc2/tools/./lvcreate -v
-L255000 -ndata_lv san_vg
lvcreate -- checking volume group name "san_vg"
lvcreate -- checking volume group existence
lvcreate -- checking volume group activity
lvcreate -- checking logical volume path "/dev/san_vg/data_lv"
lvcreate -- checking stripe count
lvcreate -- checking stripe size
lvcreate -- locking logical volume manager
lvcreate -- getting volume group status from VGDA in kernel
lvcreate -- checking stripe size against volume group physical extent
size
lvcreate -- reading volume group data of "san_vg"
lvcreate -- checking logical volume maximum size
lvcreate -- checking volume group free space
lvcreate -- checking stripe count against physical volume count
lvcreate -- checking for maximum logical volume count
lvcreate -- setting up logical volume
lvcreate -- setting read ahead sectors
lvcreate -- creating logical volume VGDA in kernel
 
Program received signal SIGSEGV, Segmentation fault.
lv_create (vg=0x5, lv=0xbffffa14,
    lv_name=0xbffffa2c
"dûÿ¿\213ûÿ¿°ûÿ¿àûÿ¿øûÿ¿\032üÿ¿&üÿ¿0üÿ¿óýÿ¿\022þÿ¿,þÿ¿Aþÿ¿Xþÿ¿cþÿ¿\227þÿ¿¤þÿ¿¬þÿ¿¼þÿ¿Êþÿ¿Øþÿ¿éþÿ¿÷þÿ¿\002ÿÿ¿\rÿÿ¿@ÿÿ¿»ÿÿ¿")
    at lv_create_remove.c:42
42      inline int lv_create ( vg_t *vg, lv_t *lv, char *lv_name) {
(gdb) bt
#0  lv_create (vg=0x5, lv=0xbffffa14,
    lv_name=0xbffffa2c
"dûÿ¿\213ûÿ¿°ûÿ¿àûÿ¿øûÿ¿\032üÿ¿&üÿ¿0üÿ¿óýÿ¿\022þÿ¿,þÿ¿Aþÿ¿Xþÿ¿cþÿ¿\227þÿ¿¤þÿ¿¬þÿ¿¼þÿ¿Êþÿ¿Øþÿ¿éþÿ¿÷þÿ¿\002ÿÿ¿\rÿÿ¿@ÿÿ¿»ÿÿ¿")
    at lv_create_remove.c:42
#1  0x0804b03d in main (argc=5, argv=0xbffffa14) at lvcreate.c:791
#2  0x4006e177 in __libc_start_main (main=0x8049390 <main>, argc=5,
    ubp_av=0xbffffa14, init=0x8048e88 <_init>, fini=0x804b4d0 <_fini>,
    rtld_fini=0x4000e184 <_dl_fini>, stack_end=0xbffffa0c)
    at ../sysdeps/generic/libc-start.c:129

-- 
Sean Burford    x34135
ITS Systems Specialist
Adelaide University




More information about the linux-lvm mailing list