App Volumes: AppStack Storage Migration
Inside of App Volumes you can accomplish a storage migration between different SANs using the feature called ‘Storage Groups,’ provided you have shared storage between App Volume Managers. If you don’t, I recommend creating a temporary LUN/Volume to accomplish this migration. If you are performing a migration on a large scale, such as 2X or more App Volume Manager instances, you will need to perform steps one through eight on each App Volume Manager instance.
To achieve a successful migration we will need to utilize a shared LUN/Volume between datastores. This can be an NFS or iSCSI datastore and will only be used for temporary to complete this process.
Stage 1: Migration Startup
- Select ‘Infrastructure’
- Select ‘Storage Groups’
- Give your storage group a name (my example: migration_temp)
- Check ‘Automatically Replicate AppStacks’ and leave ‘Automatically Import AppStacks’ unchecked. If you check the ‘Import AppStacks’ checkbox, you will need to do a lot of cleanup if you were using a temporary LUN to do this migration.
- Select ‘spread’ for your distribution strategy.
- Select your preferred template storage.
- Select ‘direct’ for storage selection.
- Select the checkbox of your local shared storage. This field will represent where you currently have the AppStacks you want migrated.
- Select the checkbox of your Temporary LUN. The temporary LUN is assumed empty or the AppStacks you want migrated over are not on the temporary LUN.
- Select ‘Create’
Once your storage group is created replication will begin immediately; it might take awhile depending on how many AppStacks you need to distribute within the storage group.
Stage 2: Cleanup
- After all AppStacks have been evenly distributed in the storage group, you can simply delete the storage group. This will not delete any AppStacks, it simply disassociates the logical bucket of resources. Both the source LUN and the temporary LUN will still have the AppStacks.
- Load the VMware vSphere® client and move any AppStacks from the temporary LUN to the permanent shared storage LUN, and then to the View Block.
I want to dig further into explaining this process about moving AppStacks from the temporary LUN. App Volumes creates pointers to all AppStacks residing on storage. This means in our example (shown above) when we replicate an AppStack between two points the inventory object in App Volumes Manager will consider all these locations as the AppStack living space. This also means, if you decide to delete an AppStack from inventory, ALL pointer locations will also be deleted. So, if you need to clean-up the App Volumes Manager inventory in your Source Environment, you will need to copy, move, or detach the temporary LUN you created prior to deletion. This process is explained here:
- Move AppStacks from cloudvolumes/apps/* to a temporary folder /cloudvolumes/apps/tmp/* using the vSphere C# client, GUI, or vSphere command-line.
- Delete AppStacks from Source inventory
- Move AppStacks from cloudvolumes/apps/tmp/* to a permanent shared storage in the target environment folder /cloudvolumes/apps/* using the vSphere C# client, GUI, or vSphere command-line.
- Select ‘Import AppStacks’ in App Volume Manager under Volumes > AppStacks.
- Select the LUN you moved all the AppStacks into (step c).
- Set the root path of where the AppStacks will live and select ‘Import.’
You can also use ‘vmkfstools’ if you have shell access to a host that can see the shared storage. This process is a lot more manual compared to using App Volumes Storage Groups, but you can still accomplish the migration using this method.
Execute the following syntax:
vmkfstools -i </source/location> </dest/location>
This will copy the VMDK file in its current format from source to target.
(AppStacks VMDKs are Thin Provisioned by default).
Once you have copied the AppStacks you will need to ‘Import AppStacks’ from the App Volume Manager
(Volumes –> AppStacks –> Import AppStacks).
Reference this Knowledge Base for additional information when using the vmkfstools command: