Xa-Miner Maintenance Tasks – Linux
Some typical maintenance tasks which a user needs to perform on their provider will now be slightly different with the UI. These are documented below.
Upgrading to a new SPD Release
When a new version of the SPD daemon is released, for example, prior to the fork in January 2023, the process for full license installations is very straightforward.
Step 1 – On the Linux CLI, stop the container running using this command (please note if logged in as root you don’t need to use sudo):
sudo docker stop xa-miner
Step 2 – Identify where your Xa-Miner app folder is located, the default location is in the root folder /root/xa-miner/app. The spd binary is located in /config/spd in the app folder. You need to delete this file using the following command (again if logged in as root you don’t need to use sudo):
sudo rm /root/xa-miner/app/config/spd/spd
If you chose a different location for the xa-miner app folder during installation of the software then you will need to use the path to the custom folder in place of /root/ in the above commands
Step 3 – Start up the container again using the following command:
sudo docker start xa-miner
Within a few secs after starting the container, supervisor will automatically download the latest spd binary and place it in the same location in the app folder. If you refresh the Xa-Miner UI now, you will see on the Dashboard the updated SPD version.
Upgrading to a new Xa-Miner Software Release
When a new version of the Software Xa-Miner is released, the process to update the software is to run the installer script from the CLI of the provider PC using the following command:
curl -fsSL https://releases.scpri.me/storage_appliance/diy/xm-installer.sh | sudo bash
Then access the URL the script shows to bring up the installer UI as below:
Click on Next
If there is a new version of the Xa-Miner container detected by the installer, the Update Existing button will be active and show Update Required underneath. Simply click on Update Existing, the installer will perform the upgrade (takes 1-2 mins) and when it’s finished, the updated version will be running and the installer will exit. Refresh the Xa-Miner UI and the updated versions of the SPD, Supervisor and UI versions will show on the Dashboard.
Adding new storage folders
To add a new storage folder to your provider, you will first need to create a partition, format and mount the drive in Linux as you would normally and ensure the drive auto mounts on reboot in the /etc/fstab file. Also create a single folder on the drive which will be the storage folder. In Linux there is no need to create multiple folders on a single drive, except if your drive is larger than 16TB and you are using ext4 format as ext4 can only support up to 16TB file sizes. In the case of 18TB and greater drives, you will need to create 2 folders, one 16TB and one for the rest of the drive space or 2 equal sized folders.
Once you have the folder created, run the installer script again using the same curl command in the installation section of this guide, then open a browser to the installer GUI with the 4 options as below:
When the installer is run and it detects an existing installation, the Configure Existing button is active and note the Fresh Installation and Migrate from DIY are deactivated now.
After clicking on Configure Existing, you’ll be presented with the following screen showing all the existing provider’s storage folders.
Click on Add Storage Folder
Create Folder will create the new folder at the default path shown. Most likely you will want to create the folder on a newly mounted drive, click Goto Home Folder.
From here you can navigate to the mounted drive and folder you previously setup either by typing in the path in the Current Folder box or by clicking the Up arrow to get to the root folder and then choose your path from there, for example, /mnt/disk7/hostdata. Note folders can also be created at this step using the Add Folder button.
Once you have your new folder selected, click Select Folder.
Then you will see your new folder added to the list of storage folders.
Click on Finish. This GUI will show it configuring your Xa-Miner and then will present you with the following screen at which point you can close the browser tab.
Now return to the main Xa-Miner UI, go to the Storage page and you’ll see the added storage folder there.
Enter the size in GB you want to set the folder size to and click Assign. Note, be careful not to over provision the folders here, the units are in GB which don’t equate to the drive sizes you see in Linux when running lsblk for example. In the above example, the /mnt/disk5/hostdata folder is on a 6TB drive, lsblk reports this as 5.5T (which is 5.5TiB), using spd from the CLI this folder was created as a 5.4TB folder but the UI reports it as 5029GB. So if disk7 was a 6TB drive, you would want to configure 5029GB in the UI as the capacity.
Removing Storage Folders
A similar process can be used in reverse to remove storage folders in a similar way to using ‘spc host folder remove <PATH>’ from the CLI. First navigate to the Storage page on the Xa-Miner UI, find the folder from the first column you wish to remove and click on the Remove button to the right.
Any data stored in the folder being removed will be moved by spd to other folders. This process may take some time depending on how much data needs moving so it’s recommended to remove just one folder at a time.
Once the folder is removed from the Xa-Miner UI, run the installer script again and choose Configure Existing:
The following screen will show all the drives which have been added to the Xa-Miner, note if you have more than 10 drives/folders then you may need to go to the next page or change the rows per page value to All to see the one(s) you want to remove.
Simply click on the red icon in the Action column against the folder you wish to remove and then click Finish. Now the drive can be safely unmounted in Linux and removed.
Recovering the Wallet Seed Phrase
Should the wallet seed phrase be forgotten, this can be recovered from the CLI of the provider. The spc application has been added into the xa-miner container now, if spc is not available, an update of the Xa-Miner software will be required using the process above in the Upgrading to a new Xa-Miner Software Release section.
Assuming you are logged in to Linux with a non-root account, run the following command to show the wallet seed:
sudo docker exec -it xa-miner spc wallet seeds
This will display the Primary Seed.