Date: Thu, 18 Feb 2021 00:44:13 +0300 From: Artem Kuchin <artem@artem.ru> To: Walter von Entferndt <walter.von.entferndt@posteo.net> Cc: freebsd-fs@freebsd.org Subject: Re: Simulating bad sectors on file based storage device. How? Message-ID: <c4e6739d-e5e3-f7bd-9660-48691ea892b2@artem.ru> In-Reply-To: <2038526.4WAli8B44Z@t450s.local.lan> References: <mailman.67.1613563202.46674.freebsd-fs@freebsd.org> <2038526.4WAli8B44Z@t450s.local.lan>
next in thread | previous in thread | raw e-mail | index | archive | help
18.02.2021 0:37, Walter von Entferndt пишет: > At Mittwoch, 17. Februar 2021, 13:00:02 CET, Artem Kuchin > <artem@artem.ru> wrote: >> 15.02.2021 20:44, Alan Somers ?????: >>> If you have SCSI disks, you can inject errors with `sysctl >>> kern.cam.da.0.error_inject`.? If not, you can use gnop(8) to >>> simulate a flaky disk. >> gnop only allows to set probability, but i need an exact block in an >> exact place. >> > Then RTSL & adjust a few lines in the source of gnop(8) (/usr/src/sys/ > geom/nop/g_nop.c, the error is inserted @line 158-167). Search for > "failprob". It's very straightforward to adopt that and mimic a fail- > on-specific-block# by copy & paste & adjust that functionality. > > Obviously you'll have to recompile all userland software that accesses > the gnop(4), but these should be very few to none. True! Thank you for the idea! I forgot i can program C :) I can copy the source and just make my own utility. Artem
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c4e6739d-e5e3-f7bd-9660-48691ea892b2>