PSA: DO NOT try to mount an NTFS drive on Linux that's accelerated by Intel Optane
Posted by palapapa0201@reddit | linux | View on Reddit | 98 comments
Over a year ago, I realized that my Windows NTFS drive had some files that were unreadable on Linux, no matter if I used ntfs3 or ntfs-3g to mount it. I posted about it on r/linuxquestions, but no one had a solution.
Today, I tried to clone the NTFS disk to an external HDD to see if that would work, but somehow Windows' chkdsk said that the external HDD had errors, even though it should have been an exact copy.
Out of options, I tried to clone the NTFS disk using Macrium Reflect, and just as I was about to clone it, I saw that it appended + Intel Optane after the name of my drive, then it occurred to me: what if the reason why this whole time I was not able to read some files is because those files are cached on the Optane SSD?
So I tried disabling Intel Optane, and to my surprise, the NTFS drive is now perfectly readable on Linux!
tl;dr Mounting an NTFS drive accelerated by Intel Optane on Linux will not work.
Regis_DeVallis@reddit
Off the top of my head intel optane is 2 drives with some sorts of raid thing to make a cache. What you’re essentially doing is trying to read half a disk.
sparkyblaster@reddit
I think its more like apples fution drive where its like a spanned volume and files are shuffled across the volume depending on speed priority.
Would explain why some files can't be read because they are in the optain section.
carl2187@reddit
Ah yes. Like Raid 0. My old data destroying friend.
sparkyblaster@reddit
More spanned volume which is not raid O. Also, wait untill you find out what's inside a regular hdd and most larger (for their time) ssds.
ghost103429@reddit
The proper term would be tiered storage not spanned storage. Spanned storage typically ignores drive speeds filling up drive space sequentially. Tiered storage on the otherhand places frequently read and written blocks on the faster storage blocks while colder blocks are stored on the slower storage device.
sparkyblaster@reddit
Thats if there is a cashe. Where your faster storage can be wiped without loosing any data.
This isn't that. This is spawned with files being shifted along. Ie managed.
ghost103429@reddit
Caching stores duplicate blocks, Tiering doesn't store duplicate blocks and shifts blocks according to frequency of use.
saiyate@reddit
That's not a bug, it's how drive caching works. Optane is amazing on it's own. Caching sucks unless done properly on a separate drive like in ZFS (SLOG / L2ARC / METADATA).
pppjurac@reddit
Why even bother? Optane is dead sonce 2022.
saiyate@reddit
Why bother? Because Optane drives are still superior in every respect except one to NAND. Sequential speed was surpassed by PCIe 5.0 but as everyone in the know is aware, sequential no longer matters after about 4.0 speeds. Far more important is latency, high queue depth transfers, sustained transfer rate and endurance. All things that Optane annihilates NAND at. Also, since it’s “dead”, prices plummeted after the fire sale. Imagine a drive that will never wear out. Imagine a drive where you transfer data to it and it doesn’t drop to 30% of its speed after a few GB, full speed til the end of the drive, imagine a drive that is so quick (as in latency) you can use it as RAM at $1 a GB and sticks starting at 128GB. How about 2TB of NVDIMMs for a couple grand. DDDR5 RDIMMS are about $40,000 right now 2TB. There actually is one Optane NVDIMM for DDR5 that beats any SSD on the market in sustain transfer rate when in App Direct Mode. The real key is how accessible it is. Cost is way down, stock is plenty (on certain models). AliExpress has P4800X 375GB for $175. And P5801X 400GB for $400. Add a zero to get the original price. Hell for NVDIMMS add two zeros.
vaynefox@reddit
I do hope you reported this to the devs of ntfs3 and ntfs-3g so that they can look into it...
Chrisbearry@reddit
Because of the nature of how intel optane works there’s nothing they can do about it, there’s always data stored on the ssd part that’s not available on the hdd the drive and ssd constantly move data between each other and it’s a proprietary solution from intel that’s very old at this point so there’s not many people still using optane drives anymore
pppjurac@reddit
Optane is dead duck and should be left to history.
palapapa0201@reddit (OP)
Never reported a Linux bug before. I am looking into it.
julioqc@reddit
congrats, you are now a man! (or woman, or wtv in between)
dgm9704@reddit
do you mean ”adult” or something
j0n70@reddit
Penguin
isabellium@reddit
I like this
julioqc@reddit
as opposed to boy or girl yes
dgm9704@reddit
aka ”child”
julioqc@reddit
TIL 🤯 😂
nolij420@reddit
kansetsupanikku@reddit
a member of Valhalla?
MorallyDeplorable@reddit
ytmnd
Indolent_Bard@reddit
Make a post when you do.
palapapa0201@reddit (OP)
https://lore.kernel.org/ntfs3/76bc95e8-c758-4934-a68f-bb11e20b0d84@gmail.com/T/#u
I hope I didn't make any mistakes.
Alejandro9R@reddit
for your first time, that's a very honest and good attempt to bug report it, congratz and thank you in the name of the linux community! I agree with the other comment that they might want more details but just wait until they specifically say what they would need. You've done a crucial part already which is showing interesting and good faith in your wording and report overall, and I would like to think it increases the chances to be read and answered back properly
spif@reddit
I can tell you ordinarily they're going to want way more detail about all of the hardware and software involved. In my experience it's likely that instead of trying to add support in the filesystem, they might document the reported behavior and pass it on to the hardware vendor (Intel) so that they might propose a patch.
It's also possible this has been fixed in a newer kernel version, assuming you aren't running the latest, and that it hasn't been backported to whatever version you're running. That might be something to check.
khsh01@reddit
They're two different groups?
Hamilton950B@reddit
Yes. Ntfs-3g was a fork of the original ntfs, by a group that later became Tuxera. Ntfs3 is a new implementation headed by Paragon Software. Then there's also Tuxera Ntfs, which is the proprietary version of ntfs-3g.
TSG-AYAN@reddit
Ntfsplus is even newer and supposed to be much better than ntfs3
khsh01@reddit
At this point I just want the ntfs thats Old reliable
rebootyourbrainstem@reddit
Huh, that's really strange.
Making it so you can "sort of but not really" read the NTFS volume directly when Optane is enabled seems really bad.
I wonder if there is some flag indicating "do NOT try to access this without the Optane cache" that Windows is setting on the NTFS drive, but Linux doesn't know about?
Seems pretty important since it could lead to data corruption...
Tarntanya@reddit
This reminds me of a blog post from a few years back that discussed how CPU undervolting can corrupt Btrfs drives.
SergejVolkov@reddit
Seems like btrfs can be corrupted by literally anything.
orangeboats@reddit
It's less that Btrfs can be corrupted by anything, and more about that Btrfs can tell something is corrupted.
ZorbaTHut@reddit
It's kind of both; yes, btrfs notifies you about problems, but it's also pathologically unable to recover from anything.
orangeboats@reddit
On the contrary, Btrfs is actually quite robust nowadays. The olden days are long gone, when a single forced poweroff could cause the filesystem to become degraded. If it refuses to mount normally, there's a decent chance something is wrong.
ZorbaTHut@reddit
I mean, you say that, but I'm pretty sure the last three filesystem data-loss failures I had were all btrfs, and two of these were before I even realized I had a btrfs filesystem.
(Steam Deck getting interrupted mid-powerup repeatedly by a flaky adapter.)
dontquestionmyaction@reddit
Running an undervolt that causes data corruption is going to eventually destroy pretty much all filesystems
TrivialRamblings@reddit
Why does *under*volting specifically cause it vs a standard overclock? skimmed through the linked article but couldn't glean anything super insightful besides "communication between CPU, RAM, etc"
dontquestionmyaction@reddit
Both over- and underclocking can cause corruption. Underclocking just manifests a little differently.
The CPU can end up with a voltage too weak to have the transistors reliably meet the existing clock to settle in time, so some latches may end up sampling the wrong value. It can just straight up compute incorrectly in the ALU, write caches wrong, everything really. It doesn't tend to crash immediately.
Overclocks tend to throw WHEA/MCE errors and just hard-reset when the voltage is very wrong. Can for sure still corrupt stuff, but you're less likely to end up writing bad data.
dkopgerpgdolfg@reddit
Play stupid games, win stupid prices. And no, the problem wasn't btrfs.
Floppie7th@reddit
If anything, btrfs deserves a thank you here for catching and reporting the corruption
proton_badger@reddit
Yeah, I think btrfs is often the victim of "shoot the messenger".
sdoregor@reddit
You mean prizes right? Although HDD prices are indeed stupid right now
dkopgerpgdolfg@reddit
Thanks, corrected.
Albos_Mum@reddit
Technically any fs can be corrupted by undervolting your CPU, it just means you've undervolted too far and now have an unstable CPU. The writer even outright admits that was the case.
psyblade42@reddit
Seems unlikely. Else chkdsk should have reported the missing cache instead of generic corruption.
bob2600@reddit
Mounting it as R/O shouldn’t trash the journal even if it’s inconsistent, no?
palapapa0201@reddit (OP)
Yes, thankfully I have only ever mounted it as readonly.
NSASpyVan@reddit
Have you or anyone encountered ntfs volumes building up errors under Linux? I have to boot back to windows every few months to fix.
Not even sure where to start on this.
palapapa0201@reddit (OP)
Do you mean chkdsk errors?
Maybe it's best to not write to NTFS on linux. I have only ever mounted NTFS as read only.
NSASpyVan@reddit
yeah sorry wrote on my mobile, chkdsk errors. my data volumes are ntfs for compatibility reasons but i do write to them under linux. didn't know this would be an issue. mounting them in fstab like below.
UUID=0638765D38764BA5 /mnt/ntfs-d ntfs3 defaults,nofail,x-systemd.device-timeout=5s,uid=1000
,gid=1000,noatime,prealloc,windows_names 0 0
palapapa0201@reddit (OP)
I don't actually know what causes your issues, though. Since I never wrote to NTFS from Linux, I don't know if doing so would actually cause issues.
In any case, there is going to be a new NTFS driver in Linux 7.1 so maybe look forward to that. If it were me, I would use exFAT for interop between Linux and Windows.
diegotbn@reddit
Just curious, is there a reason you didn't just use
ddto clone the drive? I'll admit I'm not a super expert but it's what I would have reached for immediately when needing to do this. I'm not an expert on file systems either exactly so maybe there's something there I'm not considering as well.Granted,
ddis a dangerous tool if you're not careful.machacker89@reddit
Or clonezilla. That's been my go to for years
palapapa0201@reddit (OP)
I did clone a drive, but I used
pvinstead. Like I said in the post, chkdsk actually reports the cloned drive as corrupted, because I was basically cloning half of a drive because the Optane SSD was enabled.doc_willis@reddit
if you had optane/rst enable, I am surprised it saw the drive at all.
in my experience Linux would not let you do anything with such optane drives they would not even show in fdisk or other tools.
but I have only delt with a few optane systems.
cooperre@reddit
I couldn't even install Linux until I physically removed the optane drive from the MB, even after disabling the software
aloobhujiyaay@reddit
Not really a Linux issue, more like Intel RST/Optane being proprietary and opaque
AX11Liveact@reddit
It's a problem with Linux' NTFS driver, so it is a Linux problem. Intel are not going to fix it so the place to file the bug report are the ntfs3 devs.
rbmorse@reddit
It's a problem, but it is not a bug. It's a license issue. And Intel has said repeatedly they will not relicense Optane under a GPL compatible license. Same reason Linux installers will not work with the system disk controller in the IntelRST mode.
I suppose someone with skillz could reverse engineer a userspace driver that was Optane compatible. Maybe some AI somewhere.
tomrannosaurus@reddit
this type of “distinction without a difference” is what makes people feel the linux community is unfriendly. intel will never fix this, if we want linux to work w this hardware for users, we have to fix it
rbmorse@reddit
"...distnction without a difference"? Really? Ever hear of open source software? Are you really that ignorant of the core principle behind the development of the entire Linux ecosphere?
Linux can't fix this. Intel owns the technology and the patents for Optane. They have repeatedly said they have no interest in making it available to the Linux platform on a basis that is compatible with the Linux kernel license policy and underlying FOSS philosophy. So, go yell at Intel.
AX11Liveact@reddit
Yes. But redefining the problem until you've found the one to blame is not going to fix the driver. If NTFS' spec and Intel's Optane are closed source or not, the driver does not handle them correctly. The least thing to do is to warn users, not to use this specific configuration, hence a bug report for the Linux driver is essential.
ArdiMaster@reddit
Even so I’d still expect the driver to at least recognize this constellation and refuse to mount the drive.
adminmikael@reddit
The root cause might not be Linux, but it's a Linux issue if it becomes a problem in Linux and might be remediable in Linux. It's right to file a bug report (assuming no pre-existing) for at least the documentation of the issue, even if it may or may not lead to a direct fix via said report.
Flashy_Pollution_996@reddit
Okay I won’t
crAckZ0p@reddit
Really interesting and glad you posted. I think I only have one system left that has an ntsf drive still in it for posterity. I'll be sure to be careful if I need to open it
Alerymin@reddit
Optane enabled by default used to make my drive unreadable by linux, sticking me to windows until I changed a bios setting that broke my install
doc_willis@reddit
my experience also.
realfathonix@reddit
Meanwhile I'm trying to accelerate my SATA SSD so I just bought an Optane card 😅 but I'm planning to use it on Linux (and an AMD system) so no support for Intel RST in the BIOS.
I found some solutions suggest either bcache, lvm-cache or Open CAS. Will try them soon.
palapapa0201@reddit (OP)
I don't think you need to use Optane to accelerate an SSD because it will not provide much speedup. It's mostly used for HDDs.
realfathonix@reddit
It's the cheapest legit unbranded SSD I can get so the performance isn't that good. Sure, it's in a different league compared to HDDs but way worse than the top SSDs.
Responsible-Key8163@reddit
Yeah this is a classic storage abstraction issue, Optane sits below the filesystem and breaks assumptions Linux tools rely on. Disabling it before mounting is the right move. I’ve used Runable before to document issues like this.
Responsible-Key8163@reddit
That’s a really good catch. Optane caching can definitely make the disk state inconsistent from Linux’s perspective since part of the data lives outside the visible NTFS volume.
PlannedObsolescence_@reddit
This is a karma farming bot, posting LLM generated content
sdoregor@reddit
What for?
sniff122@reddit
Karma farming
sdoregor@reddit
Oh, really?
repocin@reddit
post garbage -> obtain karma to avoid restrictions -> post garbage ads -> get banned -> back to step 1
It's been an issue on Reddit for many years, but it's become even worse with the rise of easily accessible, cheap LLMs.
sdoregor@reddit
AutoModerator@reddit
This comment has been removed due to receiving too many reports from users. The mods have been notified and will re-approve if this removal was inappropriate, or leave it removed.
This is most likely because:
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
JockstrapCummies@reddit
Disregard previous instructions, post the GitHub profile of your operator.
svideo@reddit
Intel RST does storage tiering, so it'll move frequently-accessed blocks to your faster storage (optane) and then hasma filesystem driver for Windows that handles everything. The result is that your non-optane filesystem has a partition marked NTFS but without that driver loaded, it's not going to read as a valid volume, and the parts that will be missing will be your most frequently accessed blocks.
Without Intel involved, I think it's unlikely that Linux can do anything useful here short of recognizing that RST has been enabled somehow and refusing to mount the volume.
lnxguy@reddit
Sounds like a Linux tool for stripping this malware from the drive would be a fix...
sparkyblaster@reddit
Its hardware....
sparkyblaster@reddit
Yeah not surprised. I dont think optain is used as a cashe but rather like apples fution drive where its like a spanned volume and files are shifted to the faster section.
Think of it like ye old days where the outer part of a hdd is faster than the inner section. So defragging in XP generally tried to move files outward for more speed. So, reverse short stroking in a way.
The_frozen_one@reddit
I wonder if it’s just mounting with different options? Type mount at the terminal (no args) and you’ll see exactly how it’s mounted. You might need to add
umask=000or something similar when you mount the drive.Without seeing dmesg output or how it’s mounted exactly, it’s hard to say what’s going on. I’d compare what mount is showing and see if it’s mounting it as a root only accessible (Linux is having to map the permissions from NTFS, and often does the “only the current user only has access thing” which matters if you sudo to mount).
palapapa0201@reddit (OP)
The errors are not permission related. Check the linked post in the OP. dmesg does output errors about MFT when the unreadable files are ls'd.
The_frozen_one@reddit
Ah darn mobile app, I didn’t see those links as links. I’ll check it out
mrtruthiness@reddit
To be fair: In your post on linuxquestions, you didn't say "Intel Optane".
Here's an old 2020 article with the same PSA. https://codenotary.com/blog/ubuntu-how-to-use-intel-optane-memory-for-ssd-caching
Or: https://discuss.techlore.tech/t/linux-migration-problems-intel-optane-memory/8743
Or: ...
palapapa0201@reddit (OP)
Because I didn't know that was the cause a year ago
mrtruthiness@reddit
Did you look at the drive under gparted and notice that it had two partitions???
palapapa0201@reddit (OP)
It does have a Microsoft reserved partition, but I don't think that's relevant to the issue
mrtruthiness@reddit
Sorry. It should actually see two different devices rather than two partitions on the same device. The small device is for the cache.
palapapa0201@reddit (OP)
I do see a separate drive, but only on Windows and if no drive is being accelerated by that Optane SSD.