Commit aaa2a61
kvm: apply rbd_default_data_pool when creating volumes from templates on RBD
RBD erasure-coded pool support (#9808) added handling of the
rbd_default_data_pool storage-pool detail to RBDStringBuilder (qemu-img
path) and to createPhysicalDisk (blank volumes), but not to
createDiskFromTemplateOnRBD. As a result, ROOT volumes created from a
template via rados-java rbd.clone()/rbd.create() are created without a
data pool: all of their data objects land in the (replicated) metadata
pool instead of the erasure-coded data pool, defeating the point of EC
and consuming ~3x raw space.
Set rbd_default_data_pool on the Rados connection (before connect) in
both the same-cluster clone/copy branch and the cross-cluster copy
branch of createDiskFromTemplateOnRBD, using the destination pool's
detail. librbd then honors it as the default data pool when the new
image is created, so template-derived volumes get data_pool set, the
same way blank volumes already do.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 21b2025 commit aaa2a61
1 file changed
Lines changed: 10 additions & 0 deletions
File tree
- plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1350 | 1350 | | |
1351 | 1351 | | |
1352 | 1352 | | |
| 1353 | + | |
| 1354 | + | |
1353 | 1355 | | |
1354 | 1356 | | |
1355 | 1357 | | |
| |||
1398 | 1400 | | |
1399 | 1401 | | |
1400 | 1402 | | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
1401 | 1407 | | |
1402 | 1408 | | |
1403 | 1409 | | |
| |||
1476 | 1482 | | |
1477 | 1483 | | |
1478 | 1484 | | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
1479 | 1489 | | |
1480 | 1490 | | |
1481 | 1491 | | |
| |||
0 commit comments