Re: Replacing a REMOVED drive in DEGRADED zpool
Date: Thu, 21 Aug 2025 17:03:54 UTC
On 8/20/25 23:56, Dag-Erling Smørgrav wrote: > David Christensen <dpchrist@holgerdanske.com> writes: >> Robert <robert@webtent.org> writes: >>> 3. Boot up and run `gpart backup ada1 > gpart.ada1` then `gpart >>> restore ada0 < gpart.ada1` >> Cloning ada1's GPT's (primary and secondary) to ada0 will result in >> duplicate identifiers on two disks -- UUID's, labels, etc.. > > `gpart backup | gpart restore` does not copy UUIDs or labels. Thank you for the clarification regarding gpart(8). Testing backup: 2025-08-21 09:05:30 toor@f5 ~ # gpart backup ada0 GPT 128 1 freebsd-boot 40 1024 2 freebsd-ufs 1064 29359104 3 freebsd-swap 29360168 1564672 You are correct -- gpart(8) backups are incomplete (!). Disk GUID (UUID) is missing and partition GUID's (UUID's) and names (labels) are missing. Where is this documented? RTFM glabel(8), I believe I see how to set labels after a gpart(8) restore onto a wiped disk. RTFM glabel(8) says it supports UUID's, but I do not see how. How do I set the disk GUID and partition GUID's after a gpart(8) restore? (`gpart list ada0` shows much more information, but not the disk GUID.) > >> [...] cloning the failed disk to the replacement disk could save >> effort. ddrescue(1) may be required to get past bad blocks. > > You mean recoverdisk(1). > > DES recoverdisk(1) looks useful -- thank you for the pointer. :-) David