Re: Is rbd_discard enough to wipe an RBD image?

2015-12-22 Thread Wido den Hollander
On 12/21/2015 11:20 PM, Josh Durgin wrote: > On 12/21/2015 11:00 AM, Wido den Hollander wrote: >> My discard code now works, but I wanted to verify. If I understand Jason >> correctly it would be a matter of figuring out the 'order' of a image >> and call rbd_discard in a loop until you reach the

Re: Is rbd_discard enough to wipe an RBD image?

2015-12-21 Thread Wido den Hollander
On 12/21/2015 04:50 PM, Josh Durgin wrote: > On 12/21/2015 07:09 AM, Jason Dillaman wrote: >> You will have to ensure that your writes are properly aligned with the >> object size (or object set if fancy striping is used on the RBD >> volume). In that case, the discard is translated to remove

Re: Is rbd_discard enough to wipe an RBD image?

2015-12-21 Thread Josh Durgin
On 12/21/2015 11:00 AM, Wido den Hollander wrote: My discard code now works, but I wanted to verify. If I understand Jason correctly it would be a matter of figuring out the 'order' of a image and call rbd_discard in a loop until you reach the end of the image. You'd need to get the order via

Re: Is rbd_discard enough to wipe an RBD image?

2015-12-21 Thread Alexandre DERUMIER
t, set to true to skip zeroing the range. - Mail original - De: "Wido den Hollander" <w...@42on.com> À: "ceph-devel" <ceph-devel@vger.kernel.org> Envoyé: Dimanche 20 Décembre 2015 22:21:50 Objet: Is rbd_discard enough to wipe an RBD image? Hi, I'm busy

Re: Is rbd_discard enough to wipe an RBD image?

2015-12-21 Thread Josh Durgin
On 12/21/2015 07:09 AM, Jason Dillaman wrote: You will have to ensure that your writes are properly aligned with the object size (or object set if fancy striping is used on the RBD volume). In that case, the discard is translated to remove operations on each individual backing object. The

Re: Is rbd_discard enough to wipe an RBD image?

2015-12-21 Thread Jason Dillaman
quot; <aderum...@odiso.com> > To: "Wido den Hollander" <w...@42on.com> > Cc: "ceph-devel" <ceph-devel@vger.kernel.org> > Sent: Monday, December 21, 2015 9:25:15 AM > Subject: Re: Is rbd_discard enough to wipe an RBD image? > > >>I just want to kn

Is rbd_discard enough to wipe an RBD image?

2015-12-20 Thread Wido den Hollander
Hi, I'm busy implementing the volume wiping method of the libvirt storage pool backend and instead of writing to the whole RBD image with zeroes I'm using rbd_discard. Using a 4MB length I'm starting at offset 0 and work my way through the whole RBD image. A quick try shows me that my partition