Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Dolphin automount with flush option
Dolphin automount with flush option
How to set Dolphin to automount removable drives with flush option, so that USB sticks work properly?
- sunrat
- Administrator
- Posts: 6495
- Joined: 2006-08-29 09:12
- Location: Melbourne, Australia
- Has thanked: 118 times
- Been thanked: 476 times
Re: Dolphin automount with flush option
I have no idea what flush option is, please explain.
Presumably you're using KDE Plasma with Dolphin, go to System Settings, Removable storage, and set automount with the options you want.
Presumably you're using KDE Plasma with Dolphin, go to System Settings, Removable storage, and set automount with the options you want.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
Re: Dolphin automount with flush option
See if anything in here helps:
https://forums.linuxmint.com/viewtopic.php?t=152459
https://forums.linuxmint.com/viewtopic.php?t=152459
Re: Dolphin automount with flush option
Flush is a mount option which makes sure that data is immediatly copied to a pendrive instead of residing in cache. Prevents data loss (well, kind of).
Workaround I found is using udevil with it's devmon daemon. It handles automounting and lets you choose mount options.
EDIT: Apparently flush IS a default mount option. It's just that Linux doesn't handle removable devices well. Too bad
Workaround I found is using udevil with it's devmon daemon. It handles automounting and lets you choose mount options.
EDIT: Apparently flush IS a default mount option. It's just that Linux doesn't handle removable devices well. Too bad
- sunrat
- Administrator
- Posts: 6495
- Joined: 2006-08-29 09:12
- Location: Melbourne, Australia
- Has thanked: 118 times
- Been thanked: 476 times
Re: Dolphin automount with flush option
I just found it in man mount. It's for fat filesystems only and not default.kdeready wrote:Flush is a mount option which makes sure that data is immediatly copied to a pendrive instead of residing in cache. Prevents data loss (well, kind of).
Workaround I found is using udevil with it's devmon daemon. It handles automounting and lets you choose mount options.
EDIT: Apparently flush IS a default mount option. It's just that Linux doesn't handle removable devices well. Too bad
I never had an issue with usb drives, just make sure to select "Safely Remove" (or sync if on CLI) before removing.flush
If set, the filesystem will try to flush to disk more early than normal. Not set by default.
Good you found another way, sounds like it's a better way.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
Re: Dolphin automount with flush option
That's good advice, I have always had trouble if I remove a device when the writes are not finished.sunrat wrote: I never had an issue with usb drives, just make sure to select "Safely Remove" (or sync if on CLI) before removing.
resigned by AI ChatGPT
- dilberts_left_nut
- Administrator
- Posts: 5347
- Joined: 2009-10-05 07:54
- Location: enzed
- Has thanked: 13 times
- Been thanked: 66 times
Re: Dolphin automount with flush option
You can also use the 'sync' mount option, but see man mount first.
AdrianTM wrote:There's no hacker in my grandma...
Re: Dolphin automount with flush option
KDE uses udisksctl command, not mount. Here's a changelog of udisks2:sunrat wrote: I just found it in man mount. It's for fat filesystems only and not default.
http://metadata.ftp-master.debian.org/c ... _changelog
It mentions flush only once:
I don't know how to check that though. When I use "udisksctl monitor" it doesn't show mount options used. Same with devmon when used for monitoring only.udisks2 (1.99.0+git20120919-1) experimental; urgency=low
* Update to current upstream git head:
(...)
- Mount vfat with "flush" option
(...)
That's something I like about Windows - you don't have to do that. When file transfer window disappears, it means that data has been copied. On Linux it can still take a while (if your pendrive doesn't have a led indicator, you don't know how long). I'm trying to make a fool-proof PC, so it matters.sunrat wrote:I never had an issue with usb drives, just make sure to select "Safely Remove" (or sync if on CLI) before removing.
Good you found another way, sounds like it's a better way.
Unfortunately sync cuts write speed by about 80% (on a pendrive I tested). Devmon suggests using flush for fat and sync for ntfs, so it probably works better with ntfs.dilberts_left_nut wrote:You can also use the 'sync' mount option, but see man mount first.
- dilberts_left_nut
- Administrator
- Posts: 5347
- Joined: 2009-10-05 07:54
- Location: enzed
- Has thanked: 13 times
- Been thanked: 66 times
Re: Dolphin automount with flush option
Well, of course.kdeready wrote:Unfortunately sync cuts write speed by about 80% (on a pendrive I tested). Devmon suggests using flush for fat and sync for ntfs, so it probably works better with ntfs.dilberts_left_nut wrote:You can also use the 'sync' mount option, but see man mount first.
What you said you want is every write written to the device immediately, which means lots of writes to a slow device, which is why write caching exists in the first place.
What you are seeing is the actual write speed of your device, which doesn't change with the mount option, it's just masked by the cache saying "job done" before the data is physically written.
You can also adjust the commit time, but that still leaves a window of unwritten data, which you claim not to want.
AdrianTM wrote:There's no hacker in my grandma...
Re: Dolphin automount with flush option
Sync doesn't give you the actual speed, it makes things much slower in real terms. The same file copies a few times faster without it.
One thing that makes file transfers much cleaner is setting dirty_ratio and dirty_background_ratio to lower numbers.
To do that you have to add these lines to /etc/sysctl.conf
vm.dirty_background_ratio=5
vm.dirty_ratio=10
These are my settings for now, they depend on the amount of RAM you have. Even Linus Torvalds wrote about it some time ago:
http://yarchive.net/comp/linux/dirty_limits.html
One thing that makes file transfers much cleaner is setting dirty_ratio and dirty_background_ratio to lower numbers.
To do that you have to add these lines to /etc/sysctl.conf
vm.dirty_background_ratio=5
vm.dirty_ratio=10
These are my settings for now, they depend on the amount of RAM you have. Even Linus Torvalds wrote about it some time ago:
http://yarchive.net/comp/linux/dirty_limits.html