[ale] Need an iso to wipe hard drives.
JK
jknapka at kneuro.net
Wed Apr 21 23:16:07 EDT 2010
On 4/21/2010 7:11 PM, Doug McNash wrote:
>
> ---- JK<jknapka at kneuro.net> wrote:
>> On 4/17/2010 8:20 PM, Doug McNash wrote:
>>>
>>> ---- Chris Fowler<cfowler at outpostsentinel.com> wrote:
>>>> I also used to have a program that I wrote which would open a file for RW and fill it with
>>>> random stuff. If would seek back to the beginning and repeat a few times then close and
>>>> finally delete.
>>>
>>> Unless this file is much bigger than the RAM used for file buffer caching (which on linux is
>>> quite a large percentage) not much is actually being written to the magnetic media unless you
>>> do a sync, fsync or unmount the drive.
>>
>>
>> Except that there's a kernel thread that writes dirty buffers to disk periodically. The
>> semantics of the "sync" system call are, "Write all dirty buffers to disk and don't return
>> until you're done". But in normal operation I'd be astonished if most dirty buffers weren't
>> written out within a few seconds, even without an explicit sync. Only if something was writing
>> data faster than it could be sent to disk, would there be much danger of having a lot of dirty
>> buffers in RAM for any length of time.
>>
>> Don't know about hardware disk caches, but that's what happens in the kernel. (Unless things
>> have changed a whole lot since 2.4.)
>>
>> -- JK
>>
>
> Yep, but Chris says he did an lseek to write over the file again which is probably fast enough to
> only write over the buffer, not the disk.
That is a very good point.
> Speaking of sync, in the old days we would sync three times (The syncing will be three - like the
> Monty Python Holy Hand Grenade) to make sure the data got to disk.
I learned that too, on my first day as a Unix (SunOS 4) admin in grad
school. "sync ; sync ; sync ; shutdown -h now".
-- JK
--
Forget Jesus: stars died so that you could be here today.
- physicist Lawrence Krauss
More information about the Ale
mailing list