Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Wiki Replica
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
TPA
Wiki Replica
Commits
5ca994d6
Verified
Commit
5ca994d6
authored
5 years ago
by
anarcat
Browse files
Options
Downloads
Patches
Plain Diff
simplified fabric procedure
parent
f1784ea5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tsa/howto/ganeti.mdwn
+65
-1
65 additions, 1 deletion
tsa/howto/ganeti.mdwn
with
65 additions
and
1 deletion
tsa/howto/ganeti.mdwn
+
65
−
1
View file @
5ca994d6
...
...
@@ -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:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment