Bug#569745: internal LVM device names exposed in symlinks

Peter Rajnoha prajnoha at redhat.com
Mon Feb 15 08:33:33 UTC 2010


On 02/14/2010 01:06 AM, Bastian Blank wrote:
> On Sat, Feb 13, 2010 at 02:28:12PM -0800, Kees Cook wrote:
>> In debian/tree/lvm2/lib/udev/rules.d/56-lvm.rules, several internal LVM
>> names are checked so that they will be skipped for symlinks.  I think that
>> _mlog (for the mirror log) and -cow & -real (for snapshots) are missing
>> from the list.
> 
> _mlog maybe possible. -cow and -real are excluded already by the next
> check.

There's just one thing with the _mlog - it needs to be visible and accessible
at initialisation. So the symlink is created for a while at this stage. Otherwise
we would get warnings about udev not creating the symlinks (there's always a
fallback to old libdevmapper/lvm2 node/symlink creation if we detect that udev
has failed).

The same happens with _mimage volumes during downconverting a mirror LV to
linear - there's a period of time in which the symlink is visible (the rules
are not fixed in the upstream yet, but they will be - the hard-coded rule to
skip _mimage volumes needs to be removed as well). Therefore we need to rely
fully on the flags we set for each device in libdevmapper/lvm2 directly.
The values of the flags tell us which device should be skipped and they direct
the rule application.

We need to keep the udev state in sync with the internal lvm2 state so if
the device is marked as visible, we need to create the symlink.

Peter





More information about the pkg-lvm-maintainers mailing list