How should I prevent data corruption on an NTFS partition shared by Windows and Linux?

mAt

I use Linux for most of the things but I still need Windows sometimes. So, I have Linux Mint 14 and Windows 8 installed (dual-booting) on my computer with the following disk setup:

  • sda1: The 350 MB partition Windows 8 allocates (I still don't know why.)
  • sda2: Windows installation
  • sda3: My shared NTFS drive
  • sda5: Linux Mint 14 installation
  • sda6: Swap area for Linux Mint

Most of my files are in sda3 which I share between the two OSs (kind of like my backup partition). I can access it from both operating systems. However, sometimes my files get corrupted.

Example: I recently downloaded Eclipse and extracted it to a folder in sda3 drive in Linux Mint. It was working fine. Then when I switched to Windows, it asked me to repair my drives because there were some errors. I accepted, Windows did some scanning and restarted. When I switched back to Linux Mint, I noticed that Eclipse wasn't working. When I checked, most of the files in Eclipse folder were corrupted. Similar things happen other way around as well. Sometimes I'm not able to see and/or open files in Windows that I created/downloaded in Linux Mint. I'm tired of losing files like this.

Is it a hardware issue? (My computer is kind of old)

If not related to hardware, is there a better way to share data between OSes than what I currently have? (a separate NTFS partition for both)

Rob Gibson

What is likely happening is not that files are being corrupted but that Linux is doing its best to ensure that files are not corrupted.

When a filesystem is opened, written to, and is being closed, the operating system (both Windows and Linux) will mark the filesystem as being "dirty", e. g. not properly closed.

Under normal circumstances, when you unmount a filesystem, it will mark it as clean, presuming that all remaining I/O requests have been fulfilled, the filesystem's journal (if available) is empty, and all disk cache has been synced to the physical disk.

In some cases, the NTFS-3G utilities will simply not mark the filesystem as "clean" to ensure that it is checked by Windows at startup and avoid possible corruption.

In short, your hardware is probably fine, although it can't hurt to check the hard drive's health at any point. As far as actually sharing data back and forth, I would recommend a network-based storage method. Whether a locally-housed server or a push of the data into the cloud, using a network filesystem (probably SMB/CIFS for Windows compatibility) will ease the migration problems.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to mount properly ntfs partition shared between linux and windows

How to make linux-formatted NTFS partition recognized by Windows?

Should I choose exFat or NTFS for a "shared" partition in a dual-boot system?

Mounted NTFS windows-linux shared partition works for users r-w, but access denied for programs

How do I give multiple users access to a Windows NTFS partition?

how i can get ntfs data on ext4 partition?

How should I do to resize a partition taking free space from ntfs partition?

Are there any issues with using the windows os partition for shared data storage with Linux?

NTFS Corruption: Files created in Linux corrupted when Windows Boots

NTFS file corruption when using drive with Windows and Linux Mint

How to shrink my NTFS (Windows 7) partition and expand my linux partition?

Can't write on ntfs partition shared with Windows 10

How do you prevent corruption of shared Excel files?

How can I create a shared partition for Windows and Ubuntu in a pen drive?

How to recover a deleted NTFS partition with data

How much disk space should I devote to my Linux / partition?

How to let linux mount an NTFS partition in an "unsafe state" due to Windows crash?

How do I extend the size of an NTFS partition?

How can I resize NTFS partition in GParted?

How to prevent disk i/o timeouts which cause disks to disconnect and data corruption with SMR disks?

Creating Trash for shared NTFS partition

Redirect home to shared NTFS partition

How do I remove a Linux partition and expand the Windows partition to consume the Linux partition space?

How can I write a Windows (NTFS) .img file to a partition and add it to grub?

Can a Linux partition unnoticeably create files in another partition and, if, how can I prevent it?

Mounting a hibernated Windows 8 NTFS partition on Linux Mint

Is an NTFS partition containing valuable data safe on a Linux machine?

Prevent windows from "sleep saving" and overwriting shared partition

Fixing NTFS on SSD after corruption by windows cache