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
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). 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?
> On Feb 8, 2016, at 2:37 PM, Digimer <lists at alteeve.ca> 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). > > fix-it-with-a-hammer-digimer >Looks like it?s working. Thanks.> 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.
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. >I don't understand the point of doing this. If you want to sanitize the disk, use dban <dban.org>, which surely approaches industry standard for the open source answer. Just zeroing random blocks? Why? If you want to wipe a specific file, there's shred. mark
On 02/08/2016 03:05 PM, m.roth at 5-cent.us wrote:> 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. >> > I don't understand the point of doing this.Wes didn't say the reason he wanted to zero unused blocks, but I always do this in kickstart scripts when constructing VM images as the image size is considerably reduced by doing this... -Greg
hdparm supports ATA secure erase. This is SSD safe, unlike other options. It's faster than writing zeros to both HDD and SSD. Chris Murphy On Mon, Feb 8, 2016, 3:06 PM <m.roth at 5-cent.us> wrote:> 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. > > > I don't understand the point of doing this. If you want to sanitize the > disk, use dban <dban.org>, which surely approaches industry standard for > the open source answer. > > Just zeroing random blocks? Why? If you want to wipe a specific file, > there's shred. > > mark > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos >
DBAN is obsolete. NIST 800-88 for some time now says to use secure erase or enhanced security erase or crypto erase if supported. Other options do not erase data in remapped sectors. Chris Murphy
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 ++++++++++++++++++++++++++++++++++++++++
On 02/08/16 15:34, 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, >. a comment on replies to your post. i find it interesting that "Subject:" is and you ask for info to *zero unused blocks on disk* and all the replies for wiping the _entire_ disk. why is so hard to understand that _blocks_ does not mean _disk_. ((GBWG)) -- peace out. If Bill Gates got a dime for every time Windows crashes... ...oh, wait. He does. THAT explains it! -+- in a world with out fences, who needs gates. CentOS GNU/Linux 6.7 tc,hago. g .
On 09/02/16 12:08 AM, g wrote:> > > On 02/08/16 15:34, 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, >> > . > a comment on replies to your post. > > i find it interesting that "Subject:" is and you ask for info to > > *zero unused blocks on disk* > > and all the replies for wiping the _entire_ disk. > > why is so hard to understand that _blocks_ does not mean _disk_. ((GBWG))Not all of them. -- 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?
On 02/08/2016 07:38 PM, Always Learning wrote:> I unscrew the casing, extract the disk platter(s), slide a very strong > magnet over both sides of the platter surface then bend the platter in > half. > > How secure is that ? >Actually, while there is some good security to that it's not for the reason you might suspect. Just taking the platters out is enough, for most drives, unless you have the proper precision jigs necessary to get them properly realigned. But a static permanent magnet can leave a lot more than you think; degaussing is almost always done with alternating magnetic fields and exponential decay. The exponential decay is the key, and a proper set of passes with a permanent magnet taken at roughly exponentially-decaying heights will do the job (screwdriver demagnetizers have steps in their casing to do this). An AC degausser needs to be kept on while removing from the media to fully degauss (or you end up with more residual magnetism (hysteresis) than can be overcome by the heads). Piranha solution does a number on all known magnetic media (and skin), but bringing the media up to transition temperature will also effectively degauss. So melting it down is guaranteed, and fun (but remove the printed circuit board and all other plastics first......).
Possibly Parallel Threads
- Utility to zero unused blocks on disk
- Utility to zero unused blocks on disk
- Utility to zero unused blocks on disk
- What is the universal (world wide) understanding behind degaussing harddisks?
- What is the universal (world wide) understanding behind degaussing harddisks?