Tim Robinson
2016-Jan-19 21:29 UTC
[CentOS] LVM thin volumes fstrim operation not supported
Hi All I'm trying to setup my LVM thin pool to support discards so that the pool can reclaim space even if the underlying device doesn't support trim. It is my understanding that all thin pools should support trim even if the underlying device doesn't. (please correct me if I'm wrong here) I have one centos server that does support trim and everything is working correctly but any new servers and thin pools throw the error below. # fstrim -v /mnt/data00 fstrim: /mnt/data00: the discard operation is not supported I can't find any differences in the LVM configuration between the two servers, they both have the lv discards set to passthough. Can anyone tell me if I'm missing something when creating the thin pool that would allow me to perform the fstrim. I'm using xfs on all of the lvs. Thanks, Tim
Chris Murphy
2016-Jan-19 22:46 UTC
[CentOS] LVM thin volumes fstrim operation not supported
My guess? The passthrough is causing the error when the command passes through to the actual device, which doesn't support Trim. I don't know how it actually works, but you can try to poke it with this stick: copy a large file to this LV. Check the LV with lvdisplay. Delete the file. Fstrim. Lvdisplay. Now compare the two lvdisplay results. It should show the PEs used are less after fstrim. Chris Murphy
Tim Robinson
2016-Jan-20 00:36 UTC
[CentOS] LVM thin volumes fstrim operation not supported
I still get the "the discard operation is not supported" fstrim error when the LVs are set to "nopassdown" Seems that when I use ext4 the fstrim reports that it worked but the LVs Data% does not decrease after the fstrim. xfs just throws the error. I've also been looking at the output of lsblk -D # lsblk -D NAME DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO xvdb 0 0B 0B 0 ??data-pool00_tmeta 0 0B 0B 0 ? ??data-pool00-tpool 0 0B 0B 0 ? ??data-pool00 0 0B 0B 0 ? ??data-data 0 0B 0B 0 ??data-pool00_tdata 0 0B 0B 0 ??data-pool00-tpool 0 0B 0B 0 ??data-pool00 0 0B 0B 0 ??data-data 0 0B 0B 0 I expect the DISC-GRAN and DISC-MAX to be greater than 0B. On 20 January 2016 at 09:46, Chris Murphy <lists at colorremedies.com> wrote:> My guess? The passthrough is causing the error when the command passes > through to the actual device, which doesn't support Trim. > > I don't know how it actually works, but you can try to poke it with this > stick: copy a large file to this LV. Check the LV with lvdisplay. Delete > the file. Fstrim. Lvdisplay. Now compare the two lvdisplay results. > > It should show the PEs used are less after fstrim. > > > Chris Murphy > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos
Maybe Matching Threads
- LVM thin volumes fstrim operation not supported
- LVM thin volumes fstrim operation not supported
- Live Migration failure: this function is not supported by the connection driver: virDomainMigrateToURI2
- About ZFS compatibility
- [patch] Threading support in ssh-agent