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

[linux-lvm] lvcreate snap with device mapper



Hi,

There is a funny problem with lvcreate. When you create a snap, it
assumes the second element in the supplied path is a volume group. This
is untrue when the device mapper is used, and it is untrue (obviously)
if symbolic links to the block device are used.
The text in the attachment demonstrates what I mean.

I think it's a bad thing to use path names for determining what volume
group has to be used.

This is on debian/sarge i386 with LVM2 2.01.04-2 and kernel 2.6.11 with
dm_mod.ko and dm_snapshot.ko loaded.

Greets,

    --Walter
--
                  *** If you build it, they will come ***

Walter de Jong
walter sara nl        http://www.sara.nl/
HPC Systems Programmer at SARA Computing and Network Services

People should be able to e-mail me, spambots should not.
root# lvcreate -s -L 200g -n snap_home_lv /dev/mapper/sara_vg-home_lv
  Volume group "mapper" doesn't exist

root# lvcreate -s -L 200g -n snap_home_lv /dev/sara_vg/home_lv
  Logical volume "snap_home_lv" created

root# ls -l /dev/mapper/sara_vg-home_lv
brw-------  1 root root 254, 2 Mar  7 20:51 /dev/mapper/sara_vg-home_lv

root# ls -l /dev/sara_vg/home_lv
lrwxrwxrwx  1 root root 27 Mar 17 14:18 /dev/sara_vg/home_lv -> /dev/mapper/sara_vg-home_lv

root# ls -lL /dev/sara_vg/home_lv
brw-------  1 root root 254, 2 Mar  7 20:51 /dev/sara_vg/home_lv

root# ln -s /dev/sara_vg /dev/blah

root# lvcreate -s -L 200g -n snap_home_lv /dev/blah/home_lv
  Volume group "blah" doesn't exist


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