BitCollider
Cadet
- Joined
- Jul 12, 2016
- Messages
- 9
I’m migrating data from an old GELI encrypted pool to a larger, natively encrypted pool. (I think) I used a bad export command and my legacy pool seemed to disappear. I restored a config backup I took when both pools were still connected and when TrueNAS restarted, the legacy pool was back and the new pool was gone. I’d like to understand what happened and why.
Initial state:
- 4 drives in a RAIDz2 with GELI encryption. These are ada0-ada3. The pool is named zpool
- 2 drives mirrored as the boot pool. These are ada4-ada5. The pool is named boot_pool. This pool holds the system dataset.
The migration process:
I plugged four new drives into an HBA, adding da0-da3 to the system.
I set up a new pool, zpool2, choosing to encrypt the new root dataset.
I took snapshots of each dataset on zpool, then used the CLI to send/receive each dataset to zpool2. I confirmed that the data was present on zpool2.
Now I was ready to disconnect the legacy pool and rename the new pool to just zpool. Here’s what I did.
So… what happened? Why did my legacy pool come back when I restored my config and what happened to the new pool? Is the data in the new pool unreachable or is there something I can do to avoid copying my old pool again?
Initial state:
- 4 drives in a RAIDz2 with GELI encryption. These are ada0-ada3. The pool is named zpool
- 2 drives mirrored as the boot pool. These are ada4-ada5. The pool is named boot_pool. This pool holds the system dataset.
The migration process:
I plugged four new drives into an HBA, adding da0-da3 to the system.
I set up a new pool, zpool2, choosing to encrypt the new root dataset.
I took snapshots of each dataset on zpool, then used the CLI to send/receive each dataset to zpool2. I confirmed that the data was present on zpool2.
Now I was ready to disconnect the legacy pool and rename the new pool to just zpool. Here’s what I did.
- Download a config backup, including secrets and legacy encryption keys
- Using the GUI, export/disconnect zpool and zpool2 leaving unchecked the two boxes.
- Using the CLI, zpool import zpool2 zpool
- Facepalm. Realize I probably just did something bad to my legacy pool. Oh well.
- Using the CLI, zpool export zpool
- Using the GUI, import zpool. My new, natively encrypted pool is now mounted.
- Wondering whether I could get my legacy pool back and feeling more confident because of my backups, I restored the config I took at the beginning of the process. TrueNAS restarted.
So… what happened? Why did my legacy pool come back when I restored my config and what happened to the new pool? Is the data in the new pool unreachable or is there something I can do to avoid copying my old pool again?