Skip to content
Snippets Groups Projects
Verified Commit 5ca994d6 authored by anarcat's avatar anarcat
Browse files

simplified fabric procedure

parent f1784ea5
No related branches found
No related tags found
No related merge requests found
......@@ -218,7 +218,71 @@ hard-recover from a completely crashed node:
Note that you might need the `--ignore-consistency` flag if the
node is unresponsive.
## Importing external instances
## Importing external instances, semi-automatic
Assumptions:
* `INSTANCE`: name of the instance being migrated, the "old" one
being outside the cluster and the "new" one being the one created
inside the cluster (e.g. `chiwui.torproject.org`)
* `SPARE_NODE`: a ganeti node with free space
(e.g. `fsn-node-03.torproject.org`) where the `INSTANCE` will be
migrated
* `MASTER_NODE`: the master ganeti node
(e.g. `fsn-node-01.torproject.org`)
* `KVM_HOST`: the machine which we migrate the `INSTANCE` from
* the `INSTANCE` has only `root` and `swap` partitions
Import procedure:
1. pick a viable SPARE NODE to import the INSTANCE (see "evaluating
cluster capacity" above, when in doubt) and find on which KVM HOST
the INSTANCE lives
2. copy the disks, without downtime:
./ganeti -v -H $INSTANCE libvirt-import --ganeti-node $SPARE_NODE --libvirt-host $KVM_HOST
3. copy the disks again, this time suspending the machine:
./ganeti -v -H $INSTANCE libvirt-import --ganeti-node $SPARE_NODE --libvirt-host $KVM_HOST --suspend --adopt
4. login the new machine through the ganeti console:
gnt-instance console $INSTANCE
5. renumber the host:
vi /etc/network/interfaces
service networking stop
service networking start
6. test services by changing your `/etc/hosts`
7. shutdown original instance:
ssh $INSTANCE shutdown -h +1 'migrating to new server'
8. destroy test instance:
gnt-instance remove $INSTANCE
9. redo migration as in step 3, 4 and 5
10. final test procedure
11. switch to DRBD, still on the Ganeti MASTER NODE:
gnt-instance stop $INSTANCE
gnt-instance modify -t drbd $INSTANCE
gnt-instance failover $INSTANCE
gnt-instance start $INSTANCE
12. switch DNS over to the new machine (see step 16 below)
13. retire old instance ([[retire-a-host]])
## Importing external instances, manual
Assumptions:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment