Non-removable vs removable?

Marek Kozlowski kozlowsm at mini.pw.edu.pl
Tue Jan 18 15:17:26 CET 2011


On 01/18/2011 12:59 PM, Hungerburg wrote:
> Am 2011-01-18 08:17, schrieb Yves-Alexis Perez:
>> On mar., 2011-01-18 at 08:12 +0100, Jérôme Guelfucci wrote:
>>> If you manage to read French, Lionel has a howto to hide LVM snapshots
>>> using UDISKS_PRESENTATION_HIDE and udev.
>>>
>>> http://mrpouit.free.fr/?p=626
>>>
>>> Even if you can't read French, I'm sure you can do something with the
>>> rule example.
>>
>> And I'm sure if you bribe Lionel with beer promises he might do an
>> english translation which would really fit on the planets he's
>> syndicated on :)
> 
> Crude translation below, there must be a better way than matching by name?
> 
> Hiding lvm udisks
> 
> For its 4.8 release Thunar has been ported to the GIO framework. So
> unlike previous versions, now also partitions of non-removable volumes
> are shown. And also logical lvm volumes. Nothing too bad, except that
> the thunar sidebar is stuffed to the brim.
> 
> To get rid of that, one has to tell udisks to ignore chroots and
> snapshots, by using the UDISKS_PRESENTATION_HIDE variable. The preferred
> means is udev (oh joy!). It is therefore "sufficient" to create a rule
> in /etc/udev/rules.d/, e.g. 99-hide-schroot.rules, that contains:
> 
> # my volumens all have names like /dev/$vg/chroot_$release_$arch,
> # so one searches for the ones starting with 'chroot'
> ENV{DM_LV_NAME}=="chroot_?*", ENV{UDISKS_PRESENTATION_HIDE}:="1"
> # snapshots call themselves /dev/$vg/$nomduschrootsource-$uiddusnapshot,
> # in my case thats /dev/$vg/$release-$arch-sbuild-$uuid,
> # so search volumes with '-sbuild-' in their name
> ENV{DM_LV_NAME}=="?*-sbuild-?*", ENV{UDISKS_PRESENTATION_HIDE}:="1"
> 
> Reboot, look, look, thunar sidebar is less loaded, nice that!

For my computer it works:

$ cat /etc/udev/rules.d/99-hide-disks.rules
KERNEL=="sda1", ENV{UDISKS_PRESENTATION_HIDE}:="1"
KERNEL=="sda3", ENV{UDISKS_PRESENTATION_HIDE}:="1"
KERNEL=="sda4", ENV{UDISKS_PRESENTATION_HIDE}:="1"
# and so on for other disks.

Maybe it would be smart to add it to the FAQ?

Best regards,
Marek




More information about the Xfce4-dev mailing list