Intermittent File Corruption Copying To NTFS

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
airjrdn
Level 1
Level 1
Posts: 31
Joined: Mon Jul 19, 2010 8:49 am

Intermittent File Corruption Copying To NTFS

Post by airjrdn » Fri Sep 03, 2010 8:49 am

Just an FYi, I did post this in the Ubuntu forums, but didn't get much feedback. One user suggested using ntfs-3g. It appears as though that's already installed, but I don't know how to verify whether or not that's what's being used when accessing, or, more specifically, writing to NTFS disks.

I'm relatively new to Linux, so bear with me. I'm about 38 days into my install...at least that's what uptime shows me right now.

Feel free to tell me if this is a known issue and I've been blissfully unaware of it up to this point.

I've copied a 7.9G file multiple times, and sometimes the destination file gets corrupted. Here's what I've done:

Same for all copies - copied using: Linux Mint 9 (isadora) Kernel 2.6.32.21-generic
GNOME 2.30.2


1 (bad)
---------------------------------
Source: WinXP machine on network
Destination: 32G AData thumb drive (NTFS)
Result: Corrupt, MD5 Hash doesn't match

2 (bad)
---------------------------------
Source: WinXP machine on network
Destination: 80G USB drive (NTFS)
Result: Corrupt, MD5 Hash doesn't match

3 (good)
---------------------------------
Source: WinXP machine on network
Destination: /$HOME/temp
Result: Fine, MD5 Hash matches

4 (bad - 1st copy to Data1)
---------------------------------
Source: /$HOME/temp
Destination: Data1 Internal SATA drive (NTFS)
Result: Corrupt, MD5 Hash doesn't match

5 (good - 1st copy to Data2)
---------------------------------
Source: /$HOME/temp
Destination: Data2 Internal SATA drive (NTFS)
Result: Fine, MD5 Hash matches

6 (good - 2nd copy to Data1)
---------------------------------
Source: /$HOME/temp
Destination: Data1 Internal SATA drive (NTFS)
Result: Fine, MD5 Hash matches

7 (good - 2nd copy to Data2)
---------------------------------
Source: /$HOME/temp
Destination: Data2 Internal SATA drive (NTFS)
Result: Fine, MD5 Hash matches

8 (good - 3rd copy to Data1)
---------------------------------
Source: /$HOME/temp
Destination: Data1 Internal SATA drive (NTFS)
Result: Fine, MD5 Hash matches

So, it appears to copy from an SMB share just fine, and to its own filesystem just fine, but intermittently has trouble writing to local NTFS partitions. Writing to an SMB NTFS share is also file, which makes sense since it isn't having to talk "directly" to NTFS.

Another point to note is that there aren't just two md5 hashes (one good, one bad). There's one good, and multiple bad.

thenewguy
Level 3
Level 3
Posts: 186
Joined: Thu Feb 04, 2010 9:29 pm

Re: Intermittent File Corruption Copying To NTFS

Post by thenewguy » Sat Sep 04, 2010 2:17 pm

I'm not sure what might be causing the corruption, but you can use ntfs-3g directly from the command line like this:

ntfs-3g /dev/sda1 /mnt/windows

It also works using the standard mount command

mount -t ntfs-3g /dev/sda1 /mnt/windows

Assuming sda1 is the divce where your NTFS partition is located. You can get more detailed information from the manual page by typing the following at a command line:

man ntfs-3g

airjrdn
Level 1
Level 1
Posts: 31
Joined: Mon Jul 19, 2010 8:49 am

Re: Intermittent File Corruption Copying To NTFS

Post by airjrdn » Sat Sep 04, 2010 2:30 pm

How can I
1 - figure out if ntfs or ntfs-3G is being used?
2 - force ntfs-3G to be used by the automount functionality?

altair4
Level 19
Level 19
Posts: 9718
Joined: Tue Feb 03, 2009 10:27 am

Re: Intermittent File Corruption Copying To NTFS

Post by altair4 » Sat Sep 04, 2010 2:44 pm

"ntfs" is symbolically linked to "ntfs-3g" internally so there is no difference.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

airjrdn
Level 1
Level 1
Posts: 31
Joined: Mon Jul 19, 2010 8:49 am

Re: Intermittent File Corruption Copying To NTFS

Post by airjrdn » Mon Sep 06, 2010 6:17 pm

Ok. From what I understand, that's the most stable NTFS driver. Given that it's proven to silently corrupt data, is there a filesystem that Windows & Linux can both share that supports large files (over 4G) that doesn't require installing anything extra in Windows?

Royi
Level 2
Level 2
Posts: 50
Joined: Fri Aug 11, 2017 8:55 am

Re: Intermittent File Corruption Copying To NTFS

Post by Royi » Sun May 13, 2018 7:54 am

Are things any better with Linux Mint 18.3?

Can I trust with NTFS partition where both Windows and Linux write to (Not at the same time though)?

JohnFrumm
Level 2
Level 2
Posts: 58
Joined: Sun Dec 03, 2017 12:49 pm

Re: Intermittent File Corruption Copying To NTFS

Post by JohnFrumm » Sun May 13, 2018 12:00 pm

Royi wrote:
Sun May 13, 2018 7:54 am
Are things any better with Linux Mint 18.3?

Can I trust with NTFS partition where both Windows and Linux write to (Not at the same time though)?
I assume you mean better than Windows...

I dumped Windows 7 a year ago and am much happier with Mint. The learning curve is steep, but it is worth it.
Advantages (imo):
1) MUCH faster boot and shutdown times, plus faster in general.
2) NO MORE FRAGMENTED FILES!!! (ext4 has no fragmentation unless your drive is nearly full)
3) No OS telemetry
4) fewer viruses
5) better security
6) no users/dude/Documentsandsettings/local/roaming/appdata/blah/blah/blah/yada/yada/yada (I HATE that folder structure!)

Disadvanges:
1) steeper learning curve
2) fewer native programs (but this is getting better)

There is only one program I need Windows 7 for, so I installed VMWare player and Windows 7 runs fine as a virtual machine.

As far as the NTFS partition, I don't know if you can trust it or not (I reformatted all of my drives to ext4 last year, only my Windows 7 VM itself has ntfs.) I never had a problem with ntfs under linux other than the file fragmentation and slower speeds.
Have you backed up your computer recently?

JohnFrumm
Level 2
Level 2
Posts: 58
Joined: Sun Dec 03, 2017 12:49 pm

Re: Intermittent File Corruption Copying To NTFS

Post by JohnFrumm » Sun May 13, 2018 12:02 pm

JohnFrumm wrote:
Sun May 13, 2018 12:00 pm
Royi wrote:
Sun May 13, 2018 7:54 am
Are things any better with Linux Mint 18.3?

Can I trust with NTFS partition where both Windows and Linux write to (Not at the same time though)?
I assume you mean better than Windows...

I dumped Windows 7 a year ago and am much happier with Mint. The learning curve is steep, but it is worth it.
Advantages (imo):
1) MUCH faster boot and shutdown times, plus faster in general.
2) NO MORE FRAGMENTED FILES!!! (ext4 has no fragmentation unless your drive is nearly full)
3) No OS telemetry
4) fewer viruses
5) better security
6) no users/dude/Documentsandsettings/local/roaming/appdata/blah/blah/blah/yada/yada/yada (I HATE that folder structure!)

Disadvanges:
1) steeper learning curve
2) fewer native programs (but this is getting better)

There is only one program I need Windows 7 for, so I installed VMWare player and Windows 7 runs fine as a virtual machine.

As far as the NTFS partition, I don't know if you can trust it or not (I reformatted all of my drives to ext4 last year, only my Windows 7 VM itself has ntfs.) I never had a problem with ntfs under linux other than the file fragmentation and slower speeds.
*edit*
BTW, did you verify your hdd is good? Linux Mint 18.3 has a "GSmartControl" program where you can check the disk smart data and test the hdd's.
Have you backed up your computer recently?

Royi
Level 2
Level 2
Posts: 50
Joined: Fri Aug 11, 2017 8:55 am

Re: Intermittent File Corruption Copying To NTFS

Post by Royi » Sun May 13, 2018 2:51 pm

I was talking about the reliability of the NTFS drive in Linux Mint.
I have an HD I would like both Windows 10 (18.3) and Linux Mint 18.3 will be able to access and share data on (Dual Boot).
It is not the Boot Drive of Windows 10.

I'm asking if the NTFS driver of Linux Mint (I guess NTFS-3G) is the latest one and if is it reliable enough to not make any issue with this shared partition.

As I wrote, they won't access it on the same time.

User avatar
Flemur
Level 17
Level 17
Posts: 7237
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Intermittent File Corruption Copying To NTFS

Post by Flemur » Sun May 13, 2018 3:03 pm

Royi wrote:
Sun May 13, 2018 7:54 am
Can I trust with NTFS partition where both Windows and Linux write to (Not at the same time though)?
I'd been doing
linux -> fat32 USB thumb-drive -> TV
with no problems until I copied a .txt file, then a win10 machine couldn't read it. But Linux and the TV still could.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Mint 19.1 Xfce/fluxbox
Manjaro openbox/fluxbox

User avatar
AZgl1500
Level 11
Level 11
Posts: 3536
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes sweeping down the plains
Contact:

Re: Intermittent File Corruption Copying To NTFS

Post by AZgl1500 » Sun May 13, 2018 3:14 pm

I have never had a problem with NTSF drives with Linux, my only regret is that when I bought my 6TB Seagate which comes native with NTSF that I was brand new to Linux and unaware of how much I would be using Linux relative to Win7

So, thinking that I would be needing to keep a lot of backups of 3 Win7 and 1 Win10 laptops, I miscued and made it into 4 gB NTSF and 2 gB ext4 partitions.

I now realize that should have been reversed, and I am now using Linux 99.88% of the time, and the Win7 desktop just sits there, waiting for someone to love it. :wink:

Oh well, at least I can use the NTSF to copy stuff back and forth between the two OS types.

Post Reply

Return to “Newbie Questions”