fstrim -av tries to trim read only mounted ntfs-3g and fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
util-linux (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
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,
UUID=censored /media/Win7 ntfs-3g ro,nofail,
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
ProcVersionSign
Uname: Linux 4.18.0-8-generic x86_64
NonfreeKernelMo
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)
Status changed to 'Confirmed' because the bug affects multiple users.