You are not logged in.

#1 2014-07-26 18:13:36

PL_kolek
Member
Registered: 2012-02-21
Posts: 41

[SOLVED] How to automount USB drives with flush option using udiskie?

I am using udiskie to automount all removable media and it works great. I have both udisks and udisks2 installed, but as udiskie depends on udisks, I guess it's what is used for mounting. There is one problem: whenever I cp or rsync some files to my pendrive, the command ends too quick and I have to wait after issuing udiskie-umount for the copy to finish. As I found out, the flush option should be the solution.

kolzi@kolzi-laptop ~  % mount | grep USB                                                                                                                                                      :(
/dev/sdb1 on /media/USB DISK type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=100,fmask=0022,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,errors=remount-ro,uhelper=udisks)

This is after udiskie mounted my drive, as you can see there is no flush option, so I suppose async is chosen as the default. If I mount it by hand with -o flush, it shows up.

I know this question was asked a hundred of times (I've seen a couple already) but no thread I found contained the answer. Where and how should I configure my system to mount all USB media with flush option?

Last edited by PL_kolek (2014-07-26 21:05:16)

Offline

#2 2014-07-26 18:21:37

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] How to automount USB drives with flush option using udiskie?

You can set mount options with udiskie https://github.com/coldfix/udiskie/blob … .8.txt#L98

Offline

#3 2014-07-26 19:43:39

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] How to automount USB drives with flush option using udiskie?

man udiskie | less -p configuration

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2014-07-26 21:09:19

PL_kolek
Member
Registered: 2012-02-21
Posts: 41

Re: [SOLVED] How to automount USB drives with flush option using udiskie?

Thank you, it worked! I checked Arch wiki and Google, but forgot about man... Shame on me. What's even worse, I had ~/.config/udiskie/filters.conf which did exactly what I wanted. It must have stopped after some update.

Offline

#5 2014-07-26 21:22:51

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] How to automount USB drives with flush option using udiskie?

I had to run

man udiskie | less -ip ^configuration

to get straight to the right part.

Offline

#6 2014-07-26 21:26:37

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] How to automount USB drives with flush option using udiskie?

It's a short man page; I figured a general pointer was sufficient... tongue


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2014-07-26 21:39:26

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] How to automount USB drives with flush option using udiskie?

I still have nightmares about that time I was searching bash man page for 'invocation' ... a couple times ... before I figured out I had to make the search case-insensitive.
Another "funny" thing:

$ man bash | less -pi invocation
invocation: No such file or directory

Last edited by karol (2014-07-26 21:40:22)

Offline

Board footer

Powered by FluxBB