Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
NTFS partition does not mount
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
sad_dam
n00b
n00b


Joined: 07 May 2018
Posts: 23

PostPosted: Fri Oct 29, 2021 8:56 am    Post subject: NTFS partition does not mount Reply with quote

One of my external hard drives with NTFS partition has stopped mounting, in ubuntu it works ok, what might be the problem in Gentoo? Could you help me please?
Quote:
ntfs_attr_pread_i: ntfs_pread failed: Input/output error
Failed to read NTFS $Bitmap: Input/output error
Failed to read NTFS $Bitmap: Input/output error
NTFS is either inconsistent, or there is a hardware fault, or it's a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. The usage of the /f parameter is very
important! If the device is a SoftRAID/FakeRAID then first activate
it and mount a different device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
for more details.
Failed to sync device /dev/sdb2: Input/output error
Failed to close volume /dev/sdb2: Input/output error
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54236
Location: 56N 3W

PostPosted: Fri Oct 29, 2021 4:18 pm    Post subject: Reply with quote

sad_dam,

That looks like a hardware error somewhere in the data link.
HDD failure cannot be ruled out but as it works in ubuntu, that's unlikely.

Which NTFS filesystem driver do you use in both distros?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
sad_dam
n00b
n00b


Joined: 07 May 2018
Posts: 23

PostPosted: Fri Oct 29, 2021 6:15 pm    Post subject: Reply with quote

NeddySeagoon wrote:
sad_dam,

That looks like a hardware error somewhere in the data link.
HDD failure cannot be ruled out but as it works in ubuntu, that's unlikely.

Which NTFS filesystem driver do you use in both distros?

Not only in ubuntu, in windows it works too. Here he also worked once, but it seems that something went wrong
I have ntfs-3g 2017.3, do you mean this driver?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54236
Location: 56N 3W

PostPosted: Fri Oct 29, 2021 6:42 pm    Post subject: Reply with quote

sad_dam,

Yes. There is a kernel NTFS driver too.

Gentoo has two versions of sys-fs/ntfs3g. 2017.3.23.5-r1 is stable and 2021.8.22 is in testing.
It way be useful to try the testing version.

The 5.16 kernel, which is not released yet, has a new NTFS driver too.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21629

PostPosted: Fri Oct 29, 2021 6:58 pm    Post subject: Reply with quote

Is the Ubuntu install on a different drive in the same system as Gentoo, or is it a separate computer? I wonder if the link between the Gentoo computer and external drives in general is bad, and other systems (Ubuntu, Windows) have good connectors/cables for external drives.
Back to top
View user's profile Send private message
sad_dam
n00b
n00b


Joined: 07 May 2018
Posts: 23

PostPosted: Fri Oct 29, 2021 8:06 pm    Post subject: Reply with quote

NeddySeagoon wrote:
sad_dam,
Yes. There is a kernel NTFS driver too.

Everything regarding the NTFS in the kernel, i suppose i included
Quote:
CONFIG_NTFS_FS=y
CONFIG_NTFS_DEBUG=y
CONFIG_NTFS_RW=y

NeddySeagoon wrote:
Gentoo has two versions of sys-fs/ntfs3g. 2017.3.23.5-r1 is stable and 2021.8.22 is in testing.
It way be useful to try the testing version.

I tried both of them

Hu wrote:
Is the Ubuntu install on a different drive in the same system as Gentoo, or is it a separate computer? I wonder if the link between the Gentoo computer and external drives in general is bad, and other systems (Ubuntu, Windows) have good connectors/cables for external drives.

I have the listed systems each on separate ssd, for checking purpose i simply have been inserting them into my laptop and tried to mount my external hdd, so i am sure there is a problem with the gentoo system since i cant mount only on it.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54236
Location: 56N 3W

PostPosted: Fri Oct 29, 2021 9:10 pm    Post subject: Reply with quote

sad_dam,

You have both NTFS drivers available. Which one do you use, the kernel or ntfs3g.
They use different filesystem types.
What filesystem type do you use?

You may have both installed ad chose which to use at mount time.

DEBUG options in the kernel are not for users. They are allowed to interfere with normal kernel operation so should be off.

CONFIG_NTFS_RW=y is not safe. It would not do what you think it does anyway.
It used to trash your NTFS filesystem but its been made safer by limiting what it can do to almost nothing.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
sad_dam
n00b
n00b


Joined: 07 May 2018
Posts: 23

PostPosted: Sat Oct 30, 2021 9:49 am    Post subject: Reply with quote

NeddySeagoon wrote:
sad_dam,

You have both NTFS drivers available. Which one do you use, the kernel or ntfs3g.
They use different filesystem types.
What filesystem type do you use?

Didn't know about it, turns out that kernel driver mounts my hard drive, ntfs3g does not
But i would like to fix ntfs3g (since only with it you can mount drives through the user interface?)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54236
Location: 56N 3W

PostPosted: Sat Oct 30, 2021 11:03 am    Post subject: Reply with quote

sad_dam,

I'm not well informed on NTFS as I have not used it since 2002.
I don't know what "user interface" you refer to either.

NTFS and other non *NIX filesystems, do not support *NIX filesystem permissions, so *NIX permissions must be faked at mount time.
That's the users problem if you use the kernel NTFS driver. I suspect that ntfs3g does it for you.

There is another major difference. Ever if you set CONFIG_NTFS_RW=y in the kernel, write support is limited to changing the content of an existing file as long as the file size does not change. Its effectively read only.
That will be addressed in the 5.15 kernel. As I write, its 5.15-rc7, so any Monday now.

Which NTFS drive do the other distros use?
If its ntfs3g, which version of ntfs3g is it?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
sad_dam
n00b
n00b


Joined: 07 May 2018
Posts: 23

PostPosted: Sat Oct 30, 2021 12:33 pm    Post subject: Reply with quote

NeddySeagoon wrote:
sad_dam,
If its ntfs3g, which version of ntfs3g is it?

Gentoo ntfs-3g 2017.3.23AR.5 integrated FUSE 28 - Third Generation NTFS Driver Configuration type 7, XATTRS are on, POSIX ACLS are on (i also tried to install the new driver)
Ubuntu ntfs-3g 2017.3.23AR.3 integrated FUSE 28 - Third Generation NTFS Driver Configuration type 7, XATTRS are on, POSIX ACLS are on
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54236
Location: 56N 3W

PostPosted: Sat Oct 30, 2021 2:42 pm    Post subject: Reply with quote

sad_dam,

That's the same filesystem driver on both but it only works on Ubuntu.
That makes my head hurt.

In Ubuntu, with the problem partition mounted, what does
Code:
mount
show?

Attempt the mount in Gentoo. Post the mount command you used.
Put the Gentoo dmesg onto a pastebin, after the mount fails.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
sad_dam
n00b
n00b


Joined: 07 May 2018
Posts: 23

PostPosted: Sat Oct 30, 2021 3:59 pm    Post subject: Reply with quote

mount -t ntfs-3g /dev/sdb2 /mnt

Dmesg after hdd usb insertion and the mount command:
Ubuntu https://pastebin.com/U4pxzCwe
Code:
Ubuntu mount (Ubuntu is on live dvd)
/dev/sdb2 on /mnt type fuseblk (rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096)


Gentoo https://pastebin.com/ZqSB6xH9
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54236
Location: 56N 3W

PostPosted: Sat Oct 30, 2021 5:32 pm    Post subject: Reply with quote

sad_dam,

Ubuntu is using USB Attached SCSI (UAS) which makes all the SATA speedups like DMA, NCQ ash so on available over USB3.
Gentoo is using bulk mode, which is like PIO. Either because the drive is not on a USB3 bus or UAS is not enabled in your Gentoo kernel.

However, both dmesgs show errors like
Ubuntu:
[  183.437827] sd 7:0:0:0: [sdb] tag#1 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=2s
[  183.437896] sd 7:0:0:0: [sdb] tag#1 Sense Key : Hardware Error [current]
[  183.437922] sd 7:0:0:0: [sdb] tag#1 Add. Sense: Internal target failure

and
Gentoo:
[  296.961939] sd 6:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x03 driverbyte=0x00 cmd_age=31s
[  296.961943] sd 6:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 00 61 96 d0 00 00 00 f0 00 00
[  296.961953] blk_update_request: I/O error, dev sdb, sector 6395600 op 0x0:(READ) flags 0x84700 phys_seg 2 prio class 0


Both mean you have hardware issues.
for the drive.
Post the output of
Code:
smartctl -x /dev/...
You need UAS for that to work as bulk mode usually does not support the low level commands to the drive that are required.

You have a hardware problem. The smartctl output will help to pin down what/where the problem is.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
sad_dam
n00b
n00b


Joined: 07 May 2018
Posts: 23

PostPosted: Sat Oct 30, 2021 7:52 pm    Post subject: Reply with quote

NeddySeagoon,
Quote:
You need UAS for that to work as bulk mode usually does not support the low level commands to the drive that are required.

Yes indeed, i included UAS into kernel and now my hdd works, thank you very much for all.
Quote:
You have a hardware problem. The smartctl output will help to pin down what/where the problem is.

Well, the main problem is solved, but the fact that the hard disk gives some errors not a big problem as it seems to me (or is it wrong?), because it works like normally, unlike his almost deceased brother what cleared his smart and and has speed around of 0.1 MiB/s.
https://pastebin.com/4xgrreek
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54236
Location: 56N 3W

PostPosted: Sat Oct 30, 2021 8:11 pm    Post subject: Reply with quote

sad_dam,

Code:
Model Family:     Western Digital Green

That's the warning sign.

Code:

ID# ATTRIBUTE_NAME          FLAGS    VALUE WORST THRESH FAIL RAW_VALUE
193 Load_Cycle_Count        -O--CK   001   001   000    -    1259880
196 Reallocated_Event_Count -O--CK   200   200   000    -    0
197 Current_Pending_Sector  -O--CK   200   200   000    -    12


You have exceeded the Load_Cycle_Count for the life of the drive. I knom thatthe limit was a lot less than 1,000,000.
Its normally due to the WDIDLE3 default setting being entirely unsuitable for Linux. This causes excessive head load/unload cycles.

The Current_Pending_Sector count is 12. That is, the drive has 12 sectors that it knows that it cannot read.
The Reallocated_Event_Count is zero, so its not even tried to reallocate those 12 sectors.
That 12 is a minimum. There may be other sectors that the drive cannot read that its not been asked for yet.

The drive can no longer read its own writing. The data in those 12 sectors is probably lost. So its scrap.

How much damage an unreadable sector does depends on the data it contains.
If its file data, that file is lost.
If its a part of a directory, that directory and all the subdirectories are lost.
If it were the root directory ...
When its filesystem metadata damaged, the effect is not predictable.

From the dmesg, we can tell that there is a problem with sectors that the mount command triggers a read of.

The drive is scrap. At best, its a write only drive, like /dev/null.
Do not depend on reading from it for much longer.

Do you need to recover the data, if you can, or do you have validated backups?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
sad_dam
n00b
n00b


Joined: 07 May 2018
Posts: 23

PostPosted: Sat Oct 30, 2021 8:26 pm    Post subject: Reply with quote

Quote:
Do you need to recover the data, if you can, or do you have validated backups?

No, all important files seem to be ok for me, if something is lost, nothing special, but thanks again, i will take note of the advice and will buy the new hdd (Western Digital Gold 10 tb)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54236
Location: 56N 3W

PostPosted: Sat Oct 30, 2021 8:33 pm    Post subject: Reply with quote

sad_dam,

Beware Shinged Magnetic Recording (SMR). If you don't know what that is, you probably want Conventional Magnetic Recording (CMR) drives..
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum