You need to pass two parameters to gnt-group
modify:
gnt-cluster modify --ipolicy-disk-templates full,list,of,needed,disk,templates \
--enabled-disk-templates full,list,of,needed,disk,templates
So if you have plain
and drbd
already enabled and you also wanted rbd
, you would run this:
gnt-cluster modify --enabled-disk-templates plain,rbd,drbd
--ipolicy-disk-templates plain,rbd,drbd
Conversely this command enables shared-file
only, disabling everything else in the process:
gnt-cluster modify --enabled-disk-templates shared-file
--ipolicy-disk-templates shared-file
Why repeat the list twice? What's the difference between the two switches?
Say that, for some reason, you have a Ganeti group alpha
that should only have rbd
instances and a Ganeti group bravo
that should only have drbd
instances. You can enforce that like so:
gnt-cluster modify --enabled-disk-templates rbd,drbd \
--ipolicy-disk-templates rbd,drbd;
gnt-group modify --ipolicy-disk-templates rbd alpha;
gnt-group modify --ipolicy-disk-templates drbd bravo;
There are a number of constraints to keep in mind in order to keep invariants true:
- ipolicy can't allow disabled disk templates.
- you can't disable or disallow disk templates in use.
If you only have the default
group this feature is not very useful, but it has to be set anyway.