Commit e38b7a7
authored
kvm: apply rbd_default_data_pool when creating volumes from templates on RBD (#13361)
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.1 parent a01fb0b commit e38b7a7
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 | |
|---|---|---|---|
| |||
1348 | 1348 | | |
1349 | 1349 | | |
1350 | 1350 | | |
| 1351 | + | |
| 1352 | + | |
1351 | 1353 | | |
1352 | 1354 | | |
1353 | 1355 | | |
| |||
1396 | 1398 | | |
1397 | 1399 | | |
1398 | 1400 | | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
1399 | 1405 | | |
1400 | 1406 | | |
1401 | 1407 | | |
| |||
1474 | 1480 | | |
1475 | 1481 | | |
1476 | 1482 | | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
1477 | 1487 | | |
1478 | 1488 | | |
1479 | 1489 | | |
| |||
0 commit comments