Curroption of NTFS file system on SSD

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read how to get help
Post Reply
arthurr
Level 1
Level 1
Posts: 4
Joined: Mon Mar 21, 2016 10:18 pm

Curroption of NTFS file system on SSD

Post by arthurr »

Hello,

I'm having an issue with an NTFS file system on an ADATA SSD. The mount will hang after very little activity, refuse to umount and it will hang shutdown. A hard reboot then corrupts the file system. Windows then won't boot after without a chkdsk and often a bootrec and/or bcdboot. The last time this happened I thought I must be patient and let the shutdown happen gracefully. Big mistake! it trashed part of the MFT and hosed the file system beyond recognition. The SSD had been rock solid on Windows, so I don't think its a failing SSD. I can chkdsk clean every day for a week when just running Windows, but it was dirty after one file written using Linux.

Boot mentions something about not buffering the SSD, which seemed reasonable given SSD performance, but I wonder if its related.

This is the SATA controller I'm using.

product: SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode]
vendor: Advanced Micro Devices, Inc. [AMD/ATI]
physical id: 11
bus info: pci@0000:00:11.0
version: 40
width: 32 bits
clock: 66MHz
capabilities: storage ahci_1.0 bus_master cap_list
configuration: driver=ahci latency=32
resources: irq:19 ioport:f090(size=8) ioport:f080(size=4) ioport:f070(size=8) ioport:f060(size=4) ioport:f050(size=16) memory:feb0b000-feb0b3ff

This seems identical to an issue (https://bbs.archlinux.org/viewtopic.php?id=181729) an Arch Linux user was having except I'm dual booting with Windows 7 and don't have any encryption.

I have backups, but they're a bit out-of-date. Ouch!

I have another SSD using ext4 on a LVM volume using the same SATA controller and its been fine. I don't think its a controller or RAM issue then.

I also have a dreaded RAID 5 on a FakeRAID. It is a Rocketraid 2640x4 using the rr26xx driver. It hangs all the time under Windows. I shouldn't have even dared to mount that on Linux after what I experienced with the SSD, but I did and its been fine, even better, than Windows. So I don't think its purely an issue with NTFS driver for Linux. I've had some bad experiences with NTFS support on Linux several years ago. I figured things were better now, but perhaps not.

I was mounting it with fuseblk, which could be relevant?

User avatar
amethyst_igor
Level 3
Level 3
Posts: 143
Joined: Thu Feb 25, 2016 9:15 pm
Location: State of Euphoria
Contact:

Re: Curroption of NTFS file system on SSD

Post by amethyst_igor »

arthurr wrote:Hello,

I'm having an issue with an NTFS file system on an ADATA SSD. The mount will hang after very little activity, refuse to umount and it will hang shutdown. A hard reboot then corrupts the file system. Windows then won't boot after without a chkdsk and often a bootrec and/or bcdboot. The last time this happened I thought I must be patient and let the shutdown happen gracefully. Big mistake! it trashed part of the MFT and hosed the file system beyond recognition. The SSD had been rock solid on Windows, so I don't think its a failing SSD. I can chkdsk clean every day for a week when just running Windows, but it was dirty after one file written using Linux.

Boot mentions something about not buffering the SSD, which seemed reasonable given SSD performance, but I wonder if its related.

This is the SATA controller I'm using.

product: SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode]
vendor: Advanced Micro Devices, Inc. [AMD/ATI]
physical id: 11
bus info: pci@0000:00:11.0
version: 40
width: 32 bits
clock: 66MHz
capabilities: storage ahci_1.0 bus_master cap_list
configuration: driver=ahci latency=32
resources: irq:19 ioport:f090(size=8) ioport:f080(size=4) ioport:f070(size=8) ioport:f060(size=4) ioport:f050(size=16) memory:feb0b000-feb0b3ff

This seems identical to an issue (https://bbs.archlinux.org/viewtopic.php?id=181729) an Arch Linux user was having except I'm dual booting with Windows 7 and don't have any encryption.

I have backups, but they're a bit out-of-date. Ouch!

I have another SSD using ext4 on a LVM volume using the same SATA controller and its been fine. I don't think its a controller or RAM issue then.

I also have a dreaded RAID 5 on a FakeRAID. It is a Rocketraid 2640x4 using the rr26xx driver. It hangs all the time under Windows. I shouldn't have even dared to mount that on Linux after what I experienced with the SSD, but I did and its been fine, even better, than Windows. So I don't think its purely an issue with NTFS driver for Linux. I've had some bad experiences with NTFS support on Linux several years ago. I figured things were better now, but perhaps not.

I was mounting it with fuseblk, which could be relevant?
I have had zero issues with NTFS support in Linux. I even repartition and format NTFS drives in Windows using Linux GParted. Linux has better support for NTFS than Windows does. I say that because I've had files I could not delete in Windows, because the path name was too long. I tried this and that and searched the Internet for solutions, none of which worked, I might add. How did I eventually resolve the problem? I booted into Linux, and with a single command, removed the files.

AMD, the Advanced Micro Devices in your hardware description, employs a temp intern that tests their hardware on Linux, on a part-time basis, once a month, but sometimes he plays Minecraft instead, so the testing gets put off until next month. That's just a joke, but I wasn't too surprised to see the vendor in your hardware description. I never bought an AData SSD, because of reviews I read that hinted of trouble in Linux and even Windows. I have bought SanDisk, Samsung, and maybe Crucial--I can't remember. Intel is good, but seems expensive. I don't use fuseblk, whatever that is. My fstab entry for SSD is really nothing special, other than I added the single word discard to the options. I think I have read articles that recommend Linux users stick with certain vendors, namely Samsung or Intel, but in my experience, Sandisk is OK too. I always read reviews before purchasing hardware, because the marketplace seems like a minefield for Linux, being the minority desktop operating system.
I run both Windows 10 and Linux Mint 18 in dual boot with two SSDs and have other rigs running various versions of Linux. My blog.

arthurr
Level 1
Level 1
Posts: 4
Joined: Mon Mar 21, 2016 10:18 pm

Re: Curroption of NTFS file system on SSD

Post by arthurr »

I have had zero issues with NTFS support in Linux. I even repartition and format NTFS drives in Windows using Linux GParted. Linux has better support for NTFS than Windows does. I say that because I've had files I could not delete in Windows, because the path name was too long. I tried this and that and searched the Internet for solutions, none of which worked, I might add. How did I eventually resolve the problem? I booted into Linux, and with a single command, removed the files.
The NTFS support in Linux is good for a couple things like your examples namely resizing the filesystem, but it isn't as stable as Windows. There's really no way it can be when they have to reverse engineer NTFS. The ntfs-3g suite can't recover the filesystem using journaling like chkdsk, which is really enough reason on its own to not mount NTFS filesystems in Linux.
AMD, the Advanced Micro Devices in your hardware description, employs a temp intern that tests their hardware on Linux, on a part-time basis, once a month, but sometimes he plays Minecraft instead, so the testing gets put off until next month. That's just a joke, but I wasn't too surprised to see the vendor in your hardware description.
I really don't feel this is a CPU issue though I agree generally Intel is more Linux friendly.
I never bought an AData SSD, because of reviews I read that hinted of trouble in Linux and even Windows.
It seems unlikely that the issue is due to the disk. They have standards to follow, so I don't see why the support would be any different for any manufacture. Different failure rates, but again I don't suspect a failed disk.
I don't use fuseblk, whatever that is.
Its a userspace application for mounting filesystems. You mount the filesystem as your user.

My guess is that it would have to do with buffering, TRIM or buggy ntfs-3g. I may grab a core dump and try my luck in the ntfs-3g forums.

arthurr
Level 1
Level 1
Posts: 4
Joined: Mon Mar 21, 2016 10:18 pm

Re: Curroption of NTFS file system on SSD

Post by arthurr »

I applied a firmware update on the ADATA SSD. There was two stability bugs addressed according to the release notes. Even still, I appear to be having problems with silent corruption, but turns out to be non-specific to NTFS. Now that I was able to get the data I needed off the ADATA SSD I was able to do more testing. I appear to be having the same silent corruption issues with block level imaging using dd and with an ext4 filesystem.

Code: Select all

desktop ~ # fdisk /dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xe4b22ad1.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Command (m for help): o
Building a new DOS disklabel with disk identifier 0x8cd055fc.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): p

Disk /dev/sdc: 256.1 GB, 256060514304 bytes
255 heads, 63 sectors/track, 31130 cylinders, total 500118192 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x8cd055fc

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-500118191, default 2048): 
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-500118191, default 500118191): 
Using default value 500118191

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
desktop ~ # mkfs.ext4 /dev/sdc1
mke2fs 1.42.9 (4-Feb-2014)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
15630336 inodes, 62514518 blocks
3125725 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
1908 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
	4096000, 7962624, 11239424, 20480000, 23887872

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done     

desktop ~ # mount /dev/sdc1 /mnt
mount: block device /dev/sdc1 is write-protected, mounting read-only
mount: you must specify the filesystem type
desktop ~ # mount -t ext4 /dev/sdc1 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/sdc1,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

arthurr
Level 1
Level 1
Posts: 4
Joined: Mon Mar 21, 2016 10:18 pm

Re: Curroption of NTFS file system on SSD

Post by arthurr »

ZFS also has problem.

Code: Select all

desktop ~ # fdisk /dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x9ef70f1c.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): o
Building a new DOS disklabel with disk identifier 0x77727159.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 
Using default value 1
First sector (2048-500118191, default 2048): 
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-500118191, default 500118191): 
Using default value 500118191

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
desktop ~ # zpool create -f -m /mnt/tank tank /dev/sdc1
desktop ~ # cat /dev/urandom > /mnt/tank/test
desktop ~ # zpool status -v
  pool: tank
 state: ONLINE
status: One or more devices are faulted in response to IO failures.
action: Make sure the affected devices are connected, then run 'zpool clear'.
   see: http://zfsonlinux.org/msg/ZFS-8000-HC
  scan: none requested
config:

	NAME        STATE     READ WRITE CKSUM
	tank        ONLINE       0     0     1
	  sdc1      ONLINE       0     0     6

errors: List of errors unavailable (insufficient privileges)

User avatar
amethyst_igor
Level 3
Level 3
Posts: 143
Joined: Thu Feb 25, 2016 9:15 pm
Location: State of Euphoria
Contact:

Re: Curroption of NTFS file system on SSD

Post by amethyst_igor »

arthurr wrote:
I have had zero issues with NTFS support in Linux. I even repartition and format NTFS drives in Windows using Linux GParted. Linux has better support for NTFS than Windows does. I say that because I've had files I could not delete in Windows, because the path name was too long. I tried this and that and searched the Internet for solutions, none of which worked, I might add. How did I eventually resolve the problem? I booted into Linux, and with a single command, removed the files.
The NTFS support in Linux is good for a couple things like your examples namely resizing the filesystem, but it isn't as stable as Windows. There's really no way it can be when they have to reverse engineer NTFS. The ntfs-3g suite can't recover the filesystem using journaling like chkdsk, which is really enough reason on its own to not mount NTFS filesystems in Linux.
I mount partitions NTFS in Linux on a daily basis, having entries in fstab for that purpose, and copy files to/from ext4, and never had an issue. I do any needed NTFS repairs using chkdsk in Windows, though, just because chkdsk seems familiar and cozy to me, like an old friend. I've never had an issue with the Sandisk and Samsung SSD's I have running and booting my Linux and Windows systems. I'm running right now a Samsung 850 Evo that has three boot partitions: Linux Mint 17.3 Cinnamon, Linux Mint 17.3 XFCE, and Windows 10. No problemo. Windows 10 boots slowest. So, we've got similar operating systems, access the same file system (NTFS), and the main variable here is I use a different brand of SSD than you. If you swapped out the SSD with a Samsung, I bet the problem would go bye-bye.
I run both Windows 10 and Linux Mint 18 in dual boot with two SSDs and have other rigs running various versions of Linux. My blog.

Post Reply

Return to “Hardware Support”