[haiku-bugs] Re: [Haiku] #10336: TRIM / fstrim can destroy data on SSD's when executed

  • From: "Giova84" <trac@xxxxxxxxxxxx>
  • Date: Wed, 09 Aug 2017 12:41:42 -0000

#10336: TRIM / fstrim can destroy data on SSD's when executed
----------------------------+----------------------------
   Reporter:  kallisti5     |      Owner:  axeld
       Type:  bug           |     Status:  in-progress
   Priority:  blocker       |  Milestone:  R1/beta1
  Component:  Drivers/Disk  |    Version:  R1/Development
 Resolution:                |   Keywords:  TRIM fstrim
 Blocked By:                |   Blocking:
Has a Patch:  1             |   Platform:  All
----------------------------+----------------------------

Comment (by Giova84):

 I'm keep on doing little tests.

 After rebooted Haiku I deleted a zip file of about 5 MiB, then I run again
 fstrim: it immediately (not after some time) triggered the same KDL and
 again I had to force the reboot (using CTRL ALT CANC). At the next boot I
 was puzzled, because yesterday the fstrim command run fine without
 troubles, so I attempted again, but this time before of the fstrim I tried
 to run the sync command. I don't know if was just casuality, but now
 fstrim didn't triggered the KDL.
 Like yesterday it tooked 42 seconds to trim 24412811264 bytes.

 Obviously I want avoid to damage the disk or the Haiku partition, as I
 want to avoid to lost or damage my data (for what is worth, checkfs gave
 no errors).
 After some readings on Google, I read that the manual fstrim command (I
 read some forums of Linux users, since they also have the fstrim command -
 and some people run fstrim using cron) usually must be run daily or
 weekly.

 I'd like to properly maintain my SSD. So: how can I check if the fstrim
 command on Haiku really clears free space?

--
Ticket URL: <https://dev.haiku-os.org/ticket/10336#comment:34>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: