[clug] how to erase a file

Eyal Lebedinsky eyal at eyal.emu.id.au
Wed Feb 9 03:25:47 MST 2011


I want to clear a raid mismatch. I already recovered the data and I now need
to write to each block of a list of files (the original bad ones). This will
fix the raid mismatch.

Simply writing to the file does not guaranty that the same blocks will be
written to in the fs - blocks may be allocated elsewhere.

If the above correct? Is there a simple way to either write zeroes to a file
ot even simply read-then-write-back each block? The disk does *not* have i/o
errors.

Naturally I can go the long way: delete the files (now all bad blocks are
unused) then fill the disk with a large file. But I still want to know if
I can do it quicker. Can debugfs do this?

TIA

-- 
Eyal Lebedinsky	(eyal at eyal.emu.id.au)


More information about the linux mailing list