Skip to content

Storage Miners

cgw-9527 edited this page Oct 31, 2022 · 79 revisions

Storage miner operation manual

1. Mining equipment and its software preparation

Mining equipment configuration  The OS requirement of the Storage server is as follows:

Item Parameter
Recommended OS and Version Ubuntu_x64 18.04 or higher /CentOS 8.2 or higher

Note: The machine must use a fixed public network IP. The traffic exit must be in the same network segment as the fixed public network IP. Execute the following command to confirm they are in the same network segment.

curl ifconfig.co

Detailed instruction of operating system installation is not given here because different operating systems have different installation methods and some basic software packages may not be found. The formula to calculate the size of disk space: 1kb=1024byte

1) Firewall configuration

  • Ubuntu system Enter the command below, and open port range 15001~15010.
sudo ufw allow 15001:15010/tcp
  • CentOS system

    • Execute the command sudo firewall-cmd --state in the terminal to check the firewall status.

    • The firewall is closed if it shows “not running”, which means the soft firewall of the server itself will not block any ports. You can go directly to the next step.

    • The firewall is enabled If it shows “running”, enter the following command to open ports 15001-15010.

sudo firewall-cmd --permanent --add-port=15001-15010/tcp
  • Restart the firewall:
sudo firewall-cmd --reload
  • View the firewall rules:
sudo firewall-cmd --list-all
  • Note:

Make sure ports are released in the range of 15001~15010 in the server provider's hardware firewall or security group policy: Since different server providers have different security group policy settings.

Please consult the server provider and request to release ports in the range of 15001~15010.

2) Disk mounting

Check the hard disk status using the df -h command:

df -h
  • The disk is not mounted If the hard drive for storage mining cannot be found. Use the fdisk -l command to view unmounted hard disks:
fdisk -l

Disk /dev/vdb: 30 GiB, 32212254720 bytes, 62914560 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

The unmounted disk is /dev/vdb in the demonstration above. If the disk cannot be found, which means that the disk has not been installed successfully. Please restart the computer and install it. We will be using /dev/vdb to demonstrate the mounting operation.

  • Allocate the /dev/vdb disk
fdisk /dev/vdb
Enter and press Enter:
n
p
1
2048
the value after default
w
  • Format the newly divided disk into ext4 format
mkfs.ext4 /dev/vdb

Enter y to continue If the system asks to proceed Proceed anyway? (y,N) y

  • Create /test directory to mount the disk. Using /test as an example
mkdir /test
  • Type it fstable
echo "/dev/vdb /test ext4 defaults 0 0" >> /etc/fstab

Note: replace /dev/vdb with your own disk name. /test‟ has to be the same as created in the previous step.

  • Reload fstable
mount -a
  • Check the disk mounting status
df -h

As shown in the figure above, the disk is mounted successfully!

2. Download and Install the cess-nodeadm

wget https://github.com/CESSProject/cess-nodeadm/archive/v0.1.1.tar.gz
tar -xvf v0.1.1.tar.gz
cd cess-nodeadm-0.1.1
sudo ./install.sh

Execute the 'sudo ./install.sh' command. The installation is successful when 'Install success' shows up after executing the 'sudo ./install.sh' command.

If the following exception occurs, please execute the following commands, and all future CESS program commands must have sudo privileges.

sudo systemctl start docker

3. CESS Wallet Preparation

  • Please refer to the CESS Wallet section above for creating a CESS wallet. Please join CESS Discord miner support sub-channel to receive TCESS tokens for staking.

  • Miners need to create two wallet accounts.

    • Account 1: For staking, punishment, and identity verification. This wallet address must have TCESS tokens for staking, and the staking rule is 2500TCESS/T. (The raw seed or mnemonic seed will be used in modifying the configuration file).

    • Account 2: For income (miners save their personal raw seed and mnemonic seed securely)

4. Install bucket

1) add the bucket configuration

cess config set
-------------------Install success-----------------------
root@s197281:/home/customer/cess-nodeadm-0.1.1# cess config set 
Enter cess node mode from 'authority/storage/watcher' (current: authority, press enter to skip): storage
Which way to use to give the outsider access to the machine?
    [0] use external IP; [1] use domain name (default 0): 0
Enter external ip for the machine: 173.....213.58
Enter cess bucket income account: cXiHsw32kT3Fzw6YeXDTECCfFNKjDVg85eg......
Enter cess bucket signature phrase: shoe ...... creek metal avoid
Enter cess bucket disk path (default: /opt/cess/storage/disk): /cess
Enter cess bucket space, by GB unit (current: 300, press enter to skip): 1000
----------Set configurations successfully------------

If the error message below occurs, try the 'cess config set' command several times.

'[ERROR] download image cesslab/cess-bucket:latest failed, try again later'

2) start bucket

cess start

Operation demonstration:

3) bucket status

cess bucket state

Operation demonstration:

2022/10/31 03:03:36 Connecting to ws://127.0.0.1:9944... MinerId: C3 State: positive StorageSpace: 368.00 MiB UsedSpace: 0.00 Byte PledgeTokens: 2000 TCESS ServiceAddr: 221.**.*.5:15001

Fail:

cess logs bucket

Please clean up the mount directory if the errors shown below occur.

for example :

rm -rf /cess (/cess is the mount path)
cess reload

4)Increase the staking

cess bucket increase <deposit amount>

5)Exit the mining program

cess bucket exit

5. Update config

1) Update IncomeAcc

cess bucket update_income [account]

2) Update address

cess bucket update_address [ip:port]

6. New version upgrade

1) update the cess-nodeadm

wget https://github.com/CESSProject/cess-nodeadm/archive/v0.1.1.tar.gz
tar -xvf v0.1.1.tar.gz
cd cess-nodeadm-0.1.1
sudo ./install.sh --update --retain-config 

Execute the 'sudo ./install.sh' command. The installation is successful when 'Install success' shows up after executing the 'sudo ./install.sh' command.

If the following exception occurs, please execute the following commands, and all future CESS program commands must have sudo privileges.

sudo systemctl start docker

2) update images

cess purge
cess config generate
cess tools upgrade-image chain
cess tools upgrade-image config-gen
cess tools upgrade-image bucket

3) reload bucket

cess reload
Clone this wiki locally