Re: Is rbd_discard enough to wipe an RBD image?

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

 



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 only time zeros are written to disk is if you specify an offset somewhere in the middle of an object (i.e. the whole object cannot be deleted nor can it be truncated) -- this is the partial discard case controlled by that configuration param.  

-- 

Jason Dillaman 


----- Original Message -----
> From: "Alexandre DERUMIER" <aderumier@xxxxxxxxx>
> To: "Wido den Hollander" <wido@xxxxxxxx>
> Cc: "ceph-devel" <ceph-devel@xxxxxxxxxxxxxxx>
> 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 the rados objects with discard is used.
> 
> They are an option for skip zeroes write if needed
> 
> OPTION(rbd_skip_partial_discard, OPT_BOOL, false) // when trying to discard a
> range inside an object, set to true to skip zeroing the range.
> ----- Mail original -----
> De: "Wido den Hollander" <wido@xxxxxxxx>
> À: "ceph-devel" <ceph-devel@xxxxxxxxxxxxxxx>
> 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 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 table + filesystem are gone on
> the RBD image after I've run rbd_discard.
> 
> I just want to know if this is sufficient to wipe a RBD image? Or would
> it be better to fully fill the image with zeroes?
> 
> --
> Wido den Hollander
> 42on B.V.
> Ceph trainer and consultant
> 
> Phone: +31 (0)20 700 9902
> Skype: contact42on
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux