migrate RAIDz2 to Mirrors

JoeAtWork

Contributor
Joined
Aug 20, 2018
Messages
165
Hi All,

With VMware I have many VM's but just two are still on a RAIDz2 pool, I can power down those two guests and from TrueNAS:

I think I can stop all TrueNAS Services, zfs send to a 4tb single disk, destroy the RAIDz2 from the command line, from the GUI create mirrors of the 4 disks with the same name and then ZFS recieve from the 4TB disk so all my folders/datasets are still configured for NFS/FTP and iSCSI zVOLS....

Thanks,
Joe
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
It would help if you told us something about your setup. There are many ways of achieving your objective perhaps less abruptly then you are suggesting, but as we know nothing about your setup.......
 

JoeAtWork

Contributor
Joined
Aug 20, 2018
Messages
165
Hi NugentS,

Dell R720xd with 4 drives in a RAIDz2 pool and I want to add a temporary pool to zfs sent all the contents of vol123 to the smaller volMIRROR. I do have two iSCSI targets one being located on vol123 that is nested under a dataset vmware/iSCSI and that is a device zvol called serverA with no compression and it is not sparse.

I do have a non critical lab server I can test this on at my desk.

I really want a way locally to do zfs send, re-config my main zpool and zfs receive all my data and settings back. iSCSI extent serial numbers concern me as I do not know where those are stored.

Thanks,
Joe
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
iSCSI extent serial numbers concern me as I do not know where those are stored.

Those are in the ctl.conf configuration file and are saved on a per-extent basis through the UI. Not sure if/how TrueNAS would allow/react to switching the underlying block device backing an extent or if it's possible through manual editing.

If it's all VMDKs I'd recommend you just create new zvols on the temporary drive and then svMotion from inside ESXi, that way you guarantee VMware doesn't get confused about wanting/needing to resignature the disk.

For your NFS/FTP though you'll probably need to record the config and redo. I have to imagine it either won't let you destroy the pool with those services still referencing it or could have permission issues if you don't re-define them after creating it anew.
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
As @HoneyBadger says for the zvols & iSCSI generally probably better to create a new zvol on the temp storage and swing any VM across to that (we are assuming extrenal VM's here). Then trash, reconfigure and swing back.

Again as@HoneyBadger says the external access config will probably need to be redone, but all the file permissions should be correct
 

JoeAtWork

Contributor
Joined
Aug 20, 2018
Messages
165
so this means for disaster recovery you have a lot of manual work to do. if you have a backup of your config and zfs send to another zpool you still have to re-install the OS, zfs send the old pool and re-configure all your missing settings. :-(
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
Possibly not. Its not something I have had to try.
If you zfs send | recv to the smae pool, but different dataset name. Then destroy the old dataset and then rename the new name to the old name then everything transferred correctly (dunno about zvols though)

The problem is that deleting the pool may well delete all references to that pool (NFS/SMB etc) - so even if the old pool and new pool have the same names the references may well be gone. Its not something I have cared to try
 
Top