Bug 2208168 - NTFS Partitions Corrupted Fedora KDE
Summary: NTFS Partitions Corrupted Fedora KDE
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: ntfs-3g
Version: 38
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-05-18 08:13 UTC by Pete
Modified: 2023-07-25 10:40 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Pete 2023-05-18 08:13:20 UTC
Disks formatted in NTFS become corrupt (NVME and external USB SSD) after writing data to them, then restarting and going into another OS (Windows or Linux). Need to run scandisk to fix errors, then the drive can be opened in another OS. 

When I restart I'm not unmounting the drive, just restarting. However it doesn't seem to matter whether I unmount the drives anyway as they still become corrupt like the drive wasn't unmounted correctly.

Problem started in Fedora KDE 36 (where I noticed it) from about 2 weeks ago with that update. I've upgraded to Fedora 38 and problem is still there. It also affects Nobara 37 (as thats using Fedora as a base).

Reproducible: Always

Steps to Reproduce:
1. Open Dolphin
2. Click to mount NVME drive formatted in NTFS
3. Write data to a folder on drive
4. Try and run an app in fedora that uses that location (such as FreeFileSync)
5. App won't be able to access that folder as its corrupt
6. Click restart button in Fedora
7. Computer restarts and goes to GRUB menu, select windows (or any other OS)
8. Once OS is up and running, open a file manager
9. OS reports that the folder cannot be read and is corrupt
10. Run scandisk (or Error Checking) and Select fix error.
Actual Results:  
Disk is able to be mounted and read again by both Windows and Fedora, until you write to it again in Fedora.

Expected Results:  
Not corrupted the drive

I first noticed that the issue when running Nobara 37 and using an external USB SSD. I figured it might be an issue with that distro. Then also noticed it in Fedora 36 with an internal NVME drive. 

If in an app I tried to open a location and select a drive that was unmounted, normally if you click on the drive, a pop would appear for your password to mount it. This it didn't do and just said the disk couldn't be mounted in Fedora. I had also just recently done an update in Fedora 36. Even selecting a previous version (from the GRUB menu), the error was still there. 

I figured there might be an issue with Fedora 36, so decided to update to the latest Fedora - 38 (using command line). The error is in that as well.

While I haven't lost data, it might very well be an issue. At the moment, I can't trust using Fedora or any of it's spins until the issue is corrected.

Comment 1 Jean-Pierre André 2023-05-22 10:01:49 UTC
Which NTFS driver are you using ?

If you do not know please post the full mount command you use to mount the NVME device.

Alternately please trigger the mounting, then post the output of :
ps -eaf | grep ntfs

Comment 2 Pete 2023-05-22 10:21:26 UTC
I'm not sure which driver, but I put in that command [ps -eaf | grep ntfs] and this is what it spat out

schmidtp   10721   10659  0 20:06 pts/1    00:00:00 grep --color=auto ntfs

The drive would normally be mounted through Dolphin (left click and puts up password to login). Unless I forget and then normally the app I'm using when navigating would prompt to mount if you click on it).

I've since setup the drive to be mounted automatically through Fedora at login with password (setup through removable devices). The external USB SSD gets mounted through the task bar when it's attached (again with password prompt)

Comment 3 Jean-Pierre André 2023-05-22 10:29:47 UTC
OK, so that is not ntfs-3g and ntfs-3g cannot help.

You probably are using ntfs3, and you should post against it.

Comment 4 Pete 2023-05-22 11:08:09 UTC
So create a new bug against ntfs3 instead ??

Comment 5 Michael Schwendt 2023-07-25 09:14:36 UTC
Which bugzilla component would that be for e.g. Fedora 38 and 37?

I'm also affected by NTFS corruption after GNOME Shell's auto-mounting of external storage media. That's default behavior for Fedora. Filesystem type says "ntfs3".

/dev/sda1 on /run/media/XXX/HD-PCU2 type ntfs3 (rw,nosuid,nodev,relatime,uid=1000,gid=1000,iocharset=utf8,windows_names,uhelper=udisks2)

# rpm -qa|grep -i ntfs
ntfs-3g-libs-2022.10.3-2.fc38.x86_64
ntfs-3g-system-compression-1.0-11.fc38.x86_64
ntfsprogs-2022.10.3-2.fc38.x86_64
ntfs-3g-2022.10.3-2.fc38.x86_64

# dnf search ntfs
Last metadata expiration check: 0:07:33 ago on Tue 25 Jul 2023 11:05:06 CEST.
========================= Name & Summary Matched: ntfs =========================
ntfs-3g.x86_64 : Linux NTFS userspace driver
ntfs-3g-devel.i686 : Development files and libraries for ntfs-3g
ntfs-3g-devel.x86_64 : Development files and libraries for ntfs-3g
ntfs-3g-libs.x86_64 : Runtime libraries for ntfs-3g
ntfs-3g-libs.i686 : Runtime libraries for ntfs-3g
ntfs-3g-system-compression.x86_64 : NTFS-3G plugin for reading "system
                                  : compressed" files
ntfs2btrfs.x86_64 : Conversion tool from NTFS to Btrfs
ntfsprogs.x86_64 : NTFS filesystem libraries and utilities

Comment 6 Jean-Pierre André 2023-07-25 10:40:06 UTC
You are using the ntfs3 driver, which is an in-kernel driver unrelated to ntfs-3g which relies on different bindings. As a consequence ntfs-3g experts can do nothing to this issue, and you should report to ntfs3 as an in-kernel driver.


Note You need to log in before you can comment on or make changes to this bug.