What's automounting SATA partitions in 13.2?

Hi,
what is attempting to mount SATA hard disk partitions in openSUSE 13.2 (Harlequin) (x86_64) (with KDE Platform Version 4.14.9)?

I’ve recently installed a second SATA hard disk that has a couple of partitions with other Linux distros on them (on /dev/sdc). I’ve also a USB attached 500gb backup disk, which I have absolutely no problem with at all, it behaves itself beautifully. It’s just the SATA hard disk that I have problems with.

Periodically I get a KDE notification popup (about once every 8-10 minutes) telling me that it was unable to mount a partition, as it did not have the authorisation. This suggest to me that it (whatever “it” is) is running under my user. The syslog only shows this:

my-computer kernel:  1876.048394]  sdc: sdc1 sdc2 sdc3 < sdc5 >

If I try (as an experiment) to mount the second hard disk’s partitions using the “devices” panel in Dolphin, I get the same error message, both in Dolphin and in the KDE notification pop-up. If I try the same thing while using Dolphin as the superuser, it happily mounts the partitions and I stop getting the periodic pop-up failure message.

I don’t actually need access to the second hard disk’s partitions most of the time, so do not need this auto-mounting to happen. Which is why I’m trying to find out what is attempting to auto-mount on my (normal user) behalf, so that I can stop it.

Any ideas?

thanks
Nerderello

Is it in your /etc/fstab?

That’s probably “systemd” attempting to mount. But it only does that if you somewhere have configuration telling it to mount. So, check “/etc/fstab”.

Hi,

thanks for the replies.

No I don’t think that it’s a fstab thing. I added the following to /etc/fstab after the auto-mounts pop-ups started to happen, hoping that the “noauto” would stop it (it didn’t):


/dev/disk/by-id/ata-SAMSUNG_HD321KJ_S0MQJ1DQ100730-part1 /mnt/Linux-Lite    ext4 defaults,noauto,users,rw        0 0

I’ve also checked to see if there is anything in /etc/udev/rules.d which may be about it (only have rules for 55-libsane.rules, 56-sane-backends-autoconfig.rules and 70-persistent-net.rules). And there doesn’t seem to be anywhere to configure the likes of “udisks”.

cheers
Nerderello

And it is formatted ext4?

Run (as root)

mkinitrd

It’s possible that the initrd has some stale information that is telling systemd to mount that.

Make sure that the partition is not mounted when running “mkinitrd” (just in case it checks that). Then see what happens after the next reboot.

And yes – in case it wasn’t obvious – I’m guessing here.

Yes, it’s a good old fashion ext4 partition.

I’ll give the mkinitrd a go and let you know.

regards
Nerderello

Periodically I get a KDE notification popup (about once every 8-10 minutes) telling me that it was unable to mount a partition, as it did not have the authorisation. This suggest to me that it (whatever “it” is) is running under my user.

I suspect udiskd is the culprit. That allows DE’s to manage/handle mounting via D-Bus

http://udisks.freedesktop.org/docs/latest/

Monitor with

udisksctl monitor

The Device Notifier can be configured to inhibit mounting of ‘removable’ storage devices that have not been mounted before etc.

Many thanks for all the response.

I tried both “udisksctl monitor” and “dbus-monitor” which both showed the activity (adding then removing the partition), but not what was asking for this to be done.

So, in the end, I gave up and added the partition to /etc/fstab with “auto”, so it is mounted when I boot up. I also created a backup version of fstab without this, because I know that when I start playing with the second disk’s partitions, I’ll, at one point or another, delete the partition and then be unable to logon to OpenSuse graphically the next time (had this problem before, as I’m always mucking around with unused partitions).

thanks
again

Nerderello

It is ‘udisksd’ that is responsible for managing storage devices (not already defined in /etc/fstab) in conjunction with the DE, and it is polkit that governs the access controls (which can be adjusted by the administrator as/when required).

From ‘man udisksd’

NAME
udisks - Disk Manager

DESCRIPTION
udisks provides interfaces to enumerate and perform operations on disks and storage devices. Any application
(including unprivileged ones) can access the udisksd(8) daemon via the name org.freedesktop.UDisks2 on the system
message bus[1]. In addition to the D-Bus API, a library, libudisks2 is also provided. This library can be used from
C/C++ and any high-level language with GObjectIntrospection[2] support such as Javascript and Python. udisks is only
indirectly involved in what devices and objects are shown in the user interface. See these notes[3] for what is
shown in GNOME 3.

ACCESS CONTROL
By default, logged-in users in active log-in sessions are permitted to perform operations (for example, mounting,
unlocking or modifying) on devices attached to the seat their session is on. Access-control is fine-grained and
based on polkit(8), see the “Authorization Checks” chapter in the udisks documentation for more information. Note
that the x-udisks-auth option can be used in the /etc/fstab and /etc/crypttab files to specify that additional
authorization is required to mount resp. unlock the device (typically requiring the user to authenticate as an
administrator).

DRIVE CONFIGURATION
At start-up and when a drive is connected, udisksd(8) will apply configuration stored in the file
/etc/udisks2/IDENTIFIER.conf where IDENTIFIER is the value of the Drive:Id property for the drive. If the file
changes on disk its new contents will also be applied to the drive. Typically, users or administrators will never
need to edit drive configuration files as they are effectively managed through graphical applications such as gnome-
disks(1). Manually editing configuration files is however supported — the file format is a simple .ini-like format
(see the Desktop Entry Specification[4] for the exact syntax). New groups and keys may be added in the future.

So, in the end, I gave up and added the partition to /etc/fstab with “auto”, so it is mounted when I boot up. I also created a backup version of fstab without this, because I know that when I start playing with the second disk’s partitions, I’ll, at one point or another, delete the partition and then be unable to logon to OpenSuse graphically the next time (had this problem before, as I’m always mucking around with unused partitions).

That’s a good way to go. Partitions defined in /etc/fstab are not touched by udisksd.

As you’ve described the KDE Desktop has its own mount functionality and will attempt to automount partitions not already mounted (because the Desktop loads after the system. This also enables and supports hot-plugging storage devices).

Although the above is truly your answer, partitions can also be mounted by (short list)

  • /etc/fstab
  • various systemd services (used to be only one mount service, now there appear to be several)
  • manual mounts configured a number of different ways and places, including in grub or a script.

TSU