fstrim-all needs hdparm but not depend on it

Bug #1278048 reported by Malte Swart on 2014-02-09
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
util-linux (Ubuntu)
Low
Martin Pitt

Bug Description

Package version: 2.20.1-5.1ubuntu14
Distro: Ubuntu Trusty Tahr (development branch)

/sbin/fstrim-all uses hdparm (line 53) but the util-linux does not depend on it.

This results e.g. in cron error mails like this:
/etc/cron.weekly/fstrim:
/sbin/fstrim-all: 1: /sbin/fstrim-all: hdparm: not found
run-parts: /etc/cron.weekly/fstrim exited with return code 127

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in util-linux (Ubuntu):
status: New → Confirmed
Marco Scholl (traxanos) wrote :

also we have the problem that we use virtuozzo (openvz) and when we install hdparm we got an error, too:

# /etc/cron.weekly/fstrim
/dev/ploop46078p1: Operation not permitted

i think the cron job "fstrim" should be in a separate package (depends hdparm).

Martin Pitt (pitti) wrote :

Fixed in util-linux packaging branch.

Changed in util-linux (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → Low
status: Confirmed → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package util-linux - 2.20.1-5.1ubuntu15

---------------
util-linux (2.20.1-5.1ubuntu15) trusty; urgency=medium

  * debian/fstrim-all: Whitelist OCZ, SanDisk, and Patriot too. (see LP
    #1259829)
  * debian/fstrim-all: Exit cleanly if hdparm got uninstalled. (LP: #1278048)
  * debian/fstrim-all: Don't print errors on mdadm devices. (LP: #1276941)
 -- Martin Pitt <email address hidden> Mon, 10 Mar 2014 13:18:58 +0100

Changed in util-linux (Ubuntu):
status: Fix Committed → Fix Released
Marco Scholl (traxanos) wrote :

i got this error now

root@ehysgdjahgdas:/# fstrim-all
/dev/ploop57216p1: No such file or directory

the fstrim-all should check if dev really exists

Hey Marco,

Marco Scholl [2014-03-10 16:31 -0000]:
> root@ehysgdjahgdas:/# fstrim-all
> /dev/ploop57216p1: No such file or directory
>
> the fstrim-all should check if dev really exists

Done in
https://launchpad.net/ubuntu/+source/util-linux/2.20.1-5.1ubuntu16

Thanks for pointing out!

Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Marco Scholl (traxanos) wrote :

Hey Martin,

i have test it and it works fine.

> no errors printed
> error code 0

thanks

Marco Scholl (traxanos) wrote :

in new version off ploop the container have ploop device. and so we got this error:

/etc/cron.weekly/fstrim:
/dev/ploop46078p1: Operation not permitted
run-parts: /etc/cron.weekly/fstrim exited with return code 1

and on a other system we have got this error again.

/etc/cron.weekly/fstrim:
hdparm not available, cannot TRIM

installed version is on both system: 2.20.1-5.1ubuntu16

Marco Scholl (traxanos) wrote :

its not possible to have a separate package for the trim logic. we didn't want to install it on virtual server.

Martin Pitt (pitti) wrote :

Marco, that's covered by bug 1293152. I'll make sure that this stays quiet/inert in a VM or container.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers