From nobody Mon Sep 27 20:09:48 2021 X-Original-To: freebsd-current@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 8C44117E3126 for ; Mon, 27 Sep 2021 20:10:06 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi1-f173.google.com (mail-oi1-f173.google.com [209.85.167.173]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HJDJZ3G6rz4jvW; Mon, 27 Sep 2021 20:10:06 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi1-f173.google.com with SMTP id v10so27068599oic.12; Mon, 27 Sep 2021 13:10:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=na784F3UyqRHdXCn3gq/5fp+MrnRNd/s6YJvxI+zlI0=; b=YVjkJCMyKg4jdW49Wa8+YtsbdZAJ1QzjpvS36KI5NmzjJ5GniYoEKgMZdCvcR945fo KXFBW4+yg7k2ZIJk7Q5cpu6GuvlvEvvPHXlj0DVyZZYZmi8JtShRropG5wdqfoqgF63f gWmI4PjGAlJIelB0zW7kU2/oyhmJVNSpL5S70Pb4Wv4O4XkQ67CtEJmGm7t0QuipULcy RUXQbcJ2OB/Yq7CHhuiqlXO+cpx4lBkYRogGAiJmW0xssxoSJZfPdBCCfYHtRiem6A6b swlowpCgMCLiwWSlrd6eBEfMSytzu9ubheyk4yeiaAJwo2nFqkWsVqi5MhiiZIusDZSc paFg== X-Gm-Message-State: AOAM532M34o7VIKgm0pSK1c1kLV7DnXqXqVbY+AjR9I5bIgK0ZB0B4Ge nQ8UDjXJVl0amnTHlME9EP4vjG1zlUSXrW7r3CumACwa X-Google-Smtp-Source: ABdhPJyjadRJfWfOpXNXYGxZnX7oFI3pLmDn3gBTL8Ac0asNkIHXgWF8f/dhkFvuVQHrxEiQRQMuAbBNYh8JcpXdAAs= X-Received: by 2002:a05:6808:302c:: with SMTP id ay44mr725349oib.73.1632773399932; Mon, 27 Sep 2021 13:09:59 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: <16473d5f-1727-233a-7a95-a21c5b48b9ce@FreeBSD.org> <8ab3d440-889e-25d4-71f9-e7ae2386daeb@FreeBSD.org> In-Reply-To: From: Alan Somers Date: Mon, 27 Sep 2021 14:09:48 -0600 Message-ID: Subject: Re: Building ZFS disk images To: Mark Johnston Cc: David Chisnall , freebsd-current Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4HJDJZ3G6rz4jvW X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Mon, Sep 27, 2021 at 1:54 PM Mark Johnston wrote: > > On Thu, Aug 05, 2021 at 10:54:19AM -0500, Alan Somers wrote: > > There's this: > > https://openzfs.github.io/openzfs-docs/man/8/zpool-reguid.8.html . I > > haven't used it myself. > > Would it be useful to have an rc.d script that can run this, probably > just on the root pool? It could be configured to run only upon the > first boot, like growfs already does. Absolutely! > > > On Thu, Aug 5, 2021, 9:29 AM David Chisnall wrote: > > > > > On 05/08/2021 13:53, Alan Somers wrote: > > > > I don't know of any way to do it using the official release scripts > > > > either. One problem is that every ZFS pool and file system is supposed > > > > to have a unique GUID. So any kind of ZFS release builder would need to > > > > re-guid the pool on first boot. > > > > > > Is there a tool / command to do this? I've hit this problem in the > > > past: I have multiple FreeBSD VMs that are all created from the same > > > template and if one dies I can't import its zpool into another because > > > they have the same UUID. > > > > > > It doesn't matter for modern deployments where the VM is stateless and > > > reimaged periodically but it's annoying for classic deployments where I > > > have things I care about on the VM. > > > > > > David