You are not logged in.

#1 2025-04-08 08:19:57

ruffy
Member
Registered: 2017-06-10
Posts: 71

[SOLVED] mount issue NTFS external HDDs

Hi,

I have a problem with two NTFS formatted external hard drives (I need NTFS to stay compatible with Windows and Mac, because  of my family).
I always followed the following steps for using them

  1. udisksctl mount -b /dev/sdaX

  2. ...do some stuff with the HDD...

  3. sync

  4. udisksctl unmount -b /dev/sdaX

  5. udisksctl power-off -b /dev/sdaX

Since several days, after doing this I cannot mount them again and they fail with

Error mounting /dev/sdd2: GDBus.Error:org.freedesktop.UDisks2.Error.Failed: Error mounting /dev/sdd2 at /run/media/user/Drive: wrong fs type, bad option, bad superblock on /dev/sdd2, missing codepage or helper program, or other error

or similarly

Error mounting /dev/sdd2: GDBus.Error:org.freedesktop.UDisks2.Error.Failed: Error mounting /dev/sdd2 at /run/media/user/Drive: fsconfig() failed: No such file or directory

In dmseg I see the following

[ 4828.524092] ntfs3(sdd2): It is recommened to use chkdsk.
[ 4828.532243] ntfs3(sdd2): volume is dirty and "force" flag is not set!

I have tried already "ntfsfix", but the only thing which helps is the chkdsk tool in Windows. After this I can use them once.

Does anybody know what the problem is? I did not find any good reason for that.

Thank you!

EDIT:
I forgot to mention that I have already tried https://wiki.archlinux.org/title/Udisks … nt_failing and https://wiki.archlinux.org/title/Udisks … dependent)

Last edited by ruffy (2025-04-09 12:08:00)

Offline

#2 2025-04-08 12:51:15

eriefisher
Member
Registered: 2025-02-01
Posts: 28

Re: [SOLVED] mount issue NTFS external HDDs

For removable drives I have found exfat to be more reliable and is still compatible with MS and Mac.


I Am Canadian!

Offline

#3 2025-04-09 04:12:42

GreenBackbone
Member
From: Tijuana, Mex
Registered: 2015-06-17
Posts: 35

Re: [SOLVED] mount issue NTFS external HDDs

i have found upon trial and error that in my case this error is resolved when i connect that hard disk to a windows system and do a check disk in it and then it always has orphan blocks that it cleans, after that i can mount it again on linux, this happens to me sporadically..
i usually pass through the usb to a win7 vm and i do the scan there...

Last edited by GreenBackbone (2025-04-09 04:15:33)


Peace and Love to All!

Offline

#4 2025-04-09 06:43:26

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,775

Re: [SOLVED] mount issue NTFS external HDDs

Does anybody know what the problem is?

Unclean detachment from any host, ie. when you unplug the device from windows or mac OS (or sometimes, despite your elaborations, linux?) the filesystem hasn't been closed before.

For windows, use the "remove safely" thing and also, juts in case, 3rd link below. Mandatory.
Disable it (it's NOT the BIOS setting!) and reboot windows and linux twice for voodo reasons.
The FS doesn't get closed when windows goes hibernating, no matter whether that's called "shutdown" when fast start is enabled.

No idea about macOS, but it's posix, so umounting the device should be absolutely possible.

If that's not it and the problem is strictly related to the described workflow, try to adjust that:

  1. udisksctl mount -b /dev/sdaX

  2. ...do some stuff with the HDD...

  3. sync

  4. udisksctl unmount -b /dev/sdaX

  5. get a cup of coffee

  6. udisksctl power-off -b /dev/sdaX

The disk might use an internal cache and lazy writing, so if you kill its power, it doesn#t actually complete the necessary write actions and you end up w/ an inconsistent filesystem.

Offline

#5 2025-04-09 12:00:55

ruffy
Member
Registered: 2017-06-10
Posts: 71

Re: [SOLVED] mount issue NTFS external HDDs

eriefisher wrote:

For removable drives I have found exfat to be more reliable and is still compatible with MS and Mac.

would have been the better solution maybe...

GreenBackbone wrote:

i have found upon trial and error that in my case this error is resolved when i connect that hard disk to a windows system and do a check disk in it and then it always has orphan blocks that it cleans, after that i can mount it again on linux, this happens to me sporadically..
i usually pass through the usb to a win7 vm and i do the scan there...

Seems like this happens currently all the time. For me the only way to solve this is indeed chkdisk...

Offline

#6 2025-04-09 12:06:57

ruffy
Member
Registered: 2017-06-10
Posts: 71

Re: [SOLVED] mount issue NTFS external HDDs

seth wrote:

Does anybody know what the problem is?

If that's not it and the problem is strictly related to the described workflow, try to adjust that:

  1. udisksctl mount -b /dev/sdaX

  2. ...do some stuff with the HDD...

  3. sync

  4. udisksctl unmount -b /dev/sdaX

  5. get a cup of coffee

  6. udisksctl power-off -b /dev/sdaX

The disk might use an internal cache and lazy writing, so if you kill its power, it doesn#t actually complete the necessary write actions and you end up w/ an inconsistent filesystem.

Currently I am using this disk only with Linux (sorry I was not clear in the beginning on this).

Ahhh, that could make the change - haven't thought about this.
After unmount I always immediately executed power-off. I will try this for sure, maybe the problem then disappears...

Thanks, all. Marking this as solved for now.

Offline

Board footer

Powered by FluxBB