Guide: Advanced Storage Provider Practices

Image for post
Image for post

This guide will be an evolving document that will help ScPrime Storage Providers maximize their provider instances as well as deal with any issues that arise as the network comes to scale.

Drive Compression (Windows based providers)

Over the course of building out the ScPrime network, the tech support team has noticed that Storage Providers running on Windows can see extremely long waits while their storage folders are initialized. One possible work around is to compress the folders where you are storing your ScPrime data. This can reduce the wait time dramatically. It should also be noted this is just a work around and not a permanent solution.

Image for post
Image for post

Firstly, you have to ensure the drive where you are keeping your ScPrime folders has the proper file system. It will most likely either be NTFS or exFat. It’s very common for external drives to be exFAT. In order to be able to compress a folder, the hard drive must be NTFS. If the drive is not NTFS, you will have to format it.

Image for post
Image for post

To format a drive, you will want to find it in Windows Explorer and right click on it. Select ‘Format’ from the drop down menu. You will want to set the File system to NFTS and be sure to set the Allocation unit size to a number less then 8192, or compression won’t be available.

Image for post
Image for post

Once the formatting is complete, you will want to create your storage folder (as described in the Storage Provider guide). You will then right click on the the folder and click ‘Properties’ from the drop down menu. In the Properties menu you will then want to click on ‘Advanced’.

Image for post
Image for post

In the Advanced menu, you will want to tick ‘Compress contents to save disk space’ and the click ok. Once the folder is compressed you will continue to add folders to your instance as described in the main Storage Provider guide. What could normally take hours or days, should be a lot quicker now.

AutoStart Daemon on Reboot

Windows based Storage Providers can find their PC’s rebooting for a number of reasons. If a reboot happens when you’re away from the PC your provider instance is running on, you may find your uptime suffering until you can restart the SPD. Using Windows Task Scheduler, you can create a task where the daemon will restart upon reboot.

Image for post
Image for post

Open up Task Scheduler and click on ‘Create Task’.

Image for post
Image for post

Name the task something related to SPD and select ‘Run whether user is logged on or not’ and also tick the box next to ‘Run with highest privileges’. Then click on the ‘Triggers’ tab.

Image for post
Image for post

In the Triggers tab, click on ‘New’ and then select ‘At startup’ from the drop down menu. Also be sure to have the box next to ‘Enable’ checked and then click OK.

Image for post
Image for post

Now click on the ‘Actions’ tab and the click on ‘New’.

Image for post
Image for post

Select ‘Start a program’ as an action and then create a path to your (future) batch file. Usually it’s C:\users\username\scprime\start.bat. It’s best to set it to the folder that has spd.exe in it. Click OK and then OK again. Your task is created. Now it’s time to create the batch file.

Image for post
Image for post

Using Notepad or something similar, create a batch file as shown above. The paths may vary. You need to know on your PC where your spd.exe file is kept, as well as the various ScPrime folders like consensus, host, transactionpool, etc. When done, save it as ‘start.bat’ in the folder you chose in the Actions tab. You are all set up. If you have any questions, please visit the #network channel on the ScPrime Discord.

Setting up a Dynamic DNS address

If a Storage Provider has an external IP address that may change, it’s a good idea to setup a dynamic DNS address. In short it will give you a permanent address for your provider instance, even if the actual external IP address your ISP gives you changes.

Image for post
Image for post
Duck DNS

There are a few different services you can use. In this guide, we will use Duck DNS. Start by heading over to their website.

Image for post
Image for post

Once there, you will want to sign in with your Twitter, Github, reddit or Google account. You have to sign in to use Duck DNS.

Image for post
Image for post

Next you will need to download the software. Since these guides mainly focus on Windows users, we will click on ‘windows-gui’. Install the software. Please note that you will need Java to use Duck DNS.

Image for post
Image for post

Once installed and Duck DNS is running, you can access your settings by finding it the tray. Right click on the icon and then on ‘DuckDNS Settings’.

Image for post
Image for post

To find your settings, click on the link in the setting’s window.

Image for post
Image for post

If you’re still singed in, it will take you to the info page above. Give your DDNS a name and then click on ‘add domain’.

Image for post
Image for post
Image for post
Image for post

Now you want to grab your domain and token enter them into DuckDNS Settings. Once done, click OK. You should be all set.

Image for post
Image for post

You should check to ensure your provider instance is reachable. Use a port checker like IPFingerPrints to scan your new Duck DNS address for ports 4282 and 4283. If they come back open, all is well. If they are closed, make sure your ports are opened on your router. If you have issues, please visit the #network channel on the ScPrime Discord.

Guides, technical articles and news about ScPrime. ScPrime is a distributed cloud storage project.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store