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
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
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@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@centos.org https://lists.centos.org/mailman/listinfo/centos
Looked into this further and it looks like a kernel bug. If I downgraded the running kernel everything started working again. I've reported here https://bugs.centos.org/view.php?id=10191 with some more details.
Thanks
On 20 January 2016 at 11:36, Tim Robinson terobinson@gmail.com wrote:
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@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@centos.org https://lists.centos.org/mailman/listinfo/centos