How to hide volumes from Computer:/// (Caja)

Forum rules
Before you post please read how to get help
powerhouse
Level 5
Level 5
Posts: 877
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

How to hide volumes from Computer:/// (Caja)

Postby powerhouse » Mon Jan 21, 2013 1:49 pm

Hi,

Just installed LM 14 Mate over my LM 13 Mate installation. Aside from /boot, I'm using LVM exclusively for all disks. Now I got the problem that when I open the "Computer:///" place (using caja) I see all my physical volumes that cannot be mounted, in addition to the logical volumes, like here:
Image


Under LM13 the physical volumes didn't show up (all those 1TB, 2TB etc. drives listed).

Any idea on how to fix this and get rid of the unmountable volumes? Could that be the result of installing a package too many, such as the udisks package?

P.S.: I'm using emblems to better identify the volumes. All volumes marked with a RED exclamation mark are physical volumes that cannot be mounted.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Gigabyte GTX 970 + PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB + Samsung EVO 850 250GB SSD + 5 HDD, Corsair 500R case, SeaSonic 660W Gold X PS

jayell
Level 1
Level 1
Posts: 3
Joined: Tue Nov 02, 2010 5:35 pm

Re: How to hide volumes from Computer:/// (Caja)

Postby jayell » Thu Jun 19, 2014 4:52 pm

Well, this is scary. The date of your post, I mean. I've been scouring the forums to find what should be a very simple solution to your request. There are other people searching, that's been obvious in my forum-travels and some of the advice being tried is far too complicated. Hard to believe this hasn't been addressed yet.

powerhouse
Level 5
Level 5
Posts: 877
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: How to hide volumes from Computer:/// (Caja)

Postby powerhouse » Fri Jun 20, 2014 2:07 am

jayell wrote:Well, this is scary. The date of your post, I mean. I've been scouring the forums to find what should be a very simple solution to your request. There are other people searching, that's been obvious in my forum-travels and some of the advice being tried is far too complicated. Hard to believe this hasn't been addressed yet.


I couldn't even find a complicated solution, but perhaps I wasn't searching enough. As it goes, I'm now running LM 16 Mate and the drives still show up, albeit without the red exclamation marks. Of course they are not mountable.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Gigabyte GTX 970 + PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB + Samsung EVO 850 250GB SSD + 5 HDD, Corsair 500R case, SeaSonic 660W Gold X PS

tamer7
Level 1
Level 1
Posts: 2
Joined: Sun Nov 09, 2014 1:37 pm

Re: How to hide volumes from Computer:/// (Caja)

Postby tamer7 » Sun Nov 09, 2014 1:43 pm

This happens because those devices are listed by `udisksctl status` command.

A workaround I've found to have an actual partition instead of the unmountable logical drive, is to list a partition from that drive for mounting from fstab, but it must be mountable to a subdirectory of /media.

for example, to show a mountable/unmountable parition as a disk rather than a useless WesterDigital drive (sda) icon in caja/nemo, I mount a data partition from that drive to /media/data by adding a line similar to the below in /etc/fstab

Code: Select all

# <file system>      <mount point>   <type>   <options>         <dump>   <pass>
UUID=828A95838A95747F   /media/data   ntfs   permissions,locale=en_US.utf8   0   2


hope that helps as that is the only workaround I can come up with in Mint 17 Qiana (either with nemo or caja).

powerhouse
Level 5
Level 5
Posts: 877
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: How to hide volumes from Computer:/// (Caja)

Postby powerhouse » Sun Feb 12, 2017 5:50 pm

Still the same problem with Linux Mint 18 and 18.1 Mate using Caja. On a quest for some permission issues I have I ran across the udev rules in /lib/udev/rules.d/80-udisks2.rules. According to those rules, devices which should not be display in the user interface are filtered out as follows (lines 104-):

Code: Select all

# Devices which should not be display in the user interface
#
# (note that RAID/LVM members are not normally shown in an user
# interface so setting UDISKS_IGNORE at first does not seem to achieve
# anything. However it helps for RAID/LVM members that are encrypted
# using LUKS. See bug #51439.)

# Apple Bootstrap partitions
ENV{ID_PART_ENTRY_SCHEME}=="mac", ENV{ID_PART_ENTRY_TYPE}=="Apple_Bootstrap", ENV{UDISKS_IGNORE}="1"

# Apple Boot partitions
ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_ENTRY_TYPE}=="426f6f74-0000-11aa-aa11-00306543ecac", ENV{UDISKS_IGNORE}="1"

# special DOS partition types (EFI, hidden, etc.) and RAID/LVM
# see http://www.win.tue.nl/~aeb/partitions/partition_types-1.html
ENV{ID_PART_ENTRY_SCHEME}=="dos", \
  ENV{ID_PART_ENTRY_TYPE}=="0x0|0x11|0x12|0x14|0x16|0x17|0x1b|0x1c|0x1e|0x27|0x3d|0x84|0x8d|0x8e|0x90|0x91|0x92|0x93|0x97|0x98|0x9a|0x9b|0xbb|0xc2|0xc3|0xdd|0xef|0xfd", \
  ENV{UDISKS_IGNORE}="1"

# special GUID-identified partition types (EFI System Partition, BIOS Boot partition, RAID/LVM)
# see http://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs
ENV{ID_PART_ENTRY_SCHEME}=="gpt", \
  ENV{ID_PART_ENTRY_TYPE}=="c12a7328-f81f-11d2-ba4b-00a0c93ec93b|21686148-6449-6e6f-744e-656564454649|a19d880f-05fc-4d3b-a006-743f0f84911e|e6d6d379-f507-44c2-a23c-238f2a3df928|e3c9e316-0b5c-4db8-817d-f92df00215ae|de94bba4-06d1-4d40-a16a-bfd50179d6ac", \
  ENV{UDISKS_IGNORE}="1"

According to the above rules I should not be seeing unmountable drives, but only the LVM logical volumes. BUT, the very beginning of that rules file has the following (lines 10-14):

Code: Select all

# Skip probing if not a block device or if requested by other rules
#
SUBSYSTEM!="block", GOTO="udisks_probe_end"
ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="udisks_probe_end"
ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="?*", GOTO="udisks_probe_end"

Wonderful! Now go figure which flags are set/unset when these rules are applied. For the fun of it, I searched for DM_UDEV_DISABLE_OTHER_RULES_FLAG in the all the rules under /lib/udev:

Code: Select all

grep -rnw /lib/udev -e "DM_UDEV_DISABLE_OTHER_RULES_FLAG"
/lib/udev/rules.d/69-lvm-metad.rules:20:ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", GOTO="lvm_end"
/lib/udev/rules.d/56-lvm.rules:33:ENV{DM_SUBSYSTEM_UDEV_FLAG0}=="1", ENV{DM_NOSCAN}="1", ENV{DM_DISABLE_OTHER_RULES_FLAG_OLD}="$env{DM_UDEV_DISABLE_OTHER_RULES_FLAG}", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}="1"
/lib/udev/rules.d/56-lvm.rules:35:ENV{DM_SUBSYSTEM_UDEV_FLAG0}!="1", ENV{DM_NOSCAN}=="1", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}="$env{DM_DISABLE_OTHER_RULES_FLAG_OLD}", \
/lib/udev/rules.d/56-lvm.rules:51:ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}="1"
/lib/udev/rules.d/80-udisks2.rules:14:ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="?*", GOTO="udisks_probe_end"
/lib/udev/rules.d/99-systemd.rules:14:SUBSYSTEM=="block", ACTION=="add", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", ENV{SYSTEMD_READY}="0"
/lib/udev/rules.d/55-dm.rules:51:IMPORT{db}="DM_UDEV_DISABLE_OTHER_RULES_FLAG"
/lib/udev/rules.d/55-dm.rules:124:ENV{DM_SUSPENDED}=="1", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}="1"
/lib/udev/rules.d/55-dm.rules:131:ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}="1"


To work around this, I created the following rules file named 99-udisks2.rules under /etc/udev/rules.d :

Code: Select all

# This rules file prevents disks from showing up in the file manager

KERNEL=="sda", ENV{UDISKS_IGNORE}="1"
KERNEL=="sdb", ENV{UDISKS_IGNORE}="1"
KERNEL=="sdc", ENV{UDISKS_IGNORE}="1"
KERNEL=="sdd", ENV{UDISKS_IGNORE}="1"
KERNEL=="sde", ENV{UDISKS_IGNORE}="1"
KERNEL=="sdf", ENV{UDISKS_IGNORE}="1"


I took that from the Arch Linux site. However, even that doesn't work. Anyone here with more insight?
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Gigabyte GTX 970 + PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB + Samsung EVO 850 250GB SSD + 5 HDD, Corsair 500R case, SeaSonic 660W Gold X PS


Return to “MATE”

Who is online

Users browsing this forum: No registered users and 2 guests