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

[dm-devel] lvcreate (snapshot) under kernel 2.6.1



Yesterday I installed a new machine ( with slackware-current if it matter )
and upgraded to a 2.6.1 kernel.  Then installed from source device-mapper.1.00.07.tgz
and LVM2.2.00.08.tgz

I then defined two large partitions of type 0x8e on two different disk, ran pvcreate
on both and make thems a volume group "vg01".

I then created about 16 logicals volumes, formatted thems as reiserfs, added
entry to fstab and mounted thems. Rebooted a couple of times meanwhile for
unrelated purpose.

I populated all the logical volumes (filesystems) with files.

My problem start here. I then decided that I wanted a weekly snapshot 
of every filesystem (1Gig snapshot for every one) and typed the following
command to create the first snapshot of /dev/vg01/www41

# lvcreate -s -L1G -n Swww41 /dev/vg01/www41

the command failed with some error on cmd 9 (or something like that)
and also a fail in reloading the original www41 (or something like that)

a "dmesg" told me that the kernel tryed to modprobe md-snapshot and failed (error 240 I think)

a "lvscan"  did show both the Original and Snapshot logical volumes as active.

then I tryed to "lvremove" it,  and it failed the same way, with the Snapshot still there.


I then reviewed my kernel config and saw something related to "ioctl interface version 4"
that was checked, I unchecked it for a test, recompiled the kernel and
try "reboot" remotely but the machine never came back (but still ping at this time)
so probably the machine never succeed to the "reboot" (hanged somewhere in shutdown
and I guess it's related to the failing "lvcreate -s"  earlier command but not sure)

Well, then I looked at the device mapper source files to get clue on whatis dm-snapshot and
saw some v2.4 patches creating a file of that name in the 2.4 source under drivers/md/
 
then I did a "ls -la /usr/src/linux-2.6.1/drivers/md" 
and got this: (it's on an other machine, the real one is still unreacheable)

$ ls -la /usr/src/linux-2.6.1/drivers/md
total 831
drwxrwxr-x    2 root     root         1376 Jan  9 18:31 ./
drwxrwxr-x   43 root     root         1168 Jan  9 18:32 ../
-rw-r--r--    1 root     root          204 Jan  9 18:31 .built-in.o.cmd
-rw-r--r--    1 root     root         9256 Jan  9 18:31 .dm-ioctl.o.cmd
-rw-r--r--    1 root     root         9018 Jan  9 18:31 .dm-linear.o.cmd
-rw-r--r--    1 root     root          198 Jan  9 18:31 .dm-mod.o.cmd
-rw-r--r--    1 root     root         9018 Jan  9 18:31 .dm-stripe.o.cmd
-rw-r--r--    1 root     root         9060 Jan  9 18:31 .dm-table.o.cmd
-rw-r--r--    1 root     root         9018 Jan  9 18:31 .dm-target.o.cmd
-rw-r--r--    1 root     root         9006 Jan  9 18:31 .dm.o.cmd
-rw-r--r--    1 root     root        11568 Jan  9 18:31 .linear.o.cmd
-rw-r--r--    1 root     root        11922 Jan  9 18:31 .md.o.cmd
-rw-r--r--    1 root     root        11556 Jan  9 18:31 .raid0.o.cmd
-rw-r--r--    1 root     root        11556 Jan  9 18:31 .raid1.o.cmd
-rw-r--r--    1 root     root        11585 Jan  9 18:31 .raid5.o.cmd
-rw-r--r--    1 root     root        11607 Jan  9 18:31 .xor.o.cmd
-rw-r--r--    1 root     root         5345 Jan  9 01:59 Kconfig
-rw-r--r--    1 root     root          604 Jan  9 01:59 Makefile
-rw-r--r--    1 root     root       129094 Jan  9 18:31 built-in.o
-rw-r--r--    1 root     root        23621 Jan  9 02:00 dm-ioctl-v1.c
-rw-r--r--    1 root     root        25845 Jan  9 01:59 dm-ioctl-v4.c
-rw-r--r--    1 root     root          222 Jan  9 01:59 dm-ioctl.c
-rw-r--r--    1 root     root        15504 Jan  9 18:31 dm-ioctl.o
-rw-r--r--    1 root     root         2370 Jan  9 01:59 dm-linear.c
-rw-r--r--    1 root     root         2624 Jan  9 18:31 dm-linear.o
-rw-r--r--    1 root     root        38953 Jan  9 18:31 dm-mod.o
-rw-r--r--    1 root     root         4977 Jan  9 01:59 dm-stripe.c
-rw-r--r--    1 root     root         3488 Jan  9 18:31 dm-stripe.o
-rw-r--r--    1 root     root        17959 Jan  9 02:00 dm-table.c
-rw-r--r--    1 root     root         8924 Jan  9 18:31 dm-table.o
-rw-r--r--    1 root     root         3017 Jan  9 02:00 dm-target.c
-rw-r--r--    1 root     root         4204 Jan  9 18:31 dm-target.o
-rw-r--r--    1 root     root        18787 Jan  9 01:59 dm.c
-rw-r--r--    1 root     root         4803 Jan  9 01:59 dm.h
-rw-r--r--    1 root     root        11288 Jan  9 18:31 dm.o
-rw-r--r--    1 root     root         7388 Jan  9 01:59 linear.c
-rw-r--r--    1 root     root         3988 Jan  9 18:31 linear.o
-rw-r--r--    1 root     root        83758 Jan  9 01:59 md.c
-rw-r--r--    1 root     root        45144 Jan  9 18:31 md.o
-rw-r--r--    1 root     root        13314 Jan  9 01:59 multipath.c
-rw-r--r--    1 root     root        13165 Jan  9 01:59 raid0.c
-rw-r--r--    1 root     root         6852 Jan  9 18:31 raid0.o
-rw-r--r--    1 root     root        30264 Jan  9 01:59 raid1.c
-rw-r--r--    1 root     root        12416 Jan  9 18:31 raid1.o
-rw-r--r--    1 root     root        48871 Jan  9 01:59 raid5.c
-rw-r--r--    1 root     root        17176 Jan  9 18:31 raid5.o
-rw-r--r--    1 root     root         3265 Jan  9 01:59 xor.c
-rw-r--r--    1 root     root        16320 Jan  9 18:31 xor.o

There is nothing that look like "*snap*" in that directory.

Apparently lvm2 "snapshot" is not working on out of the box on 2.6.1 kernel 
or I may have missed a step somewhere. (I'm used to lvm1 under 2.4 kernels)

I would appreciate if someone can help me with this, I really want snapshot working.


thanks,
Christian.

ps:  is "ioctl interface version 4" required/suitable or not in the 2.6.1 kernel config ?



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