Date: Wed, 17 Feb 2021 17:06:59 -0800 From: Kirk McKusick <mckusick@mckusick.com> To: Artem Kuchin <artem@artem.ru> Cc: "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org> Subject: Re: Simulating bad sectors on file based storage device. How? Message-ID: <202102180107.11I16xkk087677@chez.mckusick.com>
index | next in thread | raw e-mail
> Date: Tue, 16 Feb 2021 16:05:03 +0300 > From: Artem Kuchin <artem@artem.ru> > To: Alan Somers <asomers@freebsd.org> > Cc: freebsd-fs <freebsd-fs@freebsd.org> > Subject: Re: Simulating bad sectors on file based storage device. How? > > gnope only allows to set probability, but i need an exact block in an > exact place. I have a hacked up version of gnop that adds the -F option to tell it to fail any access to a specific set of sectors. So to make /dev/da0p1 into a disk that failed sectors 64-71, I use # gnop create -F 64-71 /dev/da0p1 which creates /dev/da0p1.nop with the desired property. No damage is done to /dev/da0p1 beyond the fact that no writes to the specified range will be made. If this driver would be useful, let me know and I'll dig it out. Kirk McKusickhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202102180107.11I16xkk087677>
