On Mon, Mar 12, 2018 at 9:54 AM, Fulvio Galeazzi
<fulvio.galea...@garr.it> wrote:
> Hallo all,
>     I am not sure RBD discard is working in my setup, and I am asking for
> your help.
>     (I searched this mailing list for related messages and found one by
>     Nathan Harper last 29th Jan 2018 "Debugging fstrim issues" which
>     however mentions trimming was masked by logging... so I am not 100%
>     sure of what is the expected result)
>
> I am on Ocata, and Ceph 10.2.10.
> Followed the recipe:
> https://www.sebastien-han.fr/blog/2015/02/02/openstack-and-ceph-rbd-discard/
>  * setup Nova adding to /etc/nova/nova.conf
> ...
> [libvirt]
> hw_disk_discard = unmap
> ...
>  * decorated a CentOS image with hw_scsi_model=virtio--scsi,hw_disk_bus=scsi

Is that just a typo for "hw_scsi_model"?

>  * created a VM with boot disk on Ceph (my default is ephemeral,
>    though), verified the XML shows my disk is scsi,
>
>
> I see that commands:
> rbd --cluster cephpa1 diff cinder-ceph/${theVol} | awk '{ SUM += $2 } END {
> print SUM/1024/1024 " MB" }' ; rados --cluster cephpa1 -p cinder-ceph ls |
> grep rbd_data.{whatever} | wc -l

That's pretty old-school -- you can just use 'rbd du" now to calculate
the disk usage.

>  show the size increases but does not decrease when I execute delete the
> temporary file and execute
>         sudo fstrim -v /
>
>   Am I missing something?

Have you verified that your VM is indeed using virtio-scsi? Does
blktrace show SCSI UNMAP operations being issued to the block device
when you execute "fstrim"?

>   I do see that adding/removing files created with dd does not always result
> in a global size increase, it is as if the dirty blocks are kept around and
> reused. Is this the way discard is supposed to work?
>
>   Thanks for your help!
>
>                         Fulvio
>
>
> _______________________________________________
> ceph-users mailing list
> ceph-users@lists.ceph.com
> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>



-- 
Jason
_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to