XIV(3)--Read/Write Operations

XIV系列:node

XIV(1)—Hardware Overview分布式

XIV (2)--Logical system conceptside

 

  以前的文章曾经说过HOST发过来的data会在XIV上存2份,即Primary Copy和Secondary Copy。只有当这2份都同时存在时,系统才是Full Redundancy状态。那主机在XIV上读写数据分别是怎么进行的呢?请看本篇:oop

-Each write is written to the cache of two data modules// 每一个写操做是先写到2个Data Module中的Cache中的spa

-Host is acknowledged as soon as two cache copies are available //只有当两份Cache都写完时才会发送一个Acknowledge给Hostblog

-De-staging to the disk drives takes place: //至于何时将cache中的数据Flush到Disk上是各个Module独立进行的get

–In the backgroundit

–Independently on each moduleio

 

  Write Operation Overviewtable

p_w_picpath  

1.Host sends write to interface

2.Interface sends write to primary data module

3.Primary data module sends write to secondary data module

4.Host is acknowledged only after write is completed on both modules

 

上图只是讲述了Host写数据操做的大体步骤,涉及到XIV内部具体是怎么进行的呢?

Write Operations

1, Host sends a write request to one of the i_nodes

2, i_node consults with the Slice Table, determines primary node ID and disk #

3, i_node forwards request to relevant module’s primary cache node

4, Primary cache node consults with the Slice Table, forwards request to the secondary cache node

5, Both cache nodes consult with their local Partition Table to determine physical location on disks

6, Both cache nodes save the written buffer in their memory cache

7, Secondary cache node send an ack to the primary cache, which then acks the i_node, which then acks the host

 

这里有两个Table,Slice Table和Local Partition Table。一个负责整套XIV的元数据,一个是负责盘上面的。能够看出全部的涉及到写到哪一个Node的具体哪块Disk时,是要查询Slice Table。而最后写到Disk上哪块Block上时,是查询Local Partition Table的。


Slice table

--It’s an index stored all the slices info for the whole system

--It’s existed in every module’s memory

--i_node and cte can query it and know the slices (primary and secondary slices) are stored in which module and which disk


Partition table

--Each cache node holds a Partition Table that keeps one entry for each physical partition that exists on the module

--It keeps translation maps between a (vol ID, logical partition #) pairs to (disk ID,  physical partition #) pairs


 

看完写操做,再来看读操做。

Read Operations

1, Host sends a read request to one of the i_nodes

2, i_node consults with the Slice Table, determines primary node ID and disk #

–A read request will always be directed to the primary copy of the data

3, i_node forwards request to relevant module’s cache node

4, Cache node consults with its local Partition Table, determines physical location on disk

5, Cache node reads the data from the memory cache, if there, or from the disk

6, Cache node sends data to i_node, which gives it to the host

 

一样地,读操做也涉及到Slice Table和Local Partition Table。

 

看到这里,我感受和我以前接触到的分布式文件系统(Distributed File system)很是相似,例如MooseFS,Google的GFS,Hadoop File System等等。有机会在深刻研究以后对比下二者实现方式的异同点。

相关文章
相关标签/搜索