[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [linux-lvm] LVM & fstrim behaviour (Fedora 19)



I followed your example and trims seems to work (based on the lvs
output) but as you can see, there seems to be something wrong with the
"fstrim -v" output (it shows as if nothing is being trimmed).


# lvs vgthin1
  lvol1      vgthin1 Vwi-aotz- 100.78g lvthinpool   3.20

  lvthinpool vgthin1 twi-a-tz- 100.68g              3.20

# mount /var/lib/libvirt/images
# fstrim -v /var/lib/libvirt/images
/var/lib/libvirt/images: 97.6 GiB (104814780416 bytes) trimmed

# dd if=/dev/zero of=/var/lib/libvirt/images/file bs=1M count=1024
# dd if=/dev/zero of=/var/lib/libvirt/images/file1 bs=1M count=1024
# dd if=/dev/zero of=/var/lib/libvirt/images/file2 bs=1M count=1024

# sync
# lvs vgthin1
  lvol1      vgthin1 Vwi-aotz- 100.78g lvthinpool   6.18

  lvthinpool vgthin1 twi-a-tz- 100.68g              6.18

# rm -f /var/lib/libvirt/images/file
# sync
# fstrim -v /var/lib/libvirt/images
/var/lib/libvirt/images: 0 B (0 bytes) trimmed

# lvs vgthin1
  lvol1      vgthin1 Vwi-aotz- 100.78g lvthinpool   5.19

  lvthinpool vgthin1 twi-a-tz- 100.68g              5.19

# rm -f /var/lib/libvirt/images/file*
# sync
# fstrim -v /var/lib/libvirt/images
/var/lib/libvirt/images: 0 B (0 bytes) trimmed

# lvs vgthin1

  lvol1      vgthin1 Vwi-aotz- 100.78g lvthinpool   3.20

  lvthinpool vgthin1 twi-a-tz- 100.68g              3.20

# lvm version
  LVM version:     2.02.98(2) (2012-10-15)
  Library version: 1.02.77 (2012-10-15)
  Driver version:  4.24.0

# dd if=/dev/zero of=/var/lib/libvirt/images/tempfile bs=1M count=40000
# lvs vgthin1
  lvol1      vgthin1 Vwi-aotz- 100.78g lvthinpool   41.84

  lvthinpool vgthin1 twi-a-tz- 100.68g              41.89

# rm -f /var/lib/libvirt/images/tempfile
# sync
# fstrim -v /var/lib/libvirt/images
/var/lib/libvirt/images: 0 B (0 bytes) trimmed

# lvs vgthin1

  lvol1      vgthin1 Vwi-aotz- 100.78g lvthinpool   3.08

  lvthinpool vgthin1 twi-a-tz- 100.68g              3.09


As you may see, this is the behaviour I'm getting now (fstrim reports
nothing being trimmed although it is being trimmed).  I can't recreate
the original problem when I opened the bug (fstrim reporting always 124
MiB).  I'm not sure if any update had to do anything with it.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]