12

I want to mount usb drives with option flush (or sync).

I'm using Kubuntu 10.10 and as far as I understood udisks is responsible for the mount options. I've read various threads and two solutions are proposed:

  1. edit fstab for every usb drive,
  2. change default options in drives.c of the udisks package.

Is there really no decent way?

enzotib
  • 93,831
Somebody
  • 151

3 Answers3

2

The ability to modify the allowed and default mount options is now available in udisks2 as of version 2.9.0. See the documentation here for how to configure default and allowed mount options.

I needed this functionality in order tweak the default Btrfs mount options. Since 2.9.0 isn't shipped with Ubuntu 18.04 or 20.04 I also wrote up a tutorial on how to install it from source on Ubuntu 18.04 here for anyone who is interested.

2

I think there isn't.

But you can try a workaround: using udev rules to override the udisks options by creating your own /etc/udev/rules.d/*.rules file; for details see this great Archlinux site.

arrange
  • 14,959
  • Should I create that file 11-media-by-label-auto-mount.rules? I have only the 70-persistent-cd.rules and 70-persistent-net.rules in /etc/udev/rules.d/. – The Student Sep 19 '11 at 16:28
  • 1
    Answered at: http://askubuntu.com/questions/61448/how-to-configure-to-record-data-to-pendrive-instantly – The Student Sep 23 '11 at 12:32
1

There seems to be a promising workaround: udisks-glue. See the man page for it's configuration file: udisks-glue.conf. I haven't tried it yet, but it may well be solution. It accepts mount options, but also a "post_mount_command".

mivk
  • 5,312