* naming problem on cached devices
@ 2014-02-05 9:44 Oliver Rath
2014-02-05 15:09 ` Zdenek Kabelac
0 siblings, 1 reply; 2+ messages in thread
From: Oliver Rath @ 2014-02-05 9:44 UTC (permalink / raw)
To: lvm-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* naming problem on cached devices
2014-02-05 9:44 naming problem on cached devices Oliver Rath
@ 2014-02-05 15:09 ` Zdenek Kabelac
0 siblings, 0 replies; 2+ messages in thread
From: Zdenek Kabelac @ 2014-02-05 15:09 UTC (permalink / raw)
To: lvm-devel
Dne 5.2.2014 10:44, Oliver Rath napsal(a):
> 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.
It's quite tricky - and that's currently the main reason lvm2 insist on using
only PVs for any use.
While everything has a PV header - LVM does the tricky job to handle
device hierarchy.
It's quite tricky to handle udev notification in way, udev has proper data
which device is the master device and how we use such in stack.
One you start to create cached lower-lever devices - you get into troubles of
activation and deactivation order during various system stages.
> 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?
Again - this will be handled via lvm2 command for LVs. You'll be able to
convert any live/active LV to cached LV and also back to uncached. All device
renaming in metadata will happen in background together with change of table
layout.
Regards
Zdenek
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-02-05 15:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-05 9:44 naming problem on cached devices Oliver Rath
2014-02-05 15:09 ` Zdenek Kabelac
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.