i need to migrate my used zfs pool (ashift=9) to a new zfs pool (ashift=12)
Background:
used zfs pool is ashift 9 (mirrored 2 drives)
drive 2 in the pool faulted and replaced with new one
drive 2 now defaults to 4kB sectors
zpool attach needs ashift=9 to mirror zfs again (drive 2 is attached in pool for mirror)
i want to change ashift to 12 for used lxd zfs storage.
what steps are needed to migrate the zfs pool to ashift=12?
i think this way will be right?
detach one drive from mirror zfs pool
create new ashift=12 pool from detached drive
copy storage vom old ashift=9 to new ashift=12 (how to copy and migrate in lxd?)
destroy old ashift=9 pool and attach this drive to ashift=12 pool for mirror
You should be able to do this without any LXD interaction by using zfs send/receive to copy your data from the old zpool to the new one. Once everything’s been transferred and looks identical, you can delete the old pool, move the second drive into the new one and then rename the new pool to the old one’s name.