Right now in 19.10, /lib/systemd/system/fstrim.service runs /sbin/fstrim
--fstab --verbose --quiet , which doesn't cause the service to report
these errors. According to the fstrim man page, for the --fstab option:
"Errors from filesystems that do not support the  discard  operation,
read-only  devices  and read-only filesystems are silently ignored."


So, I consider this fixed now. Feel free to close the issue.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to util-linux in Ubuntu.
https://bugs.launchpad.net/bugs/1797717

Title:
  fstrim -av tries to trim read only mounted ntfs-3g and fails

Status in util-linux package in Ubuntu:
  Confirmed

Bug description:
  If I run sudo fstrim -av I see:
  /media/SSD_Data: 2 GiB (2145820672 bytes) trimmed
  fstrim: /media/Win7: FITRIM ioctl failed: Bad file descriptor
  /: 26.9 GiB (28823887872 bytes) trimmed

  /media/SSD_Data is read-write mounted NTFS via ntfs-3g, and /media/Win7 is 
read-only mounted NTFS, also via ntfs-3g. Lines from fstab:
  UUID=censored /media/SSD_Data ntfs-3g 
rw,noatime,nofail,big_writes,windows_names,nosuid,nodev,allow_other,hide_hid_files,inherit,noexec
 0 0
  UUID=censored /media/Win7 ntfs-3g 
ro,nofail,big_writes,windows_names,nosuid,nodev,allow_other,noexec,hide_hid_files
 0 0

  If I do sudo umount /media/Win7 and then sudo mount -o rw /media/Win7
  then sudo fstrim -av takes longer and succeeds for all filesystems.
  So, it seems the read only is the problem.

  This seems cosmetic, but it causes periodic runs of fstrim via systemd
  to report failures.

  ProblemType: Bug
  DistroRelease: Ubuntu 18.10
  Package: util-linux 2.32-0.1ubuntu1
  ProcVersionSignature: Ubuntu 4.18.0-8.9-generic 4.18.7
  Uname: Linux 4.18.0-8-generic x86_64
  NonfreeKernelModules: nvidia
  ApportVersion: 2.20.10-0ubuntu11
  Architecture: amd64
  CurrentDesktop: XFCE
  Date: Sat Oct 13 15:25:41 2018
  SourcePackage: util-linux
  UpgradeStatus: Upgraded to cosmic on 2018-10-11 (2 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1797717/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to