Created
June 2, 2023 02:43
-
-
Save coltenkrauter/ae51b117811778e7e8db223250050439 to your computer and use it in GitHub Desktop.
TrueNAS – Copy all data from one pool to another
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The reason why I wanted to do this was because I had a striped pool (a pool with no mirroring/redundancy) and | |
# I wanted to convert it to a mirror pool which is not possible through the GUI (it is a bit complex via shell commands). | |
# My solution was to copy the data from the striped pool to a temporary holding pool (a random disk that I had lying around) | |
# and then recreate the pool as a mirrored pool and copy the snapshot back. | |
# Start a tmux session so that the shell session will persist even when you close the shell | |
tmux | |
# Create a snapshot of pool_A that contains the data that you want moved to pool_B | |
zfs snapshot -r pool_A@migrate | |
# Send the snapshot to pool_B | |
zfs send -R pool_A@migrate | zfs receive -F pool_B |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment