Re: read and write back full disk to trigger relocation
Date: Wed, 31 May 2023 07:30:43 UTC
On 5/30/23 16:49, Sysadmin Lists wrote: > David Christensen May 30, 2023, 4:16:09 PM >> I would say the experiment should be repeated on real HDD's, but how do >> I detect if identical data has being written to the platters? The HDD >> controller also has a cache and could optimize away such writes. > > Isn't that what dd is claiming authoritatively to be doing? Otherwise, putting > that example in the manpage is dangerous and can lead to unexpected data loss. > > I don't speak C++ very good, but here's the source: > https://github.com/coreutils/coreutils/blob/master/src/dd.c <snip> Looking at FreeBSD code will not provide information about the HDD controller hardware and firmware. David