[sheepdog] [PATCH v3 05/10] sheep: store the VDI copies data in disk in case of sheep restarts

levin li levin108 at gmail.com
Tue Aug 7 14:40:39 CEST 2012


On 2012年08月07日 20:24, Liu Yuan wrote:
> On 08/07/2012 07:20 PM, levin li wrote:
>> If we only store the copies data in memory, then after restart the
>> copies data is lost, and we can only try to read the inode data to
>> get the copies data, which is expensive
> 
> Is this really necessary? We need a lot of code to manage the local vdi copy number.
> This code open a window that we need a lot of more code to do it right:
>  - should also handle vdi deletion on EVERY node.
>  - should maintain the consistency of local vdi cp_nr against cluster. For e.g, after
> restart, some vdi has already been deleted when the node is down, how do you handle it?
> 
> I don't like this idea, it seems that bring much more trouble than it solves.
> 

I also don't like this idea, but it seems the effective way to do this thing, if not,
we can only to read the inode data to get the copies, which is not so light weight.

As to vdi deletion, we don't delete the copy data from the tree, because we never delete
the inode data, so long as the inode data is exist, we can't delete the VDI copy data.

The consistency is a big problem, I made sheep to fetch the list from other nodes since
it joins the cluster.

thanks,

levin



More information about the sheepdog mailing list