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 e

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 r

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 oper

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 on

Re: Is rbd_discard enough to wipe an RBD image?

2015-12-21 Thread Jason Dillaman
t; To: "Wido den Hollander" > Cc: "ceph-devel" > Sent: Monday, December 21, 2015 9:25:15 AM > Subject: Re: Is rbd_discard enough to wipe an RBD image? > > >>I just want to know if this is sufficient to wipe a RBD image? > > AFAIK, ceph write zeroes in

Re: Is rbd_discard enough to wipe an RBD image?

2015-12-21 Thread Alexandre DERUMIER
set to true to skip zeroing the range. - Mail original - De: "Wido den Hollander" À: "ceph-devel" Envoyé: Dimanche 20 Décembre 2015 22:21:50 Objet: Is rbd_discard enough to wipe an RBD image? Hi, I'm busy implementing the volume wiping method of the libvirt stora

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