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
c31b3608
Verified
Commit
c31b3608
authored
2 years ago
by
anarcat
Browse files
Options
Downloads
Patches
Plain Diff
start documenting cluster migration procedures
parent
e7101793
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
howto/ganeti.md
+46
-2
46 additions, 2 deletions
howto/ganeti.md
with
46 additions
and
2 deletions
howto/ganeti.md
+
46
−
2
View file @
c31b3608
...
...
@@ -2056,12 +2056,56 @@ Look into logs on the relevant nodes (particularly
`/var/log/ganeti/node-daemon.log`
, which shows all commands ran by
ganeti) when you have problems.
### Migrating a VM between clusters
The
[
export/import
](
https://docs.ganeti.org/docs/ganeti/3.0/html/admin.html#export-import
)
mechanism can also be used to export and import
VMs one at a time, if only a subset of the cluster needs to be
evacuated.
1.
find nodes to host the exported VM on the source cluster and the
target cluster; it needs enough disk space in
`/srv/ganeti`
to
keep a copy of a snapshot of the VM:
df -h /srv/ganeti
2.
have the right kernel modules loaded, which might require a
reboot of the source node:
modprobe dm_snapshot
3.
on the master of the source Ganeti cluster, export the VM to the
source node, also use
`--noshutdown`
if you cannot afford to have
downtime on the VM
*and*
you are ready to lose data accumulated
after the snapshot:
gnt-backup export -n fsn-node-01.torproject.org test-01.torproject.org
4.
copy the VM snapshot from the source node to node in the target
cluster:
scp /srv/ganeti/... root@chi-node-02.torproject.org:/srv/ganeti
5.
on the master of the target Ganeti cluster, import the VM:
gnt-backup import -n chi-node-08.torproject.org --src-node=chi-node-02.torproject.org --src-dir=/srv/ganeti/??? test-01.torproject.org
### Mass migrating instances to a new cluster
The
[
move-instance
](
https://docs.ganeti.org/docs/ganeti/3.0/html/move-instance.html
)
command can do this.
TODO: document mass cluster migrations.
## Disaster recovery
If things get completely out of hand and the cluster becomes too
unreliable for service, the only solution is to rebuild another one
elsewhere. Since Ganeti 2.2, there is a
[
move-instance
](
http://docs.ganeti.org/ganeti/2.15/html/move-instance.html
)
command to
move instances between cluster that can be used for that purpose.
elsewhere. Since Ganeti 2.2, there is a
[
move-instance
](
https://docs.ganeti.org/docs/ganeti/3.0/html/move-instance.html
)
command to
move instances between cluster that can be used for that purpose. See
the
[
mass migration procedure
](
#mass-migrating-instances-to-a-new-cluster
)
above.
The
[
export/import
](
https://docs.ganeti.org/docs/ganeti/3.0/html/admin.html#export-import
)
mechanism can also be used to export and import
VMs one at a time, if only a subset of the cluster needs to be
evacuated. See the
[
migrating a VM between clusters
](
#migrating-a-vm-between-clusters
)
procedure above.
If Ganeti is completely destroyed and its APIs don't work anymore, the
last resort is to restore all virtual machines from
...
...
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