1

Some days ago I've bought an SSD: Samsung 850 EVO 250 GB; on this drive I made two 125 GB partitions: on the first partition I installed Windows 7 on NTFS; on the second partition I installed Haiku (the OS).

On Windows 7, also thanks to "Samsung Magician" utility, I see that trim is properly enabled and properly works. However, on the second partition, where Haiku is installed (BeFS partition), I have some troubles with trim: on Haiku there is available the fstrim command line utility (which has to be run manually). However, on Haiku, fstrim is in a primordial state, which means, at least in my case, that I cannot regain free space when I delete files on the BeFS partition. I got it that I cannot trim the BeFS partition from others operating systems, since the BeFS filesystem is not supported/recognised by other operating systems. This lead me to be worried about the health and lifespan of my SSD.

Here lies my question: there is a way to regain free space on SSD partition when the filesystem is not recognized by operating systems which, however, support trim? Please notice that on Haiku is possible to compile GNU and open source utilities and also run most of CLI unix utilities (check HaikuPorts on GitHub).

Side notes: I'm really sorry since I'm not very good to express myself in english (since is not my main language), if I went wrong by using some terms. Also for the fact that I still cannot post more than two links due to the fact that I don't have 10 points of reputation.

  • 1
    Does the BeFS file system implementation support trim? Only the file system knows which blocks are in use and which can be trimmed. – Johan Myréen Aug 10 '17 at 4:55
0

Trimming a filesystem involves two steps:

  1. Determine which parts of the disk the filesystem is not using, i.e. determine which blocks are free. Preferably, at this stage, move free blocks around to get as many consecutive free blocks as possible. (This is desirable because flash erase blocks are typically larger than a filesystem block.)
  2. Send an erase command to the flash drive for all the flash erase blocks that don't contain any useful data.

Step 2 could be done on any operating system that is able to talk to the flash drive. But step 1 requires knowledge of the filesystem. Making fstrim work is the only solution, and it's more likely that someone will get it working for BeFS on Haiku than on some other OS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.