Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated links in the proper manner.

...

...

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.

...

Image Removed

To create a new .pem file, if required, use the following command:

openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout /etc/salt/azure.pem -out /etc/salt/azure.pem

To create a new .cer file, use the following command:

...

.

...

Set your new VM to the same virtual network, as well.

Image Removed

...


  •  

...

Image Removed

  • 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.

Image Removed

...

Image Added

  •  Open Volumes and LUNs 

...

  • from the Storage Administration pane and record the Volume Name and Storage Pool name.

Image Added

  •  Open Storage Pools, and record relevant pool configuration information.

...

Image Added

  •  Open Disk Devices, and record disk specific settings.

...

Image Added

  •  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.

...

Image Added

  •  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
titleNFS Settings

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).

Image Removed

8. Once you have noted the URLs,  switch to Instances, and select the VM. Click Detach Disk.

Image Removed

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.

Image Removed

...

Image Added

  •  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 Image Added button next to the disks you wish to detach on the far right.

Image Added

  •  Once all disk(s) are detached, open the new SoftNAS instance,

...

Return to Azure, and select the new instance, under Instances. Click Attach Disk

Image Removed

11. Scroll up or down to find and select the disk from the previous instance. Click the check mark to proceed.

Image Removed

...

  • 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.

Image Added

Image Added

Image Added

  •  Restart your new instance by clicking the Restart button.

Image Added

  •  Navigate to Disk Devices in your new SoftNAS instance and you will see the that the disks have been added to the instance.

Image Removed

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.

Image Removed

This is because ZFS is not up to date, as it is tied to the previous instance version.

...

Image Added

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
languagebash
themeEclipse
titleSSH Command
ssh softnas@<Instance IP>


  •  Run the following command.
Code Block
languagebash
themeEclipse
titleVerify Pools are Up to Date and Online
zpool status [pool name]


Note
titlezpool Status
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.


Image Added

Upgrading Pools

  •  To update ZFS, enter the command: 
Code Block
languagebash
themeEclipse
titleZFS Upgrade
zpool upgrade [pool name]


  •  You will see something like the image shown to the

...

  • right.

...

Image Removed

Image Added

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.


Image Added

Image Removed

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
languagebash
themeEclipse
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
languagebash
themeEclipse
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
languagebash
themeEclipse
service nfs restart

...


Copy iSCSI Information

  •  If iSCSI is in use, enter the following

...

  • command to enter information:
Code Block
languagebash
themeEclipse
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
languagebash
themeEclipse
sudo service fcoe-target restart


  •  Your Azure instance is now fully migrated and configured.

Additional Information

...

...