Skip to content
This repository has been archived by the owner on Mar 2, 2020. It is now read-only.

Resize Disk and move chaindata to new disk on bare metal servers

Jan [tomo_mn_group] edited this page Jan 15, 2019 · 1 revision

This guide is to help people running Tomo MN on bare metal servers.

Once you receive info from your provider, that your disks are installed:

1.Log into your KVM console and reboot your server - "reboot" or "ctrl+alt+del"

2.While the system is booting wait till notification "Press to Run Configuration Utility and once you see this press "CTRL+R"

3.Now you will apear in Configuraiton Utility. By arrows go to the TOP where the structure starts (controllers that has all the disks connected to it) and press "F2" --> Create new VD

  1. In next step you choose if you want RAID0 or RAID1 (possiblyother types of RAID if you have enough free disks), you select the disks which you want to connect by presing ENTER on each disk that should be used

  2. On the right side in section called "Basic Settings" you will see your future VD Size which depends on the type of RAID you choose, disk capacity and disk qty. Now name your VD

  3. You can go down with arrows and press ENTER on the "Advanced Settings" and change Strip Element Size

  4. Go to OK and continue with OK

Now you need to initialize your DISKS

  1. Go to the newly created structure in your structure (By the name you chose). When on the structure with cursor pres "F2" -->Initialization --> fast initialization-->YES

  2. Exit

  3. CTRL+ALT+DEL to Reboot

After loading into server, log in as Root and follow:

Create new partition

  1. "sudo fdisk /dev/sdb " --> type "n" and press enter as we want to add new partition--> "P" enter for primary--> "1" for partition nr (1 is also default) --> Enter for begining of cylinders (default) --> Enter for end of cylinders (default)--> press "w" to finish

Parted:

  1. "parted /dev/sdb" --> write "mklabel gpt" --> write "unit TB" --> write "mkpart primary 0 0"

  2. Check that everything is correct by writing "print" --> if correct write "quit" Enter

Formating:

  1. Use "mkfs -t ext4 /dev/sdb" to format the disk. The path can actually wary base on what you used before

Create a mountpoint:

  1. "mkdir /mnt/mn1" path is your choice

  2. Automatic mount at Boot "/dev/sdb /mnt/mn1 ext4 defaults 0 2"

  3. Mount the disc manually if not mounted by "mount /dev/sdb /mnt/mn1"

Copying chaindata:

  1. tmn stop

  2. mv -vu /var/lib/docker/volumes /mnt/mn1 moving the chaindata to new disk

  3. ln -s /mnt/mn1/volumes /var/lib/docker/volumes create link to new location

  4. tmn start

All described above is how I did it and it might be a bit different for you. Especially the paths will always be your choice. In case you have any question ping me on telegram @ambrosoni (Jan[tomo_mn_group])