--- Begin Message ---
>>Ok, are you thinking of having a local queue for each node as well?
>>since if there was a single queue for all nodes how would you manage
>>the
>>concurrency of writes of each node?
I really don't known to be honest.
What could happen, is a live migration, where an event is emit on
node1, but the vm is transferred on node2 before the resize occur.
So maybe a central queue could be great here. (I think it's not too
much a problem for concurrency to have write lock when we need to
queue/dequeue).
And each local resize daemon looking at the queue if the vmid is
currently running locally.
Something like that.
>>(is there a similar function to >>cfs_lock_file but for C code?)
the pxmcfs is wrote in C, so I'm pretty sure it's possible to do it.
^_^
(I'm really bad in C or Rust, so maybe some proxmox developpers could
help on this part)
> > > 2. If we use a local daemon for each node how is it decided which
> > > node
> > > will preform the extend operation?
> > > Another option is to use a centralized daemon (maybe on the
> > > quorum
> > > master) that performs every extend.
> The local daemon where the vm is running should resize the lvm,
> because
> if the resize is done on another node, the lvm need to be
> rescan/refresh to see the new size. AFAIK, It's not done
> automatically.
>>Ok, at first I was thinking of doing a FIFO like cluster wide queue
>>where the extends would be done in the order of arrival. But if I'm
>>understanding correctly, by doing a local queue and extend daemon,
>>the
>>extends would be done in order but not in a global cluster sense
>>right?
>>Where each extend daemon would be competing to acquire the storage
>>lock
>>to proceed with the next extend. Please let me know if I'm
>>understanding
>>your idea correctly.
The lvm resize itself need to be locked globally. (because if you
resize in // on different servers different lvm volume, you could have
same disk sectors allocated to different lvms volumes)
so, indeed, each local daemon competing to have the resize lock.
FIFO should be use, because we want to resize as fast as possible after
en event emit (before than the vm is going out of space).
So, a global queue is better here also, just keeping local daemons
pooling the queue in FIFO order, and if the vm is local to the daemon,
the daemon is doing the resize.
something like that.
(but all ideas are welcome ^_^)
--- End Message ---
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel