When a KVM virtual server is deleted you can use the disk scrubbing option to write zero's across the logical volume before the space becomes available to other virtual servers.
Be aware that scrubbing disks is IO intensive!
To enable disk scrubbing on a per hypervisor basis you need to create a configuration file on that hypervisor.
The configuration file serves two purposes, to enable disk scrubbing and to refine the default disk scrubbing configuration.
If the configuration file contains no settings the defaults are used. A block size of 1M, ionice -c2, 1 pass of the disk, no throttling.
You have the option to change the defaults by using the following settings in the configuration file:
;; 1 for real time, 2 for best-effort (default), 3 for idle ionice = 2 ;; Block size in MB (1 <> 128), 1 - default block_size = 1 ;; How many times to write over the disk (1 <> 20), 1 - default passes = 1 ;; command by your choice to limit disk IO load, empty by default ;; you are required to install corresponding software to the node (e.g., 'yum install pv') ;throttling = 'pv --rate-limit 100m'
Example of scrubbing command without throttling specified:
dd if=/dev/zero of=PATH_TO_LV bs=1M
Example of scrubbing command with throttling:
dd if=/dev/zero bs=1M | pv --rate-limit 100m | dd bs=1M of=PATH_TO_LV
If disk scrubbing is enabled all deleted virtual servers disks will be renamed and queued for the scheduler to pick up and zero the disks. Only one disk will be scrubbed at any one time.