Open kvaps opened 1 year ago
Thanks for the notice.
I think we shouldn't allow creating the second diskful replica this case.
At least not an active one. The bug that I see here is that Linstor should have created the second diskful resource automatically with --inactive
. That would lead to a situation where the second diskful node will NOT have the DRBD device at all (not even as diskless), but the user can linstor r deactivate
the first diskful resource and linstor r activate
the second resource to "move" the DRBD device to the second node.
Although I do like the diskless-dancing idea, at least your third point will most likely not be implemented, since that would require some "if this resource gets primary" hook within Linstor, which is not something we intended to do.
The other two points sound like good suggestions but might have some well hidden problems in the details (i.e. correctly managing the node-ids). However, we will think about them.
PS: now that I thought a bit longer about this issue, I think we also have to prohibit having 2 shared resources with different internal/external metadata settings, as that will cause definitely a lot of trouble.
your third point will most likely not be implemented, since that would require some "if this resource gets primary" hook within Linstor, which is not something we intended to do.
Good point, I think we can implement this additional call for toggle-disk
in csi-driver.
This will allow us to handle the cases of recreating pods and live-migration of virtual machines the more smart way.
@ghernadi is it possible to perform this procedure by request if one of resouce is already InUse
?
Eg, by invoking drbdadm disconnect
with --force
, then toggling it into diskful?
if: toggle-disk -s storage-pool is requested on diskless resource on storage-pool with shared space then:
- check if this storage-pool contains other diskful resource
- turn this diskful replica to diskless without removing backing LV
- turn diskless replica to diskful on requested node
@ghernadi is it possible to perform this procedure by request if one of resouce is already InUse? Eg, by invoking drbdadm disconnect with --force, then toggling it into diskful?
Honestly, I would like to avoid using disconnect --force
as that could quite easily lead to unintended behavior.
So sad, I don't see any option to perform the live-migration for VMs in the shared-pool and keep data locality for them :(
Okay, I made a bit investigation and found that resources with external metadata could have more than one diskful drbd replica on shared-lun. I'm not sure how this configuration is dangerous, since all the data will be written on same device twice but it works with no problems. In theory protocol C should make it safe.
Considering the fact that this is the only possible way to live-migrate the vm on shared-lun and keep data-locality, I would suggest the following changes:
Ideally I would love to have the opportunity from DRBD to work with shared meta-disk, or at least suppress write requests between the nodes with shared data-disk. This way all the replicas on shared-pool could be diskful (as they really are)
Or some option to explain DRBD that data between two peers is always Consistent
to not perform actual synchronization between them
Hi, I have created shared LVM storage-pool by following the documentation on two nodes:
But I can't create more than one drbd diskful device on it:
I guess that drbd can't even work over shared LUN. I think we shouldn't allow creating the second diskful replica this case.
The proposed solution:
If:
create resource -s storage-pool
is requested on storage-pool with shared space: then:if:
toggle-disk -s storage-pool
is requested on diskless resource on storage-pool with shared space then:if: one of diskless resources become primary then: