[CentOS] Utility to zero unused blocks on disk

Valeri Galtsev galtsev at kicp.uchicago.edu
Mon Feb 8 23:22:25 UTC 2016


On Mon, February 8, 2016 3:37 pm, Digimer wrote:
> Personally, I just do 'dd if=/dev/zero of=/path/to/zero.img bs=1M; rm -f
> /path/to/zero.img'. It's inelegant, for sure, but it works (note to run
> it as a normal user or else be careful of how your system reacts to
> running out of disk space for a moment).

This definitely does the trick. reallocated bad blocks aside, one path
writing zeroes on modern drives is sufficient, according to one nice paper
on the subject I remember. Does not comply DoD (and similar) secure data
destruction though... As it always is when army is concerned: overkill ;-)

Valeri

>
> fix-it-with-a-hammer-digimer
>
> On 08/02/16 04:34 PM, Wes James wrote:
>> Is there a utility to zero unused blocks on a disk?
>>
>> CentOS 6.7/Ext4
>>
>> I saw zerofree, but I’m not sure it would work on Ext4 or even work on
>> this version of CentOS.
>>
>> thanks,
>>
>> -wes
>> _______________________________________________
>> CentOS mailing list
>> CentOS at centos.org
>> https://lists.centos.org/mailman/listinfo/centos
>>
>
>
> --
> Digimer
> Papers and Projects: https://alteeve.ca/w/
> What if the cure for cancer is trapped in the mind of a person without
> access to education?
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> https://lists.centos.org/mailman/listinfo/centos
>


++++++++++++++++++++++++++++++++++++++++
Valeri Galtsev
Sr System Administrator
Department of Astronomy and Astrophysics
Kavli Institute for Cosmological Physics
University of Chicago
Phone: 773-702-4247
++++++++++++++++++++++++++++++++++++++++



More information about the CentOS mailing list