You are not logged in.
I'm trying to mount my USB flash drives with the sync option automatically, in hopes that it will provide me with more accurate progress displays when copying large files to them with Nautilus.
My current approach is to try and use an appropriate udev rule. Currently, I have this:
$ cat /etc/udev/rules.d/10-sync-usb-media.rules
ACTION=="add", BUS=="usb", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="rw,suid,dev,exec,auto,nouser,sync,relatime"
I took the mount options from defaults, and just modified the async one to say sync.
This doesn't work, when I look at the mount options used for my flash drive, it still isn't synchronized:
$ mount | grep USBKey
/dev/sdd1 on /run/media/rob/USBKey type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)
What would be the right way to get the result I desire?
Offline
Does it work if you mount it by hand? Do you get more accurate progress displays?
Offline
Please search before posting, this has been covered a lot of times in the past. The general consensus is that sync is bad and slow, and you should use flush instead.
Also, don't use udev rules. Use udisks, or a wrapper.
https://www.google.co.uk/search?q=site: … c+transfer
https://wiki.archlinux.org/index.php/US … ge_Devices
https://wiki.archlinux.org/index.php/Udev#Udisks
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
BTW if you really want the sync option, you can use devmon (part of udevil package) to accomplish this. It includes a "--sync" or "-s" flag.
Offline