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

Liu Yuan namei.unix at gmail.com
Tue Aug 7 14:58:28 CEST 2012


On 08/07/2012 08:40 PM, levin li wrote:
> 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.
> 

How expensive it is? Is it really expensive that we can't live with it?

Reading the inode is expensive, but it is simple. We should concentrate on the simplicity especially
for the first version of the patch. With the newly complexity introduced, it seems that
I even can't boot with local driver.

We can consider the optimization later when we think it is really necessary.

-- 
thanks,
Yuan



More information about the sheepdog mailing list