I have a server I don't have physical access to right now, which has a broken SATA disk that produces mostly errors (but not entirely). The disk has two partitions that are part of a zpool each. I can't bring the system up with this disk being online, because ZFS is trying its darndest to use it. I already renamed the GPT partitions in the hope that ZFS would not find them anymore, but it does. I can't gpart destroy -f ada1 because "device busy". Is there a way, ideally in the loader, to tell the kernel to ignore ada1 and/or ahcich5? Or can I force ZFS some other way to ignore the disk? I do have a spare disk I can use to replace the failed one, but I can't get the machine into a state where I could even issue the zpool replace command. Stefan -- Stefan Bethke <stb at lassitu.de> Fon +49 151 14070811 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 529 bytes Desc: Message signed with OpenPGP URL: <http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20200412/8884f36a/attachment.sig>
12.04.2020 21:37, Stefan Bethke wrote:> I have a server I don't have physical access to right now, which has a broken SATA disk that produces mostly errors (but not entirely). > > The disk has two partitions that are part of a zpool each. I can't bring the system up with this disk being online, because ZFS is trying its darndest to use it. > > I already renamed the GPT partitions in the hope that ZFS would not find them anymore, but it does. > > I can't gpart destroy -f ada1 because "device busy". > > Is there a way, ideally in the loader, to tell the kernel to ignore ada1 and/or ahcich5? Or can I force ZFS some other way to ignore the disk? I do have a spare disk I can use to replace the failed one, but I can't get the machine into a state where I could even issue the zpool replace command.It depends on the HDD controller the disk is attached to. What controller and driver does it have?
On Sun, Apr 12, 2020 at 04:37:06PM +0200, Stefan Bethke wrote:> I have a server I don't have physical access to right now, which has a broken SATA disk that produces mostly errors (but not entirely). > > The disk has two partitions that are part of a zpool each. I can't bring the system up with this disk being online, because ZFS is trying its darndest to use it. > > I already renamed the GPT partitions in the hope that ZFS would not find them anymore, but it does. > > I can't gpart destroy -f ada1 because "device busy". > > Is there a way, ideally in the loader, to tell the kernel to ignore ada1 and/or ahcich5? Or can I force ZFS some other way to ignore the disk? I do have a spare disk I can use to replace the failed one, but I can't get the machine into a state where I could even issue the zpool replace command.`zpool offline pool device` if you have enoght redundancy?
On Sun, 2020-04-12 at 16:37 +0200, Stefan Bethke wrote:> I have a server I don't have physical access to right now, which has > a broken SATA disk that produces mostly errors (but not entirely). > > The disk has two partitions that are part of a zpool each. I can't > bring the system up with this disk being online, because ZFS is > trying its darndest to use it. > > I already renamed the GPT partitions in the hope that ZFS would not > find them anymore, but it does. > > I can't gpart destroy -f ada1 because "device busy". > > Is there a way, ideally in the loader, to tell the kernel to ignore > ada1 and/or ahcich5? Or can I force ZFS some other way to ignore the > disk? I do have a spare disk I can use to replace the failed one, but > I can't get the machine into a state where I could even issue the > zpool replace command. > >The the loader prompt (or in loader.conf without 'set'): set hint.ada.1.disabled=1 -- Ian
Boot single user. Zfs won't import and you can do what you need. Warner On Sun, Apr 12, 2020, 8:37 AM Stefan Bethke <stb at lassitu.de> wrote:> I have a server I don't have physical access to right now, which has a > broken SATA disk that produces mostly errors (but not entirely). > > The disk has two partitions that are part of a zpool each. I can't bring > the system up with this disk being online, because ZFS is trying its > darndest to use it. > > I already renamed the GPT partitions in the hope that ZFS would not find > them anymore, but it does. > > I can't gpart destroy -f ada1 because "device busy". > > Is there a way, ideally in the loader, to tell the kernel to ignore ada1 > and/or ahcich5? Or can I force ZFS some other way to ignore the disk? I do > have a spare disk I can use to replace the failed one, but I can't get the > machine into a state where I could even issue the zpool replace command. > > > Stefan > > -- > Stefan Bethke <stb at lassitu.de> Fon +49 151 14070811 > >
On Sun, 12 Apr 2020 16:37:06 +0200 Stefan Bethke stb at lassitu.de said> I have a server I don't have physical access to right now, which has a broken > SATA disk that produces mostly errors (but not entirely). > > The disk has two partitions that are part of a zpool each. I can't bring the > system up with this disk being online, because ZFS is trying its darndest to > use it. > > I already renamed the GPT partitions in the hope that ZFS would not find them > anymore, but it does. > > I can't gpart destroy -f ada1 because "device busy".FTR it's gpart destroy -F (note the case difference) :-)> > Is there a way, ideally in the loader, to tell the kernel to ignore ada1 > and/or ahcich5? Or can I force ZFS some other way to ignore the disk? I do > have a spare disk I can use to replace the failed one, but I can't get the > machine into a state where I could even issue the zpool replace command. > > > Stefan >--Chris