[lvm-devel] naming problem on cached devices

Oliver Rath rath at mglug.de
Wed Feb 5 09:44:50 UTC 2014


Hi list,

i have a little problem here using (not only happen on lvm ;-) ) cached
devices:

I.e. i have a ssd named /dev/ssd and a standard disk /dev/sda1 to be
cached. If I now create i.e. a device /dev/mapper/cache0 (done by
dmsetup at the mom) and create there a pv, this pv exists twice (at ssd
and sda). If I then create a vg based on ssd, this vg exists twice, too.
This happens i.e. for flashcache device, too.

Is there a mechanism to avoid this doubling in an easy way? I know, you
can blind out devices with a filter argument in lvm.conf, but maybe
there are better possibilities.

There is another interesting case: If i want to cache an *existing* pv,
is it possiblie to change the *name* of this pv in a vg in a dynamic
way? I.e. if the vg "myvg" consists on /dev/sdc1, if now i create a
cache-device /dev/mapper/sdc1_cached, how can i transfer this name into
myvg instead of the original sdc1? Or is this the wrong question?

Tfh!
Oliver






More information about the lvm-devel mailing list