Re: FreeBSD 13.1-RELEASE, zfs, and migrating data to a larger volume
- In reply to: David Mehler : "FreeBSD 13.1-RELEASE, zfs, and migrating data to a larger volume"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 12 Jun 2022 22:42:46 UTC
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