You are not logged in.
Pages: 1
Hi all,
Noticed something quite peculiar in the past few months (since February) where any new files that I create on an NTFS partition, the file gets created but whenever I try to put data into it, it doesn't write into the file. This issue doesn't seem to affect existing files for some reason.
So for example, if I do the following:
echo "test123" > test.txt
The file system will look like this:
total 64
drwxr-xr-x 1 root root 0 Apr 12 18:18 .
drwxrwxrwx 1 root root 65536 Apr 12 18:18 ..
-rw-r--r-- 1 root root 0 Apr 12 18:18 test.txt
This happens no matter which directory it happens in.
I'm not sure what's causing this, I have tried different mount options in ntfs3 but it doesn't seem to fix the issue. Here are my mount options:
/dev/sda2 on /mnt/workspace type ntfs3 (rw,nosuid,nodev,noexec,relatime,uid=0,gid=0,iocharset=utf8,prealloc,user)
/dev/sda1 on /mnt/data type ntfs3 (rw,nosuid,nodev,noexec,relatime,uid=65534,gid=984,fmask=0113,dmask=0002,iocharset=utf8,prealloc,user)
The /mnt/data mount options were my original mount options, to try to troubleshoot the issue, I tried the /mnt/workspace mount options but that didn't seem to fix the issue.
Currently running Arch Linux on kernel 6.2.10. Has anyone come across this issue before?
Thanks!
Offline
Does that happen immediately or after reboot?
Do you use hibernation (suspend to disk) in either Linux or Windows (fast boot or whatever they call it)?
Offline
Does that happen immediately or after reboot?
Do you use hibernation (suspend to disk) in either Linux or Windows (fast boot or whatever they call it)?
Thanks for the response. It happens immediately, no data actually gets written to the file even though file was created.
No, I don't use suspend to disk in either OS.
What I have found is that by downgrading from 6.2 to 6.1 LTS, the problem seems to be fixed. I think there's either a bug in the Linux 6.2 branch or it might be specific to the Arch Linux 6.2 kernel, not sure which one. There doesn't seem to be any kernel logs generated from ntfs3 driver relating to this.
Offline
This issue doesn't seem to affect existing files for some reason.
So
echo "test123" > test.txt
echo "test123" > test.txt
writes the contents into the file?
Or just
echo "test123" > test.txt
echo "test123" >> test.txt
No, I don't use suspend to disk in either OS.
You don't, but windows does.
3rd link below. Mandatory.
Disable it (it's NOT the BIOS setting!) and reboot windows and linux twice for voodo reasons.
Offline
Hello, new to these forums. Actually a Gentoo user but nevermind since I am running into the same issue as OP. On my system, I have definitely disabled hibernation. I only started having this issue recently, before, ntfs3 worked as expected for months already. Likely, this issue isn't distro specific and something kernel level?
Offline
This issue doesn't seem to affect existing files for some reason.
So
echo "test123" > test.txt echo "test123" > test.txt
writes the contents into the file?
Or just
echo "test123" > test.txt echo "test123" >> test.txt
No, I don't use suspend to disk in either OS.
You don't, but windows does.
3rd link below. Mandatory.
Disable it (it's NOT the BIOS setting!) and reboot windows and linux twice for voodo reasons.
Any files created on an NTFS partition with kernel 6.2 is affected it seems. Files created on prior kernel series can be modified without issues.
Downgrading it to Linux 6.1 LTS seems to have solved the issue. There's likely a bug in the NTFS3 filesystem driver in Linux 6.2 that creates files that you cannot append data to it.
Hello, new to these forums. Actually a Gentoo user but nevermind since I am running into the same issue as OP. On my system, I have definitely disabled hibernation. I only started having this issue recently, before, ntfs3 worked as expected for months already. Likely, this issue isn't distro specific and something kernel level?
Ah so it looks to be a general Linux 6.2 regression. Not sure how to report kernel bugs especially without logs but hopefully someone else more knowledgeable about kernel development can assist here.
Last edited by deltatux (2023-04-16 04:16:36)
Offline
Did you check integrity with chkdsk?
sys2064
Offline
https://bugzilla.kernel.org/show_bug.cgi?id=217130#c1
=> https://www.spinics.net/lists/ntfs3/index.html
Perhaps interesting:
https://www.spinics.net/lists/ntfs3/msg01656.html
6.2 patch(es):
https://github.com/torvalds/linux/commi … afb839bd6d
Did you check integrity with chkdsk?
=> Do the empty files survive a re-mount?
Offline
I had to force restart and now that drive is unreadable by ntfs3.
EDIT: Had to install ntfs-3g and use `ntfsfix` as root, which allowed me to access the filesystem, but ntfs3 still had issues with it being in fstab so I switched that to use ntfs-3g.
Last edited by YAOMTC (2023-04-17 03:34:18)
Offline
Sorry for necroposting, but I figured it out. Currently on kernel version 6.7.1, ensure you don't have `sys_immutable` in your `/etc/fstab`. Separately, disable drive compression via Windows. You don't have to wait for it to decompress everything, just whatever flag ntfs uses to indicate files should be compressed on write needs to be off. Now file read writes work as expected...
EDIT: Bug report found, but not for sys_immutable, guess thats a separate bug. maybe not reported yet?
https://bugzilla.kernel.org/show_bug.cgi?id=218180#c27
Last edited by Interpause (2024-02-03 14:05:06)
Offline
Pages: 1