[CentOS] LVM thin volumes fstrim operation not supported

Wed Jan 20 00:36:17 UTC 2016
Tim Robinson <terobinson at gmail.com>

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