Hiding LVM2 physical volumes from Thunar removable devices

For some reason, Thunar will sometimes show LVM2 physical volumes as removable devices. As an example, with Ubuntu 12.04 and Xfce using an encrypted raid disk that then contains a LVM2 physical volume, that volume will come visible even when it isn't mountable. The solution involves using the UDISKS_PRESENTATION_HIDE environment variable. However, this needs to be passed to Thunar using udev.

Adding the following in /etc/udev/rules.d/99-hide-thunar-devices.rules will the device "md1":

KERNEL=="md1", ENV{UDISKS_PRESENTATION_HIDE}="1"

Then use this command (as root) to trigger a refresh:

udevadm trigger

You may need to play around guessing the correct device name depending on your setup. Udisks doesn't appear to be able to tell you directly which the possible mystery device is.