NTFS3 Kernel Module

Technical issues/questions of an intermediate or advanced nature.
tome
Contributor
Contributor
Posts: 676
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Russia is causing the immense damage to humanity
Contact:

NTFS3 Kernel Module

Post#46 by tome » 15 Apr 2024, 08:31

I decided to use ntfs3 at start of porteus, here --> https://www.dropbox.com/sh/gdzuwmrramlv ... kfYbZMrUra are:
1. initrd-tm3.xz that use ntfs3 at boot
2. udev-fstab-update for ntfs3 - with this new ntfs mounts after boot would be also done by ntfs3 driver instead of ntfs-3g (without it ntfs3 at boot only if auto/automount cheatcode)
3. UFSD-utils-from-Root-Mounter-for-Android-by-Paragon-....xzm - some utils like fsck for ntfs, mount_ufsd_fuse - for example to test its speed

Changes to booting of Porteus:
4. If fsck cheatcode is used then ntfs partitions are check with paragon chkntfs -a -f
5. and be pressing any letter(key) while blue background is displayed you can stop booting to read easy output of fsck commands
6. this initrd includes also cheatcodes from this topic:
New initrd.xz and cheatcodes (boot parameters) for Porteus

7. ntfs-3g provide also mount.lowntfs-3g - it uses a lower-level FUSE API, and it seems it's faster than mount.ntfs-3g (amazing?, as fast as the ext4!?)
8. Microsoft NTFS by Tuxera (not ntfs-3g) is a commercial-grade file system implementation that is 6X faster than open-source alternatives.

ad. 1) probably uid=1000,gid=100 would be useful option at boot, now is's omitted
You have mind and feelings. Be wise and clever.

fulalas
DEV Team
DEV Team
Posts: 2055
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

NTFS3 Kernel Module

Post#47 by fulalas » 15 May 2024, 12:29

@tome, have you managed to mount a NTFS folder (using ntfs3 driver) into the union without making the whole folder in union read-only?

I know we can do that using folders from traditional POSIX partitions, like ext4, but I'm failing to so using NTFS. The result is either read-only in union (which is useless) or writable but then it has whiteouts, changes, chaos.

rych
Warlord
Warlord
Posts: 628
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

NTFS3 Kernel Module

Post#48 by rych » 16 May 2024, 13:03

I'm on ntfs3 and unfortunately the following occasionally happens to this day. When I occasionally have a system freeze (I think due to running out of RAM having no swap partition/file set up) and can only restart by long-pressing the power-button, there are NTFS partition problems. Often it's a matter of checking it under Windows and the chkdsk /f finds no errors. But sometimes there are recovered chunks of files that were open(?) at the moment of powering off.

This may be because: "the NTFS3 driver still does not fully support NTFS journaling, i.e. if you lose power to a mounted disk, there's a good chance you'll have corruption" and "a power outage/unclean mount was likely to corrupt something, leaving inconsistencies".

Indeed I remember ntfs-3g was more forgiving and gracious in such situations. I'll keep using ntfs3 for now as it gives me the speed of ext4 but perhaps lowntfs-3g is a better alterative, I'll try to find out.
Last edited by rych on 16 May 2024, 14:44, edited 1 time in total.

fulalas
DEV Team
DEV Team
Posts: 2055
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

NTFS3 Kernel Module

Post#49 by fulalas » 16 May 2024, 13:13

@rych, which kernel are you using?

Have you managed to recover the corrupted files? Have you tried using chkufsd posted by tome (inside initrd)?

rych
Warlord
Warlord
Posts: 628
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

NTFS3 Kernel Module

Post#50 by rych » 16 May 2024, 14:24

fulalas wrote:
16 May 2024, 13:13
which kernel are you using?

Code: Select all

root@porteus:~# uname -r
6.6.20-porteus
fulalas wrote:
16 May 2024, 13:13
Have you managed to recover the corrupted files?
I didn't need them, they are synched from USB in my scenario anyway. Still it's disturbing. Windows (?) when repairing (?) the drive created some folders C:\found.001 or something filled with lost of useless chunks. Anyway, all is now fixable with

Code: Select all

chkntfs /dev/disk/by-label/Windows -f
Although I took it from his UFSD-utils-from-Root-Mounter-for-Android-by-Paragon-2017-2024-04-15_tm.xzm and not the initrd...

Thank you tome, and thanks jjr for communicating the chkntfs (chkufsd) to us. Not sure if it should go inside initrd, but I'll keep it as the above module at all times when using ntfs3. Ntfs3 will occasionally corrupt things, but chkntfs fixes them beautifully. Good partnership :)

fulalas
DEV Team
DEV Team
Posts: 2055
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

NTFS3 Kernel Module

Post#51 by fulalas » 16 May 2024, 19:56

@rych, maybe you should try a newer kernel because I heard many fixes related to ntfs3 have been merged over the last months.

I have been using ntfs3 on kernel 6.9 for 2 days and so far so good. Unfortunately I can't mount NTFS folders into union without having the issues I mentioned here.

EDIT: one thing that is simply amazing regarding ntfs3 is that it allows compatibility with POSIX, meaning we can finally have permission settings. :)

rych
Warlord
Warlord
Posts: 628
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

NTFS3 Kernel Module

Post#52 by rych » 17 May 2024, 09:18

Thanks fulalas, will do for sure, but maybe after it matures a bit further? You've reported this:
fulalas wrote:
13 May 2024, 16:31
Kernel 6.9 is out. However, I noticed a 10% performance drop

Post Reply