Migrate SoftNAS on VMware vSphere
Symptoms
You have an existing SoftNAS instance set up on VMware vSphere, but you need to migrate it. Reasons for this may include:
- Your current version of SoftNAS is out-of-date, and cannot be upgraded without migration (your instance is a version of SoftNAS older than 5.0)
- Your instance needs to be moved because you are moving to another Vmware environment.
- You are creating a new production environment from a staging environment.
Purpose
This knowlege base article covers the basic steps and key considerations when migrating a SoftNAS VPC hosted on VMware vSphere to another VPC.
Resolution
Remember, the old SoftNAS VM does not have to be of the same version as the VM you are migrating to. This process can be used as a migration path for versions of SoftNAS older than 5.x. The VM to which you are migrating to can be the latest version, providing your existing storage pools the benefits of SoftNAS' latest improvements.
- Run the following command on the VM you wish to migrate from (original):
zpool export <pool-name>
- Power off the VM you wish to migrate from (original) by Right-Clicking on the instance in vSphere and selecting Edit Settings...
- Before you remove the VMDK, note down the data store that it resides in.
- Select the VMDK, and click Remove.
Be careful to not select the option Remove from virtual machine and delete files from disk.
If you have not already done so, create the new SoftNAS VM that the storage pools will be migrated to.
Guidance on creating a SoftNAS VM for VMware can be found here.
- Select the new VM from within the VMware Console and click Edit Settings
- From the Hardware tab, select Add > Hard Disk.
- Click Next.
- Choose Use an exiting virtual disk.
- Click Next.
Change directory to your storage pool and verify that your data is ok.
You can also log onto your new SoftNAS instance to view your pool there.
- Start your old SoftNAS system and copy over the following config files from the old system to the new system.
'/etc/exports'
'/etc/samba/smb.conf'
- Only copy the shares sections of smb.conf if they exist, do not copy the '[global]' section.
'/etc/target/saveconfig.json'
'/var/www/softnas/config/snapshots.ini'
- If you are using tiered pools, copy the below files over:
'/var/www/softnas/config/btier.json'
- '/var/www/softnas/config/btier_migrations_saved_sdtiera'
- Copy over any custom monitors you may have in '/etc/monit.d/' if they exist.
- Check in /var/www/softnas/keys for one or more files named with a UUID-like string, such as 'dbc7ab4f-b742-4ed6-8777-a41d321c7ef2'. The presence of these files indicates that LUKS encryption was used for some pools on the server. These files are used to store the passphrases to unlock the encryption keys for such pools. Copy any such files to the same directory /var/www/softnas/keys on the new server.
- Reboot the new system so that the copied configurations take effect.