...
...
...
...
Symptoms
If you need to upgrade or move an Azure-based SoftNAS
...
virtual machines, many of the steps will be familiar. Much like standard SoftNAS instances
...
, there is no direct upgrade path for instances below version
...
5.
...
0.
...
2. If your version falls below this threshold, you will need to migrate your instance to a new VM. The steps below will help you do so:
Purpose
This article covers the steps required to migrate an Azure
...
virtual machine from one VM to another.
Resolution
...
- Create a new host VM
...
- that mirrors the settings of the original as closely as possible
...
Info |
---|
EXAMPLE: Select the same size of VM, provide the same network settings, etc. |
...
. |
...
...
...
...
To create a new .cer file, use the following command:
openssl x509 -inform pem -in /etc/salt/azure.pem -outform der -out /etc/salt/azure.cer
Set your new VM to the same virtual network, as well.
...
Once the new host is created, the process is the same as any other SoftNAS VM migration.
Info See Migrate SoftNAS on AWS from VPC to VPC within a Region for step by step instructions on how to migrate settings such as S3 and EBS disk information (if applicable), SAMBA and iSCSI settings, etc..
...
...
- Log in to the older VM, by copying the DNS name or Public IP address from Azure to your browser,
...
- and entering your SoftNAS credentials as usual on the SoftNAS login screen.
...
- Open Volumes and LUNs
...
- from the Storage Administration pane and record the Volume Name and Storage Pool name.
- Open Storage Pools, and record relevant pool configuration information.
...
- Open Disk Devices, and record disk specific settings.
...
- If your instance makes use of CIFS, open CIFS shares, and select Edit Config File. Copy the
etc/samba/smb.conf
file for use on the new instance.
...
- If using NFS,
...
- SSH into the
...
- Azure instance
...
- and use
...
cat /etc/exports
...
/[pool_name]/[volume_name] *(async, no_subtree_check, no_root_squash, insecure, rw, nohide)
...
- the following command to provide information on your current NFS settings that you can use to configure your NFS export on the new box.
...
Note | ||
---|---|---|
| ||
Remember, the pictured information is just a sample. The settings of your NFS export |
...
might be different |
...
. |
...
- Once all settings have been recorded, you are ready to detach the disk
...
- (s).
8. Once you have noted the URLs, switch to Instances, and select the VM. Click Detach Disk.
9. A popup will appear, in which you can select the disk you wish to detach. If migrating more than one disk, you will have to repeat this process for each disk to be migrated. Click the checkmark to detach the disk selected.
...
- Back on the Azure Portal, open up your old SoftNAS instance, navigate to the Disks module, and identify the disks which you want to migrate. This should be any disk under the Data disks section.
- In order to detach a disk, simply click the button next to the disks you wish to detach on the far right.
- Once all disk(s) are detached, open the new SoftNAS instance,
...
Return to Azure, and select the new instance, under Instances. Click Attach Disk.
11. Scroll up or down to find and select the disk from the previous instance. Click the check mark to proceed.
12. Return to the SoftNAS UI. If you click on Disk Devices, you will see the disk added to the instance.
13. As stated there is no direct upgrade path for VMs older than 3.3, and this includes ZFS. For this reason, an import from within the GUI is not the best path. So let us move to the command shell, where we can finish the process by upgrading ZFS, without affecting the data.
First, ssh into the azure instance.
ssh -i azure.pem
[softnas instance DNS name]
Type yes to confirm, if prompted.
...
Run the following command to export pools:
zpool export -f <Each Pool Name or Names>
To verify that your pool or pools are added, use the command:
zfs list
To be sure they are online, and up to date, use:
zpool status [pool name]
With the above command you will also note that there is an alert, stating that ZFS is not up to date.
This is because ZFS is not up to date, as it is tied to the previous instance version.
...
- navigate to the Disks module, and click the Attach existing disks button.
- Search for the disk you wish to attach and select it. Repeat this process until you have added all necessary disk(s).
- Once done, click the Save button in the toolbar.
- Restart your new instance by clicking the Restart button.
- Navigate to Disk Devices in your new SoftNAS instance and you will see the that the disks have been added to the instance.
Checking Pool Status
Once disk migration has been completed, please follow the steps below to ensure that your zpools are updated.
- SSH into the Azure instance by entering the following command and following the on-screen instructions.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
ssh softnas@<Instance IP> |
- Run the following command.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
zpool status [pool name] |
Note | ||
---|---|---|
| ||
If the above command returns an alert stating that ZFS is out of date then continue on to ensure pools are properly updated. Otherwise, your migration is complete. |
Upgrading Pools
- To update ZFS, enter the command:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
zpool upgrade [pool name] |
- You will see something like the image shown to the
...
- right.
...
Verify Pool Configuration with SoftNAS
- You can now also verify that your pool or pools are found and configured within the SoftNAS UI.
...
- Select the Volumes and
...
- LUNS module to see the volume, and the pool it is associated with.
16. You can enter CIFS information from within the GUI, by going to CIFS Shares, then selecting Edit Config Files, and pasting the earlier copied smb.config file.
...
Copy CIFS Information
- To enter CIFS information via the command line, use the following:
Code Block | ||||
---|---|---|---|---|
| ||||
scp /etc/samba/smb. |
...
conf softnas-instance-ip:/etc/samba/smb.conf |
For NFS, use:
...
Copy NFS Information
- On your new SoftNAS instance, execute the following command:
Code Block | ||||
---|---|---|---|---|
| ||||
nano /etc/exports |
- Copy and
...
- paste the saved NFS configuration settings
...
/[pool_name]/[volume_name] *(async, no_subtree_check, no_root_squash, insecure, rw, nohide)
- that were noted earlier into the /etc/exports file.
- Restart the NFS service using the following command:
Code Block | ||||
---|---|---|---|---|
| ||||
service nfs restart |
...
Copy iSCSI Information
- If iSCSI is in use, enter the following
...
- command to enter information:
Code Block | ||||
---|---|---|---|---|
| ||||
scp /etc/target/saveconfig. |
...
json softnas-instance-ip:/etc/target/saveconfig.json |
- Restart the iSCSI service
...
sudo
service
fcoe-target restart
- using the following command:
Code Block | ||||
---|---|---|---|---|
| ||||
sudo service fcoe-target restart |
- Your Azure instance is now fully migrated and configured.
Additional Information
...
...