fstrim fails on some drives with "the discard operation is not supported"

Bug #1976121 reported by Jeff Lane 
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Provider - Base
Expired
Undecided
Unassigned
Checkbox Provider - Resource
Expired
Undecided
Unassigned

Bug Description

sometimes fstrim fails with this message:

fstrim: /: the discard operation is not supported

This seems to provide some clue:

https://askubuntu.com/questions/511374/fstrim-does-not-work-for-ext4-as-root
+++++
Specifically this comment:
Is trim actually supported by your SSD ? Type

sudo hdparm -I /dev/sda | grep TRIM
(assuming sda is your drive).

Is there a line saying that TRIM is supported ?
+++++

We need to see if we can reproduce this on NVMe and SSDs in the lab, but I suspect we should really have some update to the block_device_resource.py script to create a new constraint like

block_device_resource.fstrim = supported

and then only run the fstrim test if the drive says it supports trim.

Tags: servcert-381
Jeff Lane  (bladernr)
summary: - fstrim fails when not supported
+ fstrim fails on some drives with "the discard operation is not
+ supported"
affects: plainbox-provider-certification-server → plainbox-provider-checkbox
tags: added: servcert-381
Revision history for this message
Maksim Beliaev (beliaev-maksim) wrote :

Bug was migrated to GitHub: https://github.com/canonical/checkbox/issues/230.
Bug is no more monitored here.

Changed in plainbox-provider-checkbox:
status: New → Expired
Revision history for this message
Maksim Beliaev (beliaev-maksim) wrote :

Bug was migrated to GitHub: https://github.com/canonical/checkbox/issues/231.
Bug is no more monitored here.

Changed in plainbox-provider-resource:
status: New → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.