Sample Header Ad - 728x90

How to perform fstrim on a loop device?

5 votes
1 answer
1309 views
I have LVM with thin-provisioning enabled. I have two almost identical thin logical volumes with ext4 file systems that slightly differs. The first volume is used entirely for storing file system. On the second volume file system is stored with a small offset. It is mounted with -o offset=1048576 option. First volume could be cleaned with the fstrim command, but the second one could not. It gives the error instead: fstrim: second: the discard operation is not supported That is because of offset mounting I believe. Receiving offset option mount command creates temporary loop device and mounts it. So the main suspect is loop device. Is it possible somehow to clean filesystem that has offset to the volume start block address?
Asked by ayvango (397 rep)
Oct 15, 2016, 11:54 PM
Last activity: Jul 23, 2023, 09:40 AM