Ask Ubuntu Asked by user259452 on August 21, 2020
I have three questions for Ubuntu and TRIM/SSD experts.
Now, I spent weeks trying to get this info from the web. Some sources say NTFS does support TRIM, others say Win7 supports it (while using NTFS). Some sources say fstrim TRIMs the whole physical drive while others say it only TRIMs the current partition.
Is “fstrim /” in the scenario above applies to 16 GiB ext4 partition only, or to the whole 128Gb drive?
If it only applies to the ext4 partition, is it possible at all to TRIM the first NTFS partition (from either Ubuntu or WinXP, but only using Ubuntu native or Win built-in tools, without dodgy software.com downloads)? Could hdparm and moving/copying physical sectors do anything to help? Partition cloning whatever?
What is the worst-case scenario if TRIM is not possible for NTFS: are there any firmware garbage collectors that could do similar thing without OS commands?
Please do not recommend switching to Win 7 whatsoever – I’m still happy with the development environment under Win XP. I’m still happy to use “out-of-date” OS if it boots in 7 seconds, gives immediate response to anything you do, and loads Photoshop in 3 seconds (for the first run:)
Thank you in advance,
Yaroslav
I got as far as to understand gnulinux can do it, but only to a FAT32 partition, and mounting it somehow in something, looking to figure out how. Have Windows XP installed coincidentally (but otherwise would have just reinstalled it on the format) on Fat32 due to otherwise not working on the SSD (tip maybe!). Extra info of some use to someone may be.
Answered by user1116745 on August 21, 2020
Update, looks like NTFS-3g got fstrim
support in a patch from 2014-June.
Ubuntu 15.04 worked fine with fstrim
on a loopback-mounted NTFS filesystem image I wanted to make sparser. If 15.04's version of ntfs-3g includes that patch, it should work on mounted partitions, too.
Other than that, ntfs-3g includes an ntfswipe
command, which writes zeros over all unused space. Don't use that on an SSD, it would increase wear. I considered using it, then running fallocate --dig-holes
(to sparse-ify all 4k blocks that were all zeros). IDK fallocate
maps to discard/trim when used on a block device, but it may. Anyway, use fstrim
to discard WITHOUT writing with zeroes first, since that works now.
What is the worst-case scenario if TRIM is not possible for NTFS: are there any firmware garbage collectors that could do similar thing without OS commands?
No, trimming the free space of an NTFS filesystem requires a tool that understands NTFS. Nobody's crazy enough to put something like that into SSD firmware, since it's a job better done by whatever software on the computer is reading the NTFS.
Answered by Peter Cordes on August 21, 2020
Yes, it only applies to the one partition you run it on, and it should work just fine if you run it on your ntfs partition isntead of /.
Answered by psusi on August 21, 2020
TRIM is a filesystem level operation. It needs to know which sectors of the disk are free so that it can inform the hardware. Neither "Discard" nor "Trim" are documented features of the ntfs-3g
driver so I would suggest that no, this probably isn't possible.
There have also been a few separate calls for this but it's a feature that would only really affect a few people.
My only real long-term solutions are:
Answered by Oli on August 21, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP