Revision 12c3449a
b/lib/cmdlib.py | ||
---|---|---|
3375 | 3375 |
self.op.mode = constants.REPLACE_DISK_SEC |
3376 | 3376 |
|
3377 | 3377 |
if self.op.mode == constants.REPLACE_DISK_ALL: |
3378 |
raise errors.OpPrereqError("Template 'drbd8' only allows primary or"
|
|
3378 |
raise errors.OpPrereqError("Template 'drbd' only allows primary or" |
|
3379 | 3379 |
" secondary disk replacement, not" |
3380 | 3380 |
" both at once") |
3381 | 3381 |
elif self.op.mode == constants.REPLACE_DISK_PRI: |
3382 | 3382 |
if remote_node is not None: |
3383 |
raise errors.OpPrereqError("Template 'drbd8' does not allow changing"
|
|
3383 |
raise errors.OpPrereqError("Template 'drbd' does not allow changing" |
|
3384 | 3384 |
" the secondary while doing a primary" |
3385 | 3385 |
" node disk replacement") |
3386 | 3386 |
self.tgt_node = instance.primary_node |
b/scripts/gnt-instance | ||
---|---|---|
781 | 781 |
make_option("-p", "--on-primary", dest="on_primary", |
782 | 782 |
default=False, action="store_true", |
783 | 783 |
help=("Replace the disk(s) on the primary" |
784 |
" node (only for the drbd8 template)")),
|
|
784 |
" node (only for the drbd template)")), |
|
785 | 785 |
make_option("-s", "--on-secondary", dest="on_secondary", |
786 | 786 |
default=False, action="store_true", |
787 | 787 |
help=("Replace the disk(s) on the secondary" |
788 |
" node (only for the drbd8 template)")),
|
|
788 |
" node (only for the drbd template)")), |
|
789 | 789 |
make_option("--disks", dest="disks", default=None, |
790 | 790 |
help=("Comma-separated list of disks" |
791 | 791 |
" to replace (e.g. sda) (optional," |
b/tools/burnin | ||
---|---|---|
121 | 121 |
help="Skip instance failovers", action="store_false", |
122 | 122 |
default=True) |
123 | 123 |
parser.add_option("-t", "--disk-template", dest="disk_template", |
124 |
choices=("remote_raid1", "drbd8"),
|
|
124 |
choices=("remote_raid1", "drbd"), |
|
125 | 125 |
default="remote_raid1", |
126 | 126 |
help="Template type for network mirroring (remote_raid1" |
127 |
" or drbd8) [remote_raid1]")
|
|
127 |
" or drbd) [remote_raid1]") |
|
128 | 128 |
parser.add_option("-n", "--nodes", dest="nodes", default="", |
129 | 129 |
help="Comma separated list of nodes to perform" |
130 | 130 |
" the burnin on (defaults to all nodes)") |
... | ... | |
133 | 133 |
if len(args) < 1 or options.os is None: |
134 | 134 |
Usage() |
135 | 135 |
|
136 |
if options.disk_template == "plain": |
|
137 |
disk_template = constants.DT_PLAIN |
|
138 |
elif options.disk_template == "remote_raid1": |
|
139 |
disk_template = constants.DT_REMOTE_RAID1 |
|
140 |
elif options.disk_template == "drbd8": |
|
141 |
disk_template = constants.DT_DRBD8 |
|
142 |
else: |
|
136 |
supported_disk_templates = (constants.DT_PLAIN, constants.DT_REMOTE_RAID1, |
|
137 |
constants.DT_DRBD8) |
|
138 |
if options.disk_template not in supported_disk_templates: |
|
143 | 139 |
Log("Unknown disk template '%s'" % options.disk_template) |
144 | 140 |
sys.exit(1) |
145 | 141 |
|
146 |
options.disk_template = disk_template |
|
147 | 142 |
self.opts = options |
148 | 143 |
self.instances = args |
149 | 144 |
|
Also available in: Unified diff