Re: Fastest way to shrink/rewrite rbd image ?

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

 



Take a look at
http://ceph.com/docs/master/rbd/qemu-rbd/#enabling-discard-trim

I think if you enable TRIM support on your RBD, then run fstrim on your
filesystems inside the guest (assuming ext4 / XFS guest filesystem),
Ceph should reclaim the trimmed space.

On 28/11/14 17:05, Christoph Adomeit wrote:
> Hi,
> 
> I would like to shrink a thin provisioned rbd image which has grown to maximum.
> 90% of the data in the image is deleted data which is still hidden in the image and marked as deleted.
> 
> So I think I can fill the whole Image with zeroes and then qemu-img convert it.
> So the newly created image should be only 10% of the maximum size.
> 
> I will do something like
> qemu-img convert -O raw rbd:pool/origimage rbd:pool/smallimage
> rbd rename origimage origimage-saved
> rbd rename smallimage origimage
> 
> Would this be the best and fastest way or are there other ways to do this ?
> 
> Thanks
>   Christoph
> 
> 
> 


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




[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux