Softaculous


Topic : Moving slave


Posted By: ejire on June 16, 2018, 9:04 am
Hello everyone
I will like to know if is possible to move salves from on HDD to another without my costumer loosing there stuff

one of my hdd is very slow and will like to move them to the fast one any advice

Posted By: wolke on June 16, 2018, 9:28 am | Post: 1
You mean moving a slave to another server or just replace the hdd?

Posted By: ejire on June 16, 2018, 9:39 am | Post: 2
Quote From : wolke June 16, 2018, 9:28 am
You mean moving a slave to another server or just replace the hdd?


let say both but am planing to replace the HDD

Posted By: wolke on June 16, 2018, 9:45 am | Post: 3
Are you using LVM or file based Storage? (LVM means your VM are stored in separate LV)


Edited by wolke : June 16, 2018, 9:45 am

Posted By: wolke on June 16, 2018, 9:50 am | Post: 4
For the first option (moving a slave to another server), simply add the new server as slave and configure it. Then use "Migrate VPS" in the adminpanel under "Virtual servers" to migrate all VM to the new server but DO NOT DELETE THEM ON THE OLD ONE. Check the VM on the new server, only if everything is working as expected you can delete the VM on the old server and unslave it.

Edited by wolke : June 16, 2018, 9:50 am

Posted By: ejire on June 16, 2018, 9:50 am | Post: 5
Am not sure about that.. am new to this

Posted By: wolke on June 16, 2018, 9:51 am | Post: 6
which virtualisation are you using?

Posted By: ejire on June 16, 2018, 10:16 am | Post: 7
KVM

Posted By: wolke on June 16, 2018, 10:44 am | Post: 8
ok, then you will likely using LVM.

Example:

old HDD = /dev/sdb 
new HDD = /dev/sdc
(of course replace that with YOUR device)

Make sure, the new disk is equal or bigger in size then the old one!

Code
pvcreate /dev/sdc


Use
Code
pvscan
or
Code
pvdisplay

to see if the PV is created

Then add the newly created PV to the volumegroup (use vgdisplay to see the name of your volumegroup)
Code
vgextend [YOUR_VOLUMEGROUP] /dev/sdc


Now you have 2 HDD in your volumegroup, the old one and the new one.

Now it´s time to move the data completely to the new one:
Code
pvmove /dev/sdb

This will move all data of the old disk /dev/sdb to other disks in the volumegroup. You can specify the destination also, but there are only 2 disks....

Then you need to remove the old PV from the volumegroup:
Code
vgreduce [YOUR_VOLUMEGROUP] /dev/sdb


check if anything goes like expected and remove the old hdd from the server.

--The End--

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.