Bug 1034095 - Hide devicemapper mounts in Gnome
Summary: Hide devicemapper mounts in Gnome
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: docker-io
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lokesh Mandvekar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-25 09:15 UTC by Marek Goldmann
Modified: 2014-07-01 22:59 UTC (History)
8 users (show)

Fixed In Version: docker-io-0.7.0-14.fc20
Clone Of:
Environment:
Last Closed: 2013-12-03 01:19:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Screenshot (34.19 KB, image/png)
2013-11-25 09:25 UTC, Marek Goldmann
no flags Details
udev rules to ignore docker devmapper block devices (69 bytes, text/plain)
2013-11-28 13:57 UTC, Alexander Larsson
no flags Details
udev rules to ignore docker devmapper block devices (199 bytes, text/plain)
2013-11-28 14:44 UTC, Alexander Larsson
no flags Details

Description Marek Goldmann 2013-11-25 09:15:50 UTC
Description of problem:

If you use docker in a graphical environment, when you start a container - the mounted filesystem will be shown in Gnome Files explorer. I don't think there is any benefit in it - even more - there is some danger that we can unmount the filesystem by accident.

I would like to see these filesystems hidden.

I'm assigning this to docker-io component to get more opinions, later we can move it to Gnome if this will be accepted.

Comment 1 Marek Goldmann 2013-11-25 09:25:20 UTC
Created attachment 828577 [details]
Screenshot

Comment 2 Lokesh Mandvekar 2013-11-25 18:53:55 UTC
Hi Alex, I'm guessing you'd be the goto person for this(?)

Comment 3 Andy Lutomirski 2013-11-27 01:09:28 UTC
What's needed is (I think) UDISKS_IGNORE [1] [2].

[1] https://git.gnome.org/browse/gvfs/tree/monitor/udisks2/what-is-shown.txt
[2] udisks.8

This may be as simple as having a standard naming convention for Docker's DM devices and adding a udev rule.

Comment 4 Alexander Larsson 2013-11-28 13:38:03 UTC
In general we don't show anything unless its in some standard locations like /media, /run/media, or $home. However there are two devices here that are still shown, as they are not mounted, so there is no mountpath that we can ignore it via.

The first is the devicemapper pool (dm-0). It has:
    by-id:                     /dev/disk/by-id/dm-name-docker-0:31-15758192-pool
So maybe we can mark this via udev rules.

The second is the loopback device that is used for the devicemapper pool.
I don't see how we can ignore this though:
========================================================================

Showing information for /org/freedesktop/UDisks/devices/loop0
  native-path:                 /sys/devices/virtual/block/loop0
  device:                      7:0
  device-file:                 /dev/loop0
    presentation:              /dev/loop0
    by-id:                     /dev/disk/by-uuid/1cb3cade-41d1-4c3b-a0d0-246783dbfecd
  detected at:                 Thu 28 Nov 2013 14:31:36 CET
  system internal:             1
  removable:                   0
  has media:                   1 (detected at Thu 28 Nov 2013 14:31:36 CET)
    detects change:            0
    detection by polling:      0
    detection inhibitable:     0
    detection inhibited:       0
  is read only:                0
  is mounted:                  0
  mount paths:             
  mounted by uid:              0
  presentation hide:           0
  presentation nopolicy:       1
  presentation name:           
  presentation icon:           
  automount hint:              
  size:                        107374182400
  block size:                  512
  job underway:                no
  usage:                       filesystem
  type:                        ext4
  version:                     1.0
  uuid:                        1cb3cade-41d1-4c3b-a0d0-246783dbfecd
  label:                       
  loop:
    filename:                  /dev/loop0
  drive:
    vendor:                    Linux
    model:                     Loop: loop0
    revision:                  
    serial:                    
    WWN:                       
    detachable:                0
    can spindown:              0
    rotational media:          Yes, unknown rate
    write-cache:               unknown
    ejectable:                 0
    adapter:                   Unknown
    ports:
    similar devices:
    media:                     
      compat:                 
    interface:                 (unknown)
    if speed:                  (unknown)
    ATA SMART:                 not available

Comment 5 Alexander Larsson 2013-11-28 13:57:33 UTC
Created attachment 830245 [details]
udev rules to ignore docker devmapper block devices

With this rule we get rid of one of the icons. But i have no idea how to avoid showing the loop0 one.

Comment 6 Alexander Larsson 2013-11-28 14:27:46 UTC
It seems like we should be able to match on the backing file, but:

SUBSYSTEM=="block", NAME=="loop*", ATTR{loop/backing_file)=="/var/lib/docker/*", ENV{UDISKS_IGNORE}="1"

doesn't seem to work.

Comment 7 Alexander Larsson 2013-11-28 14:44:12 UTC
Created attachment 830274 [details]
udev rules to ignore docker devmapper block devices

With this in /etc/udev/rules.d everything works for me.

Comment 8 Fedora Update System 2013-11-28 18:28:06 UTC
docker-io-0.7.0-10.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/docker-io-0.7.0-10.fc20

Comment 9 Fedora Update System 2013-11-28 18:36:17 UTC
docker-io-0.7.0-10.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/docker-io-0.7.0-10.fc19

Comment 10 Fedora Update System 2013-11-29 15:59:30 UTC
docker-io-0.7.0-10.fc20 has been pushed to the Fedora 20 testing repository.

Comment 11 Fedora Update System 2013-12-01 19:33:11 UTC
docker-io-0.7.0-12.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/docker-io-0.7.0-12.fc20

Comment 12 Fedora Update System 2013-12-02 02:44:59 UTC
docker-io-0.7.0-12.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/docker-io-0.7.0-12.fc19

Comment 13 Fedora Update System 2013-12-02 15:59:35 UTC
docker-io-0.7.0-14.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/docker-io-0.7.0-14.fc20

Comment 14 Fedora Update System 2013-12-02 16:16:38 UTC
docker-io-0.7.0-14.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/docker-io-0.7.0-14.fc19

Comment 15 Fedora Update System 2013-12-02 16:27:46 UTC
docker-io-0.7.0-14.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/docker-io-0.7.0-14.el6

Comment 16 Fedora Update System 2013-12-03 01:19:45 UTC
docker-io-0.7.0-14.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2013-12-03 10:38:10 UTC
docker-io-0.7.0-14.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2013-12-14 02:47:06 UTC
docker-io-0.7.0-14.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.