" itemprop="description"/>

JSE's Blog

Jonah's blog is here

Udevil, automounting, and improving NTFS performance - the short version

- Posted in Uncategorized by

So someday I'd like to write more about NTFS and Linux support of the Microsoft designed file system overall, however too much to do now -- like redesign this blog, so perhaps I'll do this some other day.

What I wanted to write about today is simply a quick tweak I do on many linux distros that helps improve NTFS performance, and make mounting filesystems instant like windows. This makes, for example, having multiple disks easy to work with without having to muck around with /etc/fstab if you have a disk you want to work out of instantly upon boot without having to manually mount them -- something I occasionally do.

Anyhow, to do this, I use a daemon called "udevil" (a play on udev). "udevil" will automatically mount filesystems as soon as they're connected, and it has the added bonus of you being able to specify which mount options you want as well.

Because one thing you might realise about NTFS support (using ntfs-3g, the FUSE ntfs driver that pretty much every distro currently uses) is it is crazy slow. Thankfully, there is a mount option called "big_writes" which you can apply to NTFS-3G which speeds up write operations. There's discussions on the internet about what this does but the tl;dr of it is: 1. It makes NTFS write operations faster on linux 2. It's safe to use (so why isn't it default!?!?)

Now of course, you can always just mount ntfs manually with big_writes and not use udevil. In my cause this isn't convenient so the rest of this post is about automating this task.

So first, install udevil on your distro: Debian/Ubuntu: sudo apt install udevil Arch/Manjaro: sudo pacman -Syu udevil

Next, go to /etc/udevil and edit the file udevil.conf

Scroll down to the "default_options" section and find the line default_options_ntfs. You will see a number of options there which udevil will use when it automounts ntfs drives, with each option separated by a comma. At the end of the line, add the option big_writes after a comma.

Next, scroll down a bit more and you'll see allowed_options. Add big_writes to allowed_options as well. You will likely notice there is no allowed_options_ntfs section on most distros. You are free to add this if you like, however there is no harm in my opinion to just add it to allowed_options.

Save and exit the file.

Now, I'm going to presume you use systemd. You must enable a service called "devmon" to make everything work. Devmon requires a username specified, in my cause, my user on my system is jse, so simply running: sudo systemctl enable [email protected] Will enable the service.

To avoid rebooting and use devmon now, you can then run sudo systemctl start [email protected]

And of course, if you change the config, go ahead and restart the service. Don't forget if you misconfigure it (such as forget to add the mount option to allowed_options which is what I initially did lol), log files are your saviour ;)

Hope this helps. Enjoy the automounting and better NTFS performance! :)