-
Notifications
You must be signed in to change notification settings - Fork 21
Resize Disk and move chaindata to new disk 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
-
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
-
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
-
You can go down with arrows and press ENTER on the "Advanced Settings" and change Strip Element Size
-
Go to OK and continue with OK
Now you need to initialize your DISKS
-
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
-
Exit
-
CTRL+ALT+DEL to Reboot
After loading into server, log in as Root and follow:
Create new partition
- "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:
-
"parted /dev/sdb" --> write "mklabel gpt" --> write "unit TB" --> write "mkpart primary 0 0"
-
Check that everything is correct by writing "print" --> if correct write "quit" Enter
Formating:
- Use "mkfs -t ext4 /dev/sdb" to format the disk. The path can actually wary base on what you used before
Create a mountpoint:
-
"mkdir /mnt/mn1" path is your choice
-
Automatic mount at Boot "/dev/sdb /mnt/mn1 ext4 defaults 0 2"
-
Mount the disc manually if not mounted by "mount /dev/sdb /mnt/mn1"
Copying chaindata:
-
tmn stop
-
mv -vu /var/lib/docker/volumes /mnt/mn1 moving the chaindata to new disk
-
ln -s /mnt/mn1/volumes /var/lib/docker/volumes create link to new location
-
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])