trim script outputs error if no devices in pool support trim
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zfs-linux (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
/usr/lib/
cannot trim: no devices in pool support trim operations
When this occurs via the crontab entry, the result is that cron sends an E-Mail to root with the output. So systems which have ZFS configured on a device that does not support TRIM (which includes not just legacy HDD's, but also dm-crypt devices (by default) even if they have an SSD lower layer) will get a nuisance E-Mail every month.
% lsb_release -rd
Description: Ubuntu 21.04
Release: 21.04
% apt-cache policy zfsutils-linux
zfsutils-linux:
Installed: 2.0.2-1ubuntu5.1
Candidate: 2.0.2-1ubuntu5.1
[ . . . ]
: What I expected to happen
The cronjob to silently complete without sending an error message (in the case where the only issue is that the pool has no devices that support TRTM)
: What happened instead
The crontab caused an E-Mail with the above mentioned error message to be send to root
(Note that there appears to be logic in the script to cause it to continue past such pools. But that doesn't prevent the message from being output and E-Mailed.)