I've made a patch and tested it in my lab where it successfully clean-up machines with bcache, mdadm, LVM or a combination of them on top of multiple disks whereas it used to leave a lot of leftovers on the drives while still working extremely quickly.
(it takes a few seconds to run completely on a server in my lab)
An example of output from the cleaning script would be like below :
vda, vdb, vdc to be wiped.
/sys/fs/bcache/3427372a-636a-408c-b4cb-f65c185e4022 : bcache detected
stopping bcache in /sys/fs/bcache/3427372a-636a-408c-b4cb-f65c185e4022
cleaning filesystem above raid md126
raid md126: filesystem successfully quickly wiped.
mdadm: stopped md126
raid md126: successfully deactivated.
cleaning filesystem above raid md127
raid md127: filesystem successfully quickly wiped.
mdadm: stopped md127
raid md127: successfully deactivated.
vda: starting quick wipe.
vda1: partition was wiped successfully
vda2: partition was wiped successfully
vda3: partition was wiped successfully
vda: successfully quickly wiped.
vdb: starting quick wipe.
vdb1: partition was wiped successfully
vdb2: partition was wiped successfully
vdb3: partition was wiped successfully
vdb: successfully quickly wiped.
vdc: starting quick wipe.
vdc1: partition was wiped successfully
vdc2: partition was wiped successfully
vdc: successfully quickly wiped.
All disks have been successfully wiped.
I've made a patch and tested it in my lab where it successfully clean-up machines with bcache, mdadm, LVM or a combination of them on top of multiple disks whereas it used to leave a lot of leftovers on the drives while still working extremely quickly.
(it takes a few seconds to run completely on a server in my lab)
An example of output from the cleaning script would be like below : bcache/ 3427372a- 636a-408c- b4cb-f65c185e40 22 : bcache detected bcache/ 3427372a- 636a-408c- b4cb-f65c185e40 22
vda, vdb, vdc to be wiped.
/sys/fs/
stopping bcache in /sys/fs/
cleaning filesystem above raid md126
raid md126: filesystem successfully quickly wiped.
mdadm: stopped md126
raid md126: successfully deactivated.
cleaning filesystem above raid md127
raid md127: filesystem successfully quickly wiped.
mdadm: stopped md127
raid md127: successfully deactivated.
vda: starting quick wipe.
vda1: partition was wiped successfully
vda2: partition was wiped successfully
vda3: partition was wiped successfully
vda: successfully quickly wiped.
vdb: starting quick wipe.
vdb1: partition was wiped successfully
vdb2: partition was wiped successfully
vdb3: partition was wiped successfully
vdb: successfully quickly wiped.
vdc: starting quick wipe.
vdc1: partition was wiped successfully
vdc2: partition was wiped successfully
vdc: successfully quickly wiped.
All disks have been successfully wiped.