Linux Storage management
#1
Hello all,

I do use Kodi on a dedicated appliance on top of a plain Xserver. No underlying WM/DM is running, which would manage removable storage (ODDs, USB HDDs) for a regular user compareable to what happens on a typical desktop platform - mount/umount as a user. This used to be done by Kodi and udisks1 for me.

Since udisks1 is deprecated for a while now I wanted to switch to an alternative solution. What I can tell from the sources, Kodi does not provide an interface to fill this gap. There does not seem to exist a oob solution right now and it seems to be like it is impossible without udisks1 to safely umount a device from within Kodi.

Judging from https://github.com/xbmc/xbmc/tree/master...rage/linux we have interfaces for a couple of things:

+ devicekit (deprecated)
+ udev (supports only embedded systems with root only access, love goes to embedded see comment and pr https://github.com/xbmc/xbmc/pull/4158)
+ udisks1 (deprecated)

This might not a problem for a classic desktop or an embedded system. But it does not fill the gap between both of these.

Currently a couple of utils come into my mind to fill the udisks1 gap:
+ udisks2
+ udevil (in a way similar to pmount (support was removed years ago in favor of udisks1 iirc))

If I'm missing something in order to mount and umount automatically as a regular user from within Kodi without udisks1 then just let me know please. Smile

Cheers
Reply
#2
for instance usbmount with specified "users" mount option.
Reply
#3
This is not a general solution since it is not available across all linux distributions.
Reply
#4
Isn't the most straight forward solution to use a patch from OpenElec to support `udevil --umount` instead/in addition of/to plain posix `umount`?
See: https://github.com/OpenELEC/OpenELEC.tv/...747b35001f

Regular desktop users will get their storage managed by the underlying WM/DM anyway while users running Kodi in a standalone mode/scenario would benefit from udevil and devmon thus being able to drop the need for udisks.
Reply
#5
the easiest is this:

rename umount, create script wrapper calling it via sudo. allow yourself to call umount via sudo wo password (it will take you 2 minutes).

Code:
mv /bin/umount /bin/umount.bin
cat << \EOF > /bin/umount
#!/bin/sh

sudo /bin/umount.bin $@
EOF
chmod +x /bin/umount

then start visudo and add line:
Code:
[MYUSERNAME] ALL=(ALL) NOPASSWD: /bin/umount.bin
Reply

Logout Mark Read Team Forum Stats Members Help
Storage management0