GNOME Bugzilla – Bug 745349
gparted wrapper script needs updated for udisks2
Last modified: 2015-04-02 15:27:51 UTC
The gparted wrapper script needs updated to work with udisks2: the command that needs to be run is now udisks2-inhibit. Forwarded from https://launchpad.net/bugs/1078445.
Thanks Phillip for creating this upstream report. I plan to look into this issue soon. Curtis
Created attachment 299047 [details] [review] udisks2-inhibit automount patch v1 Hi Mike and Phillip, Attached is patch v1 to prevent automounting of newly created file systems on distributions that use the udisks2 "udisksd" daemon and have /usr/lib/udisks2/udisks2-inhibit. The steps to test are: sudo gparted # Not "sudo gpartedbin" - we need to invoke wrapper Device --> Create Partition Table Partition --> New, create 20MB ext4 Apply Without this patch set, on Xubuntu 14.04 the XFCE file manager (Thunar) mounts the newly created partition, even though gparted is running. With this patch set, the newly created partition is not mounted. I tested this patch on the several distributions. Success in this test means that the newly created file system is not automounted. To test for daemon I used "ps -ef | grep udisksd" To test for file I used "ls /usr/lib/udisks2/udisks2-inhibit" Daemon? File? Test Distro udisksd udisks2-inihibit Result --------------- ------- ---------------- ----------------- Fedora 21 Yes No Success Debian 7 No No Success Debian 8* No No Success openSUSE 13.2 Yes No Success Kubuntu 14.04 Yes Yes Success Ubuntu 14.04 Yes Yes Success Xubuntu 14.04 Yes Yes Success Ubuntu 14.10 Yes Yes Success [1] * Not yet officially released [1] Error messages shown on command line: Failed to get D-Bus connection: No connection to service manager. Too few arguments. These error message did not impact gparted execution, and did not affect gparted operations. The closest report of the error messages I could find indicated a problem with systemd on Ubuntu 14.10. https://github.com/ansible/ansible-modules-core/issues/161 Reading this report lead me to another report. https://wiki.ubuntu.com/systemd#Warning.21_Experimental_code It would seem that systemd is experimental on Ubuntu 14.10 and does not play well with Ubuntu's upstart. A quick search of my Ubuntu 14.10 VM does indeed show evidence of systemd. I do not recall installing systemd on this VM. To test this does-not-play-well theory I removed systemd from Ubuntu 14.10 with the following command: sudo apt-get remove systemd systemd-shim After rebooting, all my testing went well and no error messages were displayed. Because Ubuntu's plan is to switch fully to systemd for 15.04, and since support for 14.10 is expiring on 2015-07, I am not overly concerned about these error messages on 14.10 with experimental systemd. In conclusion I believe patch v1 addresses the automount problem on Xubuntu 14.04 and is ready for review. Curtis
Hi Curtis, Just to let you know that I am working on reviewing and testing this. Setting up a couple of extra VMs so that I can test properly. Mike
Hi Curtis, I've tested this by running sh -x gparted script wrapper and creating a partition. Test is that the newly created file system isn't automounted. Passed on these distro: CentOS 5, 6, 7 Fedora 21 Kubuntu 14.04 LTS Ubuntu 14.10 I've pushed the patch from comment #2 above to the GParted GIT repo. If available use udisks2-inhibit to prevent automounting (#745349) https://git.gnome.org/browse/gparted/commit/?id=4acb8e4fbb9e01d33cc1e9fd89686a3818050690 Thanks, Mike
This enhancement was included in the GParted 0.22.0 release on March 23, 2015.
> Daemon? File? Test > Distro udisksd udisks2-inihibit Result > --------------- ------- ---------------- ----------------- > Debian 8* No No Not sure why this is listed as "No"? Debian 8 here has both: $ ps -ef | grep udisksd root 1839 1 0 Mar31 ? 00:00:07 /usr/lib/udisks2/udisksd --no-debug $ ls /usr/lib/udisks2/udisks2-inhibit /usr/lib/udisks2/udisks2-inhibit* udisks2 is a dependency of gvfs, which a lot of packages depend on, so it will be present on many desktop systems.
(In reply to Chris Bainbridge from comment #6) > > Not sure why this is listed as "No"? Debian 8 here has both: Hi Chris, With Debian 8 not yet officially being released, the difference is likely due to how and when it was created. Mine is an older copy that has been upgraded. Either way it is not relevant as the testing covered both with and without udisksd. Curtis