Skip to contentSkip to conversation

lvcreate snap with device mapper

linux-lvm Walter de Jong 2 participants 2 messages Mar 17, 2005 – Mar 24, 2005

lore
Share & tools
lore
#0 lore raw

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

Signature · 7 lines
                  *** If you build it, they will come ***

Walter de Jong
[email protected]        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

#1 lore raw

[linux-lvm] Snapshot Rollback??

Hi,
By reading the discussion of snapshot reset couple days ago, I more interest in the feature of snapshot rollback, ie, to restore the original volume to the saved state of some historial snapshots. Could the LVM2/device-mapper do this?

Signature · 2 lines
Mozo Hu. mozo@coventive
R&D Assistant Manager, Coventive Advance Technologies