Re: read and write back full disk to trigger relocation
Date: Wed, 31 May 2023 21:44:58 UTC
> ---------------------------------------- > From: David Christensen <dpchrist@holgerdanske.com> > Date: May 31, 2023, 12:30:43 AM > To: <questions@freebsd.org> > Subject: Re: read and write back full disk to trigger relocation > > > 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 > > You're still not getting it: *they* are the ones claiming to be effectively writing out those blocks. It's up to them to validate that claim by accounting for whatever HDD controller hardware and firmware are doing. There's no magic at play; either the source code proves their claims and assumptions or it doesn't. Perhaps you can submit a bug report asking them to remove that example from the manpage, with something like "you can't make that claim without knowing what every HDD controller hardware and firmware are doing." Will be interested in their response. -- Sent with https://mailfence.com Secure and private email