Skip to contentSkip to conversation

Testing LVM2

linux-lvm Nils Juergens 2 participants 4 messages Jul 13, 2003 – Jul 15, 2003

lore
Share & tools
lore
#0 lore raw

Hi,

i'm currently in the process of starting to test the 2.5 linux kernel series, now that the 2.6-pre are around the corner. While i'm at it and having set up a box completely for testing (and trying to break) stuff i thought i might give lvm2 a try (not that i expect it to break :) ).

Thus, i got LVM2.2.00.03-rc4.tgz and device-mapper.1.00.02-rc3.tgz of the ftp server.

My question is: Is this stuff supposed to work with the 2.5 kernel series or do i have to switch to 2.4 to test lvm2? I know that the device-mapper is included in the 2.5 series, but is it recent enough? Also, are there different (and thus incompatible) versions of either the device mapper and/or the device-mapper-libs around?

Trying to compile the above device-mapper after doing

configure --with-kernel-dir=/usr/src/linux-2.5.75

i get (using gcc-3.3 from Debian unstable):

[snipped other make output]
make[1]: Entering directory /root/device-mapper.1.00.02-rc3/lib' gcc -c -Iioctl -I. -I../include -I/usr/src/linux-2.5.75/include -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -O2 -DDM_COMPAT ioctl/libdevmapper.c -o ioctl/libdevmapper.o ioctl/libdevmapper.c:55: error: DM_TABLE_LOAD' undeclared here (not in a function)
ioctl/libdevmapper.c:55: error: initializer element is not constant ioctl/libdevmapper.c:55: error: (near initialization for _cmd_data_v4[1].cmd') ioctl/libdevmapper.c:55: error: initializer element is not constant ioctl/libdevmapper.c:55: error: (near initialization for _cmd_data_v4[1].version')
ioctl/libdevmapper.c:55: error: initializer element is not constant ioctl/libdevmapper.c:55: error: (near initialization for _cmd_data_v4[1]') ioctl/libdevmapper.c:56: error: initializer element is not constant ioctl/libdevmapper.c:56: error: (near initialization for _cmd_data_v4[2].version')

[snipped more "initializer element is not constant" and "SOMETHING_IN_UPPERCASE undeclared here" error messages]

ioctl/libdevmapper.c:648: error: structure has no member named event_nr' ioctl/libdevmapper.c: In function _flatten':
ioctl/libdevmapper.c:851: error: structure has no member named event_nr' make[1]: *** [ioctl/libdevmapper.o] Error 1
make[1]: Leaving directory /root/device-mapper.1.00.02-rc3/lib'
make: *** [lib] Error 2

thanks,

Nils

Signature · 3 lines
Nils Juergens  | [email protected] | icq 7090774
Having problems sending big files over the net?
Try out Efisto (http://efisto.rnbhq.org).
#1 lore raw
Quoted 1 line · Nils Juergens

configure --with-kernel-dir=/usr/src/linux-2.5.75

Does ./configure *without* the --with-kernel-dir bit work any better?

Alasdair

Signature · 1 line
[email protected]
#2 lore raw
Quoted 4 lines · Alasdair G Kergon
Quoted 1 line · Nils Juergens

configure --with-kernel-dir=/usr/src/linux-2.5.75

Does ./configure *without* the --with-kernel-dir bit work any better?

In fact, it does. But using lvm2 does not.

I created a vg with on pv and one lv named "test". Then i create ext3 filesystem on it and mount it. Then i try to create a snapshot of this lv:

root@guldukat:~# lvcreate -s -n snap /dev/vol/test  -L 50M
Rounding up size to full physical extent 52.00 MB
device-mapper ioctl cmd 2 failed: Invalid argument
Couldn't load device 'vol-snap'.
Problem reactivating origin test

dmesg says:

device-mapper: ioctl interface mismatch: kernel(1.0.6), user(4.0.0), cmd(0)
device-mapper: ioctl interface mismatch: kernel(1.0.6), user(4.0.0), cmd(0)
device-mapper: internal error adding target to table
device-mapper: ioctl interface mismatch: kernel(1.0.6), user(4.0.0), cmd(0)
device-mapper: ioctl interface mismatch: kernel(1.0.6), user(4.0.0), cmd(0) kjournald starting. Commit interval 5 seconds
EXT3 FS on dm-2, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
kjournald starting. Commit interval 5 seconds
device-mapper: ioctl interface mismatch: kernel(1.0.6), user(4.0.0), cmd(0)
device-mapper: internal error adding target to table

so i guess i have to update the device-mapper in the kernel.

thanks,

Nils

Signature · 3 lines
Nils Juergens  | [email protected] | icq 7090774
Having problems sending big files over the net?
Try out Efisto (http://efisto.rnbhq.org).
#3 lore raw
Quoted 4 lines · Nils Juergens

In fact, it does. But using lvm2 does not.

I created a vg with on pv and one lv named "test". Then i create ext3 filesystem on it and mount it. Then i try to create a snapshot of this lv:

Snapshots are not ported to 2.5 yet.

We'll see if we can make this more obvious from the error messages!

Alasdair

Signature · 1 line
[email protected]