Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save coltenkrauter/ae51b117811778e7e8db223250050439 to your computer and use it in GitHub Desktop.
Save coltenkrauter/ae51b117811778e7e8db223250050439 to your computer and use it in GitHub Desktop.
TrueNAS – Copy all data from one pool to another
# 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