From nobody Sat Aug 23 04:21:13 2025 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4c83ln0wChz65jhV for ; Sat, 23 Aug 2025 04:21:25 +0000 (UTC) (envelope-from idefix@fechner.net) Received: from beta.fechner.net (beta.fechner.net [IPv6:2a03:4000:67:cc1::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4c83ll5nhWz42P1 for ; Sat, 23 Aug 2025 04:21:23 +0000 (UTC) (envelope-from idefix@fechner.net) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=fechner.net header.s=mail header.b=OEBV3jUk; dmarc=pass (policy=none) header.from=fechner.net; spf=pass (mx1.freebsd.org: domain of idefix@fechner.net designates 2a03:4000:67:cc1::2 as permitted sender) smtp.mailfrom=idefix@fechner.net Received: from [192.168.1.151] (unknown [46.252.96.255]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) (Authenticated sender: idefix@fechner.net) by beta.fechner.net (Postfix) with ESMTPSA id 296975689FC; Sat, 23 Aug 2025 06:21:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fechner.net; s=mail; t=1755922875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4O0u0OtuCCKNHvCCNn53n+YR1/RF0VMSkLiApuAUMDc=; b=OEBV3jUk44ToxzcvtHoKtKp0byjrOpD+25evufYpxQFBF5Tfd1sSOtAdkhjNK5mSJJQCFu D9cqULMmFy6mTkpAaS5zYy8sBLSUlV8wlsYdiwCLrsF/6y2ljkM1KI6JkTY/BEnwTtfiTN 7Gi2gNR0sSOEVvSRlw90HyoxWA3uZ+CEh8Iwob4IRbhxT716pmvN3VjT7g+js2+PrrYEbD DEPDytwYRuzSOH0kZaQ7jJ6OJYH75sNOaVea62nGTQ4lKGsKe1HswVtKckt81+u3F7izER jxJHJgTL8ARJK89LZ2pP5be9jP1vHjXA5c1uL/PqgRXNVtTUyoTa+Vh1XJdMZA== Message-ID: Date: Sat, 23 Aug 2025 07:21:13 +0300 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-questions@freebsd.org Sender: owner-freebsd-questions@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Replacing a REMOVED drive in DEGRADED zpool To: Robert , questions@freebsd.org References: <198a2cb7-0a6e-483a-a949-645b3675e916@fechner.net> Content-Language: en-US From: Matthias Fechner In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Action: no action X-Rspamd-Server: beta.fechner.net X-Spamd-Bar: ------ X-Spamd-Result: default: False [-6.49 / 15.00]; DWL_DNSWL_MED(-2.00)[fechner.net:dkim]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.995]; DMARC_POLICY_ALLOW(-0.50)[fechner.net,none]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; RCVD_IN_DNSWL_MED(-0.20)[2a03:4000:67:cc1::2:from]; ONCE_RECEIVED(0.20)[]; R_DKIM_ALLOW(-0.20)[fechner.net:s=mail]; R_SPF_ALLOW(-0.20)[+a]; MIME_GOOD(-0.10)[text/plain]; RCVD_COUNT_ONE(0.00)[1]; TO_DN_SOME(0.00)[]; ASN(0.00)[asn:197540, ipnet:2a03:4000::/32, country:DE]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MLMMJ_DEST(0.00)[questions@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DKIM_TRACE(0.00)[fechner.net:+] X-Rspamd-Queue-Id: 4c83ll5nhWz42P1 Am 21.08.2025 um 16:13 schrieb Robert: > On 8/20/2025 11:23 PM, Matthias Fechner wrote: >> Hi Robert, >> >> Am 21.08.2025 um 03:55 schrieb Robert: >>> 1. Run `zpool offline zdb1 ada0p3` >>> 2. Shut down and pull/insert replacement >>> 3. Boot up and run `gpart backup ada1 > gpart.ada1` then `gpart >>> restore ada0 < gpart.ada1` >>> 4. Run `zpool replace zdb1 ada0p3 ada0p3` >> >> I have written for this some notes for myself: >> https://wiki.idefix.fechner.net/freebsd/zfs/#replace-a-failed-disk >> >> I do not think you must offline it, you should be able to use replace >> command or attach (I would check the man page to verify that for the >> version you use). > > Thanks, there is some great information inĀ  your document. And detach > would not be necessary either? It can be replaced in its current > status of REMOVED? > if you never did such a restore I suggest you setup a virtual machine in a similar way you have your setup (I think do a default install and use two additional disc to build an additional zpool is enough). You can use much smaller discs, it is just to simulate the commands. If the setup is done, make a snapshot. Then just remove/detach a disc and see what happens. Add a new disc and try to replace it in the zpool. This will give you some practice. You can ask and read as many as you want, you will only get your answers if you try it and a virtual machine is here perfect to test this. Matthias