Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Jun 2022 15:42:46 -0700
From:      David Christensen <dpchrist@holgerdanske.com>
To:        questions@freebsd.org
Subject:   Re: FreeBSD 13.1-RELEASE, zfs, and migrating data to a larger volume
Message-ID:  <390cbc08-8866-3a2e-755c-efa0ee99cffc@holgerdanske.com>
In-Reply-To: <CAPORhP4B8S7e4c=T2F3XJ%2BJPDEU78Sr-=oCH4TVdVosqa728YA@mail.gmail.com>
References:  <CAPORhP4B8S7e4c=T2F3XJ%2BJPDEU78Sr-=oCH4TVdVosqa728YA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 6/12/22 10:56, David Mehler wrote:
> Hello,
> 
> I'm going to skip what has brought me here but just ask my question.
> Is it possible to take two zfs pools one with datasets one without,
> the one with datasets is on the smaller volume, and clone/copy it to
> the larger volume? I then want the smaller volume out of the picture
> and the larger volume to be in place.
> 
> Thanks.
> Dave.


Assuming neither pool contains boot, swap, or root datasets, and both 
pools were automatically imported at boot, I would:

1.  Ensure that no process is accessing, or can access, the smaller pool 
datasets.

2.  Export the smaller pool, and then import it with the readonly option.

3.  Create a snapshot of the smaller pool using the recursive option.

4.  Backup the smaller pool datasets.

5.  Export the smaller pool, and then import it with the readonly and 
altroot options.

6.  Replicate the datasets from the smaller pool to the larger pool.

7.  Reboot.


The smaller pool should not be automatically imported at boot.  The 
larger pool should be automatically imported at boot.  The datasets on 
the larger pool should be operational at their mountpoints.


David


p.s. I own and recommend:

[1] https://mwl.io/nonfiction/os#af3e

[2] https://mwl.io/nonfiction/os#fmse

[3] https://mwl.io/nonfiction/os#fmzfs

[4] https://mwl.io/nonfiction/os#fmaz



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?390cbc08-8866-3a2e-755c-efa0ee99cffc>