JP5470148B2 - Node device and computer program - Google Patents
Node device and computer program Download PDFInfo
- Publication number
- JP5470148B2 JP5470148B2 JP2010096986A JP2010096986A JP5470148B2 JP 5470148 B2 JP5470148 B2 JP 5470148B2 JP 2010096986 A JP2010096986 A JP 2010096986A JP 2010096986 A JP2010096986 A JP 2010096986A JP 5470148 B2 JP5470148 B2 JP 5470148B2
- Authority
- JP
- Japan
- Prior art keywords
- node
- node device
- file
- unit
- storage
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Information Transfer Between Computers (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
本発明は、ネットワーク上に分散されたノード間におけるファイルの分散管理に関し、特にP2P(Peer-to-Peer)型の分散ファイルシステムのノード装置及びコンピュータプログラムに関する。 The present invention relates to file distribution management among nodes distributed on a network, and more particularly to a node device and a computer program of a P2P (Peer-to-Peer) type distributed file system.
コンピュータではユーザが保存するデータをファイルと呼ばれる一連のデータの塊として取り扱う。このファイルはハードディスクドライブ等の蓄積装置に記録される。ファイルのどこのデータを蓄積装置のどの場所に記録したかを管理している部分をファイルシステムと呼び、OS(オペレーティングシステム)の一部として動作している。
分散ファイルシステムは、コンピュータネットワークで接続された複数のストレージサーバーを見かけ上1台の蓄積装置とみなして、ファイルの読み出しや書き込みなどのファイル操作を利用者に提供するシステムである。
A computer handles data stored by a user as a series of data chunks called files. This file is recorded in a storage device such as a hard disk drive. A portion that manages where data in a file is recorded in which location of the storage device is called a file system and operates as a part of an OS (operating system).
The distributed file system is a system that provides a user with file operations such as reading and writing of a file, apparently considering a plurality of storage servers connected via a computer network as one storage device.
分散ファイルシステムでは、保存したデータがどのストレージサーバーに保管されているかを管理する必要がある。管理方法は、大きく集中型と分散型に分けることができる。ここでは、分散型のファイル管理方法、特に、P2P(Peer-to-Peer)型のファイル管理方法について説明する。P2P型のファイル管理方法では、ファイル名とその保管先アドレスを一元管理しているサーバーが存在しないため、障害に強い特長を持つ。P2P型のファイル管理方法は、非構造型と構造型に分類されるが、以下に、DHT(Distributed Hash Table)を使った構造型P2Pによるファイル管理技術を説明する。 In the distributed file system, it is necessary to manage to which storage server the stored data is stored. Management methods can be broadly divided into a centralized type and a distributed type. Here, a distributed file management method, particularly a P2P (Peer-to-Peer) type file management method will be described. The P2P type file management method has a strong feature against failure because there is no server that centrally manages the file name and its storage address. The P2P type file management method is classified into a non-structural type and a structural type. A file management technique based on the structural type P2P using DHT (Distributed Hash Table) will be described below.
DHTを使ったP2Pでは、複数のノードによりオーバーレイネットワークを構成する。ここで、ノードとは、オーバーレイネットワークに参加するサーバーなどの総称である。図20は、DHTを用いたP2Pオーバーレイネットワークの原理を示す図である。同図に示す例では、円形のオーバーレイネットワークを形成している。オーバーレイネットワークに参加するノードは、例えば、SHA(Secure Hash Algorithm)−1などのある決められたハッシュ関数によりノードIDを生成し、オーバーレイネットワーク内では、このノードIDにより各ノードを識別する。円形のオーバーレイネットワーク(図20における実線の円)は、ノードIDをIDの数値が小さい順に時計周りに並べた状態を示している。また、各ノードが保有するファイルにはファイルIDを付与する。ファイルIDは、例えばファイル名を元にハッシュ関数を使って生成する。オーバーレイネットワーク内では、ファイルIDの値に時計回りに近いノードIDのノードがそのファイルを管理する。ここで、ファイルの管理とは、ファイルIDとそのファイルを保有するノードのアドレスを保存することである。 In P2P using DHT, an overlay network is configured by a plurality of nodes. Here, the node is a generic term for servers that participate in the overlay network. FIG. 20 is a diagram illustrating the principle of a P2P overlay network using DHT. In the example shown in the figure, a circular overlay network is formed. A node participating in the overlay network generates a node ID by using a predetermined hash function such as SHA (Secure Hash Algorithm) -1, and identifies each node by this node ID in the overlay network. A circular overlay network (solid-line circle in FIG. 20) shows a state in which node IDs are arranged clockwise in order of increasing numerical values of IDs. Further, a file ID is assigned to a file held by each node. The file ID is generated using a hash function based on the file name, for example. In the overlay network, a node having a node ID close to the file ID value in the clockwise direction manages the file. Here, the file management is to store the file ID and the address of the node that holds the file.
ファイルを保有するノードは、ファイルIDと自身のノードアドレスとの対応付けを、このファイルIDを管理すべきノードに登録する。ファイルの利用者は、利用したいファイルのファイルIDから、そのファイルIDに近いノードIDのノードをオーバーレイネットワーク上で発見し、その利用したいファイルを保有するノードのアドレスを知ることによって、ファイルにアクセスすることができる。 The node that owns the file registers the association between the file ID and its own node address in the node that should manage this file ID. The user of the file accesses the file by finding a node having a node ID close to the file ID from the file ID of the file to be used on the overlay network and knowing the address of the node that holds the file to be used. be able to.
なお、ここではファイルIDをキーとし、ノードアドレスをそのキーに対応した値として、DHTによるP2PをファイルIDからファイルを保管するノードアドレスを取得するデータベースとして利用している。このDHTによるP2Pは、キーからその値を検索する汎用的なKey-Value型データベースとして利用できる。 Here, the file ID is a key, the node address is a value corresponding to the key, and P2P by DHT is used as a database for acquiring a node address for storing a file from the file ID. This P2P by DHT can be used as a general-purpose key-value type database for retrieving a value from a key.
ファイルIDからそのファイルIDを管理するノード(ファイルを記憶しているノードではないことに注意)を検索するには、各ノードが、オーバーレイネットワークに参加しているノードを検索できることが必要である。そのため、各ノードは、ノードIDとノードアドレスとの対応付けを登録したノードテーブルを保持し、所望のファイルIDに近いノードを検索する。保持しているノードテーブルから所望のファイルIDの管理ノードを見つけられない場合には、他のノードに転送(ルーティング)することによって、最終的に参加ノードの中からファイルIDに近いノードを検索する。DHTを使ったP2Pでは、ノードテーブルの保持方法および、検索方法(検索要求のルーティング方法)により様々な方式が提案されている(例えば、非特許文献1参照)。ここでは、参加している全ノードを含むノードテーブルを、全ノードが保管する方式であるOneHopについて説明する(例えば、非特許文献2参照)。 In order to search a node that manages the file ID from the file ID (note that it is not a node that stores the file), each node needs to be able to search for a node participating in the overlay network. Therefore, each node holds a node table in which a correspondence between a node ID and a node address is registered, and searches for a node close to a desired file ID. When a management node having a desired file ID cannot be found from the held node table, a node close to the file ID is finally searched from participating nodes by transferring (routing) it to another node. . In P2P using DHT, various methods have been proposed according to a node table holding method and a search method (search request routing method) (for example, see Non-Patent Document 1). Here, OneHop, which is a method in which all nodes store a node table including all participating nodes, will be described (for example, see Non-Patent Document 2).
OneHopでは、全ノードが全参加ノードの完全なテーブルを保持するため、各ノードが持つノードテーブルのサイズが大きくなる欠点があるが、検索時のルーティングを必要としないため高速な検索が実現できる。また、ノードテーブルを分散して管理するP2Pでは、オーバーレイネットワークに参加している全ノードを把握することが困難であるが、OneHopでは全参加ノードを容易に把握できるため、ノードの状態管理が必要な用途では有効な方式である。 In OneHop, all nodes hold a complete table of all participating nodes, so there is a drawback that the size of the node table of each node becomes large. However, since routing at the time of search is not required, high-speed search can be realized. In addition, with P2P, which manages the node table in a distributed manner, it is difficult to grasp all the nodes participating in the overlay network. However, since OneHop can easily grasp all the participating nodes, node state management is required. This is an effective method for various applications.
OneHopでは、ノードの参加や離脱を、オーバーレイネットワーク内の全ノードへ通知することによって、全ノードが完全なノードテーブルを保持する。そのため、図21に示すようにオーバーレイネットワークを均等にk個に分割し、各領域においてスライス・リーダー(Slice Leader)を決める。さらに、k個に分割された領域内を、均等にs個に分割し、その分割したそれぞれにおいてユニット・リーダー(Unit Leader)を決める。ノードの参加や離脱を検知したノードは、まず、自領域のスライス・リーダーに通知する(ステップS1)。通知を受けたスライス・リーダーは、他の領域のスライス・リーダーに通知する(ステップS2)。通知を受けた各領域のスライス・リーダーは、自領域内のユニット・リーダーに通知する。このように、OneHopでは、階層的構造により、ノードの参加や離脱の情報をオーバーレイネットワーク内の全ノードに通知する。 In OneHop, all nodes hold a complete node table by notifying all nodes in the overlay network of node joins and leaves. Therefore, as shown in FIG. 21, the overlay network is equally divided into k pieces, and a slice leader is determined in each region. Further, the area divided into k pieces is equally divided into s pieces, and a unit leader is determined for each of the divided areas. The node that detects the joining or leaving of the node first notifies the slice leader of its own region (step S1). The slice leader that has received the notification notifies the slice leader in another area (step S2). The slice leader of each area that has received the notification notifies the unit leader in its own area. As described above, OneHop notifies all nodes in the overlay network of node joining and leaving information by a hierarchical structure.
以上説明したように、OneHopに限らずDHTを使ったP2P型ファイル管理技術では、ファイルIDの検索にノードテーブルを利用するため、ノードの参加や離脱が発生した場合にも、各ノードが保持するノードテーブルを正しい状態にしておくことが必要である。しかし、ノードの参加や離脱の通知が正しく到達しないなどが原因で、ノードテーブルに不整合が生じる場合がある。その対応として、一般に各ノードはStabilization(安定化)と呼ばれる処理を行う。Stabilizationでは、各ノードが自身の保持するノードテーブルに記録されている各ノードに対して、それら各ノードが存在するかどうかを検出するための生存確認用のパケットを定期的に送信する。これによって、ノードの参加や離脱を検知し、各ノードが保持するノードテーブルのメンテナンスを行なう。 As described above, in the P2P type file management technology using DHT as well as OneHop, the node table is used for searching the file ID. Therefore, even when a node joins or leaves, each node holds it. It is necessary to keep the node table in the correct state. However, inconsistencies may occur in the node table due to the failure of node join / leave notifications to arrive correctly. In response, each node generally performs a process called stabilization. In Stabilization, each node periodically transmits a survival confirmation packet for detecting whether or not each node exists to each node recorded in the node table held by the node. As a result, the joining or leaving of the node is detected, and the node table held by each node is maintained.
また、オーバーレイネットワークは、物理的なネットワークとは無関係にノードIDによって決められる仮想的なネットワークである。そのため、オーバーレイネットワーク上では隣接ノードであっても、物理的には遠距離に配置されたノードである場合もあるため、結果として物理ネットワーク上に多くのパケットが流れることになる。遠距離のノード間の通信量を減らす方法としてOneHop拡張方式が提案されている(例えば、特許文献1、非特許文献3参照)。
The overlay network is a virtual network determined by the node ID regardless of the physical network. Therefore, even if it is an adjacent node on the overlay network, it may be a node physically located at a long distance. As a result, many packets flow on the physical network. OneHop expansion method has been proposed as a method for reducing the amount of communication between nodes at long distances (see, for example,
OneHop拡張方式では、これまで説明したような、ファイルIDから当該ファイルIDを管理するノードを検索するためのノードテーブルである検索用テーブルとは別に、物理ネットワーク上のノードの位置(ローカリティ)を考慮してノードを並べたノードテーブルである管理用テーブルを保持する。そして、その管理用テーブルを使ってノードの参加や離脱の通知、Stabilizationの通信を行うことで、遠距離のノード間の通信量を減少させる。 In the OneHop expansion method, the position (locality) of the node on the physical network is considered separately from the search table that is a node table for searching the node that manages the file ID from the file ID as described above. Thus, a management table which is a node table in which nodes are arranged is held. Then, by using the management table, notification of node joining / leaving and Stabilization communication are performed, thereby reducing the amount of communication between nodes at a long distance.
分散ファイルシステムでは、ファイルの保管場所の管理だけでなく、利用者が分散ファイルシステムに接続するためのアクセス機能、ファイルを保持(ストレージ)するノードである各ストレージノードの使用容量を均等化する容量負荷分散機能、オーバーレイネットワークに参加しているノードの状況を把握するための管理機能など、様々な機能の追加が求められる。その場合、利用者の増減に応じてアクセス負荷分散を行うためにアクセス機能を持ったノードを増減させるなど、状況に応じて機能の追加、削除が必要になる。 In the distributed file system, in addition to managing the storage location of the file, the access function for users to connect to the distributed file system, the capacity to equalize the used capacity of each storage node that holds the file (storage) Various functions such as a load balancing function and a management function for grasping the status of nodes participating in the overlay network are required. In that case, it is necessary to add or delete functions depending on the situation, such as increasing or decreasing the number of nodes having access functions in order to distribute the access load according to the increase or decrease of users.
一方、上記において説明したように、DHTを用いたP2P型のファイル管理技術では、ノードの参加や離脱が発生すると、参加や離脱したノードの隣接ノードが管理するファイルIDの範囲が変わるため、各ノードが持つノードテーブルが古い状態(不整合な状態)の間は、所望のファイルIDを管理するノードを発見できないという問題がある。また、ファイルIDの管理ノードが変更になった場合、新しい管理ノードにファイルIDに対するノードの情報(ファイルの保管先のサーバーアドレスなど)が正しく登録されるまでの間もファイルIDを発見できないという問題がある。 On the other hand, as described above, in the P2P type file management technology using DHT, when a node joins or leaves, the range of file IDs managed by adjacent nodes of the joined or detached node changes. There is a problem that a node managing a desired file ID cannot be found while the node table of the node is old (inconsistent state). Also, when the file ID management node is changed, the file ID cannot be found until the node information (such as the server address of the file storage destination) is correctly registered in the new management node. There is.
ノードテーブルの不整合はStabilizationにより自動的に修正することができるが、修正されるまでには時間がかかるため、修正が行なわれている間はファイル(ファイルID)の検索に障害が生じてしまう。
つまり、ストレージノードと、ファイルストレージ以外の個別の機能を持った機能ノードとからなる分散ファイルシステムにおいては、必要に応じて機能ノードを頻繁にオーバーレイネットワークに参加、離脱させると、ファイルIDを管理するノードが頻繁に変更になってしまい、ファイルを記憶しているストレージノード自体には参加や離脱が発生しなくても、ファイルIDを検索できない期間が増大するという問題がある。
Inconsistencies in the node table can be corrected automatically by stabilization, but it takes time until the correction is made, so that the search for the file (file ID) will be hindered while the correction is being made. .
In other words, in a distributed file system composed of storage nodes and functional nodes having individual functions other than file storage, file IDs are managed when functional nodes are frequently joined and removed from the overlay network as necessary. There is a problem that the period when the file ID cannot be searched increases even if the node is frequently changed and the storage node itself storing the file does not participate or leave.
ノードの参加、離脱による検索障害に対応するために、ファイルIDの登録を管理ノードだけでなく近隣のノードにも登録しておく方法や、ノードの参加、離脱時に隣接ノードとの間でノードテーブルをコピーするなどの方法が提案されているが、いずれもその処理のためにノードに処理負荷や、ノード間の通信負荷が発生する。 In order to cope with a search failure due to node join / leave, file ID registration not only to the management node but also to neighboring nodes, and the node table between neighboring nodes at the time of node join / leave Have been proposed, but in any case, a processing load and a communication load between the nodes are generated for the processing.
本発明は、このような事情を考慮してなされたもので、その目的は、ファイルストレージ以外の機能を持ったノードが、他のノードやネットワークに負荷をかけずに、かつ、ファイルの検索に影響を及ぼすことなく、参加や離脱を行なうことが可能な分散ファイルシステムのノード装置及びコンピュータプログラムを提供することにある。 The present invention has been made in view of such circumstances, and its purpose is to allow a node having a function other than file storage to search for a file without imposing a load on other nodes and the network. It is an object of the present invention to provide a distributed file system node device and a computer program that can participate and leave without affecting.
[1] 本発明の一態様は、ファイルを分散して管理する分散ファイルシステムにネットワークを介して参加するノード装置であって、ファイルを分散して記憶するストレージノード装置または付加機能を提供する機能ノード装置であり、前記分散ファイルシステムを構成するノード装置のノードIDとアドレスとを対応付けする管理用ノードテーブルと、前記ストレージノード装置のノードIDとアドレスとを対応付けする検索用ノードテーブルとを記憶する記憶部と、前記分散ファイルシステムへの各ノード装置の参加または離脱の通知情報を受信し、前記管理用ノードテーブルに記憶されている前記ノードIDに基づいて選択した前記アドレスをあて先として前記通知情報を送信する通知情報処理部と、ストレージノード装置が参加したことを表す通知情報を前記通知情報処理部が受信した場合には、前記通知情報に基づいて前記ストレージノード装置のノードIDとアドレスとを前記管理用ノードテーブルと前記検索用ノードテーブルとに書き込み、機能ノード装置が参加したことを表す通知情報を前記通知情報処理部が受信した場合には、前記通知情報に基づいて前記機能ノード装置のノードIDとアドレスとを前記管理用ノードテーブルのみに書き込み、ストレージノード装置が離脱したことを表す通知情報を前記通知情報処理部が受信した場合には、前記通知情報に基づいて前記ストレージノード装置のノードIDと対応するアドレスとを前記管理用ノードテーブルと前記検索用ノードテーブルとから削除し、機能ノード装置が離脱したことを表す通知情報を前記通知情報処理部が受信した場合には、前記通知情報に基づいて前記機能ノード装置のノードIDと対応するアドレスとを前記管理用ノードテーブルから削除するテーブル処理部と、指定されたファイルIDと、前記検索用ノードテーブルに記憶されている前記ノードIDとに基づいて、前記ファイルIDを管理する前記ストレージノード装置のアドレスを取得するテーブル検索部と、を備えることを特徴とするノード装置である。
この発明によれば、ネットワークを介して接続される複数のノード装置から構成される分散ファイルシステムにおいて、各ノード装置は、ファイル検索用のノードテーブルと、ノード装置管理用のノードテーブルを保持し、ファイルを保管するストレージノード装置については、検索用のノードテーブル及び管理用のノードテーブルにノード情報を登録し、付加機能を有するノード装置については、管理用のノードテーブルにのみノード情報を登録する。
これにより、分散ファイルシステムの稼働中であっても、ファイル管理に影響を及ぼすことなく、ファイル記憶以外の個別の機能を有するノードの追加や削除が可能となる。また、検索用ノードテーブルを同期させる必要がないため、ネットワークやノード装置に負荷がかからない。
[1] One aspect of the present invention is a node device that participates via a network in a distributed file system that distributes and manages files, and a storage node device that distributes and stores files or a function that provides an additional function A management node table that associates node IDs and addresses of node devices that constitute the distributed file system, and a search node table that associates node IDs and addresses of the storage node devices. A storage unit for storing, and notification information of participation or withdrawal of each node device in the distributed file system, and the address selected based on the node ID stored in the management node table as the destination The notification information processing unit that sends the notification information and the storage node device participated When the notification information processing unit receives the notification information indicating that, the node ID and address of the storage node device are written to the management node table and the search node table based on the notification information, When the notification information processing unit receives notification information indicating that a functional node device has participated, the node ID and address of the functional node device are written only in the management node table based on the notification information, When the notification information processing unit receives notification information indicating that the storage node device has left, the management node table and the address corresponding to the node ID of the storage node device based on the notification information The notification information indicating that the functional node device has been removed is deleted from the search node table. When the information processing unit receives, the table processing unit for deleting the address corresponding to the node ID of the functional node device based on the notification information from the management node table, the specified file ID, And a table search unit that acquires an address of the storage node device that manages the file ID based on the node ID stored in the search node table.
According to the present invention, in a distributed file system composed of a plurality of node devices connected via a network, each node device holds a node table for file search and a node table for node device management, For storage node devices that store files, node information is registered in the search node table and management node table, and for node devices having additional functions, node information is registered only in the management node table.
As a result, even when the distributed file system is in operation, it is possible to add or delete nodes having individual functions other than file storage without affecting file management. Further, since there is no need to synchronize the search node table, no load is applied to the network or the node device.
[2] 本発明の一態様は、上述するノード装置であって、前記管理用ノードテーブルに登録されている前記アドレスの前記ノード装置が離脱していないかを確認する安定化部をさらに備え、前記テーブル処理部は、前記管理用ノードテーブルに登録されている前記アドレスの前記ノード装置が離脱したことを前記安定化部が検出した場合、前記管理用ノードテーブルと前記検索用ノードテーブルとから離脱したノード装置のノードIDとアドレスとを削除し、前記通知情報処理部は、前記管理用ノードテーブルに記憶されている前記ノードIDに基づいて選択した前記アドレスをあて先として、前記安定化部が検出した前記ノード装置が離脱したことを表す通知情報を送信する、ことを特徴とする。
この発明によれば、分散ファイルシステムから離脱したノード装置を検出し、検索用のノードテーブルと管理用のノードテーブルからこの離脱したノード装置の情報を削除するとともに、他のノード装置へも当該ノード装置の離脱を通知する。
これにより、ノード装置が分散ファイルシステムから離脱するときに、他のノード装置へ離脱を通知しなくとも、検索用のノードテーブルと管理用のノードテーブルを更新することができる。
[2] One aspect of the present invention is the above-described node device, further including a stabilization unit that confirms whether the node device at the address registered in the management node table has left, The table processing unit leaves the management node table and the search node table when the stabilization unit detects that the node device at the address registered in the management node table has left. And the notification information processing unit detects the address selected based on the node ID stored in the management node table as the destination, and the stabilization unit detects The notification information indicating that the node device has left is transmitted.
According to the present invention, a node device that has left the distributed file system is detected, the information of the node device that has left is deleted from the search node table and the management node table, and the node device is also transferred to other node devices. Notify device disconnection.
As a result, when the node device leaves the distributed file system, the search node table and the management node table can be updated without notifying other node devices of the departure.
[3] 本発明の一態様は、上述するノード装置であって、ファイルを記憶するファイル蓄積部と、ファイルIDと、ファイルを記憶している前記ストレージノード装置のアドレスとを対応付けて記憶するキーテーブル蓄積部と、指定されたファイルIDに対応した前記ストレージノード装置のアドレスを前記キーテーブル蓄積部から読み出して出力するキーテーブル操作部と、ファイル名を指定した操作指示を受信し、前記ファイル名により特定される前記ファイル蓄積部内の前記ファイルに対する操作を行うファイル操作部と、をさらに備えることを特徴とする。
この発明によれば、ノード装置は、分散ファイルシステムにおける管理対象のファイルを記憶するとともに、ファイルが記憶されているストレージノード装置のアドレスを管理する。そして、ファイルIDを受信すると、該ファイルIDのファイルを記憶しているストレージノード装置のアドレスを返送する。また、自身が記憶しているファイルに対して、他のノード装置から指示されたファイル操作を行なう。
これにより、ノード装置は、ストレージノード装置として機能し、分散ファイルシステムにおける管理対象のファイルの所在を管理するとともに、他のノード装置から自身が記憶しているファイルに対するファイル操作を可能とする。
[3] One aspect of the present invention is the above-described node device, which stores a file storage unit that stores a file, a file ID, and an address of the storage node device that stores the file in association with each other. A key table storage unit; a key table operation unit that reads out and outputs the address of the storage node device corresponding to the specified file ID from the key table storage unit; and an operation instruction that specifies a file name; And a file operation unit for performing an operation on the file in the file storage unit specified by a name.
According to this invention, the node device stores the file to be managed in the distributed file system and manages the address of the storage node device in which the file is stored. When the file ID is received, the address of the storage node apparatus storing the file with the file ID is returned. In addition, a file operation instructed by another node device is performed on the file stored in itself.
As a result, the node device functions as a storage node device, manages the location of the file to be managed in the distributed file system, and enables file operations on files stored in itself from other node devices.
[4] 本発明の一態様は、上述するノード装置であって、前記キーテーブル蓄積部は、ステータスIDとステータス情報とを対応付けて記憶し、自ノード装置のステータス情報を特定するステータスIDを前記テーブル検索部に渡し、前記ステータスIDに対応して前記テーブル検索部が取得したアドレスをあて先として前記ステータスID及び前記ステータス情報の登録要求を送信するステータス情報登録部をさらに備え、前記キーテーブル操作部は、ステータスID及びステータス情報の登録要求を受信した場合、登録が要求された前記ステータスIDと前記ステータス情報とを対応付けて前記キーテーブル蓄積部に書き込み、ステータスIDを指定したステータス情報の要求を受信した場合、受信した前記ステータスIDに対応したステータス情報を前記キーテーブル蓄積部から読み出して出力し、前記テーブル検索部は、ファイルIDの代わりに前記ステータスIDを用いて前記ストレージノード装置のアドレスを取得する、ことを特徴とする。
この発明によれば、ノード装置は、各ノード装置のステータス情報を分散管理し、問合せがあった場合には、管理しているステータス情報を出力する。
これにより、ストレージノード装置として機能するノード装置において、分散ファイルシステム内の各ストレージノード装置のステータス情報を分散し管理し、ストレージノード装置の使用ディスク容量を均等化する容量負荷分散ノード装置として機能するノード装置や、各ノード装置のステータス情報をユーザに提供する管理ノード装置として機能するノード装置にステータス情報を通知することができる。
[4] One aspect of the present invention is the node device described above, wherein the key table storage unit stores a status ID and status information in association with each other, and stores a status ID for specifying the status information of the own node device. A status information registration unit that sends the status ID and a request for registration of the status information to an address acquired by the table search unit corresponding to the status ID as a destination, the key table operation When receiving a status ID and status information registration request, the unit writes the status ID requested for registration and the status information in association with each other and writes them in the key table storage unit, and requests status information specifying the status ID. Received, the scan corresponding to the received status ID is received. The status information is read from the key table storage unit and output, and the table search unit acquires the address of the storage node device using the status ID instead of the file ID.
According to the present invention, the node device distributes and manages the status information of each node device, and outputs the managed status information when there is an inquiry.
As a result, the node device functioning as a storage node device functions as a capacity load distribution node device that distributes and manages the status information of each storage node device in the distributed file system and equalizes the used disk capacity of the storage node device. The status information can be notified to the node device and the node device functioning as a management node device that provides the status information of each node device to the user.
[5] 本発明の一態様は、上述するノード装置であって、ファイル名を指定したファイル操作指示を受信し、受信したファイル名から生成されるファイルIDを前記テーブル検索部に渡し、前記ファイルIDに対応して前記テーブル検索部が取得したアドレスをあて先として前記ファイルIDを送信し、送信した前記ファイルIDに対応してファイルを記憶しているストレージノード装置のアドレスを受信し、受信したアドレスをあて先として前記ファイル名を指定したファイル操作指示を送信するファイル処理部をさらに備える、ことを特徴とする。
この発明によれば、クライアント装置からファイル操作指示を受信し、検索用ノードテーブルを利用してファイル操作対象のファイルの所在を検索し、検索の結果得られたストレージノード装置にファイル操作指示を出力する。
これにより、ノード装置はアクセスノード装置として機能し、クライアント装置に対して、分散ファイルシステムで管理しているファイルへのファイル操作を可能とする。
[5] One aspect of the present invention is the node device described above, which receives a file operation instruction specifying a file name, passes a file ID generated from the received file name to the table search unit, and The file ID is transmitted to the address acquired by the table search unit corresponding to the ID, the address of the storage node device storing the file corresponding to the transmitted file ID is received, and the received address And a file processing unit for transmitting a file operation instruction designating the file name as a destination.
According to the present invention, a file operation instruction is received from a client device, the location of the file operation target file is searched using the search node table, and the file operation instruction is output to the storage node device obtained as a result of the search To do.
As a result, the node device functions as an access node device and enables the client device to perform file operations on files managed by the distributed file system.
[6] 本発明の一態様は、上述するノード装置であって、分散ファイルシステム内の前記ストレージノード装置それぞれのステータス情報を特定するステータスIDを前記テーブル検索部に渡し、前記ステータスIDに対応して前記テーブル検索部が取得したアドレスをあて先として前記ステータスIDを送信し、ステータス情報を要求するステータス情報取得部と、前記ステータス情報取得部の要求に応じて取得した前記ストレージノード装置のステータス情報に基づいて、ファイルの移動元及び移動先の前記ストレージノード装置と、移動容量とを決定する容量均等化計算部と、前記容量均等化計算部によって決定されたファイル移動元の前記ストレージノード装置からファイル移動先の前記ストレージノード装置へ前記移動容量に基づいてファイルを移動するファイル移動部と、をさらに備え、前記テーブル検索部は、ファイルIDの代わりに前記ステータスIDを用いて前記ストレージノード装置のアドレスを取得する、ことを特徴とする。
この発明によれば、分散ファイルシステム内の各ストレージノード装置のステータス情報を取得し、取得したステータス情報に基づいて、各ストレージノード装置における使用ディスク容量が均等に近づくよう、ストレージノード装置間でファイルを移動させる。
これにより、容量負荷分散ノード装置として機能するノード装置は、ユーザによる操作を必要とせず、分散ファイルシステム内の各ストレージノード装置のディスク使用率が均等に近づくように調整することができる。例えば、ファイル未登録のストレージノード装置を分散ファイルシステムに参加させた場合、管理者が明示的にファイル移動を指示しなくとも、ディスク使用率が高いストレージノード装置から新たに参加したストレージノード装置へファイルを移動させることができる。
[6] One aspect of the present invention is the above-described node device, which passes a status ID for specifying status information of each of the storage node devices in the distributed file system to the table search unit, and corresponds to the status ID. The status ID is transmitted to the address acquired by the table search unit as a destination, the status information acquisition unit requesting status information, and the status information of the storage node device acquired in response to the request of the status information acquisition unit Based on the storage node device of the migration source and destination of the file, a capacity equalization calculation unit for determining the migration capacity, and the file from the storage node device of the file migration source determined by the capacity equalization calculation unit Based on the migration capacity to the destination storage node device And a file moving unit that moves the file, wherein the table search unit obtains the address of the storage node device using the status ID instead of the file ID.
According to the present invention, the status information of each storage node device in the distributed file system is acquired, and based on the acquired status information, the file capacity between the storage node devices is set so that the used disk capacity in each storage node device approaches evenly. Move.
As a result, the node device functioning as a capacity load distribution node device does not require any user operation, and can be adjusted so that the disk usage rates of the storage node devices in the distributed file system approach evenly. For example, if a storage node device that has not been registered with a file is added to the distributed file system, the storage node device with a high disk usage rate can be changed to a newly joined storage node device without the administrator explicitly instructing to move the file. You can move files.
[7] 本発明の一態様は、上述するノード装置であって、前記ノード装置のステータス情報を特定するステータスIDを前記テーブル検索部に渡し、前記ステータスIDに対応して前記テーブル検索部が取得したアドレスをあて先として前記ステータスIDを送信し、ステータス情報を取得するステータス情報取得部と、前記ステータス情報取得部が取得した前記ステータス情報を出力する情報提示部と、をさらに備え、前記テーブル検索部は、ファイルIDの代わりに前記ステータスIDを用いて前記ストレージノード装置のアドレスを取得する、ことを特徴とする。
この発明によれば、検索用ノードテーブルを用いて、各ストレージノード装置のステータス情報を記憶しているストレージノード装置を検索し、この検索の結果得られたストレージノード装置から読み出したステータス情報を提示する。
これにより、ノード装置は管理ノード装置として機能し、利用者に指示されたストレージノード装置のステータス情報を提示することができる。
[7] One aspect of the present invention is the node device described above, wherein a status ID that specifies status information of the node device is passed to the table search unit, and the table search unit acquires the status ID corresponding to the status ID. The table search unit further includes: a status information acquisition unit that transmits the status ID with the address as a destination and acquires status information; and an information presentation unit that outputs the status information acquired by the status information acquisition unit Uses the status ID instead of the file ID to obtain the address of the storage node device.
According to the present invention, the search node table is used to search for the storage node device storing the status information of each storage node device, and the status information read from the storage node device obtained as a result of this search is presented. To do.
Thereby, the node device functions as a management node device, and can present status information of the storage node device instructed by the user.
[8] 本発明の一態様は、上述するノード装置であって、前記管理用ノードテーブルにノードIDの追加または削除が行なわれたことを検出した場合に、ノード装置の参加または離脱を出力する情報提示部をさらに備える、ことを特徴とする。
この発明によれば、ノード装置は、管理用ノードテーブルにノードIDが登録された場合はノード装置の参加を、ノードIDが削除された場合はノード装置の離脱を出力する。
これにより、ノード装置は管理ノード装置として機能し、分散ファイルシステムにノード装置が参加または離脱したことを利用者に提示することができる。
[8] One aspect of the present invention is the node device described above, and outputs join or leave of a node device when it is detected that a node ID has been added to or deleted from the management node table. An information presentation unit is further provided.
According to this invention, the node device outputs the participation of the node device when the node ID is registered in the management node table, and outputs the detachment of the node device when the node ID is deleted.
Accordingly, the node device functions as a management node device, and can present to the user that the node device has joined or left the distributed file system.
[9] 本発明の一態様は、ファイルを分散して管理する分散ファイルシステムにネットワークを介して参加するノード装置として用いられるコンピュータを、ファイルを分散して記憶するストレージノード装置または付加機能を提供する機能ノード装置であり、前記分散ファイルシステムを構成するノード装置のノードIDとアドレスとを対応付けする管理用ノードテーブルと、前記ストレージノード装置のノードIDとアドレスとを対応付けする検索用ノードテーブルとを記憶する記憶部と、前記分散ファイルシステムへの各ノード装置の参加または離脱の通知情報を受信し、前記管理用ノードテーブルに記憶されている前記ノードIDに基づいて選択した前記アドレスをあて先として前記通知情報を送信する通知情報処理部と、ストレージノード装置が参加したことを表す通知情報を前記通知情報処理部が受信した場合には、前記通知情報に基づいて前記ストレージノード装置のノードIDとアドレスとを前記管理用ノードテーブルと前記検索用ノードテーブルとに書き込み、機能ノード装置が参加したことを表す通知情報を前記通知情報処理部が受信した場合には、前記通知情報に基づいて前記機能ノード装置のノードIDとアドレスとを前記管理用ノードテーブルのみに書き込み、ストレージノード装置が離脱したことを表す通知情報を前記通知情報処理部が受信した場合には、前記通知情報に基づいて前記ストレージノード装置のノードIDと対応するアドレスとを前記管理用ノードテーブルと前記検索用ノードテーブルとから削除し、機能ノード装置が離脱したことを表す通知情報を前記通知情報処理部が受信した場合には、前記通知情報に基づいて前記機能ノード装置のノードIDと対応するアドレスとを前記管理用ノードテーブルから削除するテーブル処理部と、指定されたファイルIDと、前記検索用ノードテーブルに記憶されている前記ノードIDとに基づいて、前記ファイルIDを管理する前記ストレージノード装置のアドレスを取得するテーブル検索部、として機能させることを特徴とするコンピュータプログラムである。 [9] One aspect of the present invention provides a storage node apparatus or an additional function for distributing and storing a computer used as a node apparatus that participates in a distributed file system that distributes and manages files via a network. A management node table that associates node IDs and addresses of node devices that constitute the distributed file system, and a search node table that associates node IDs and addresses of the storage node devices And a storage unit that stores the notification information of participation or withdrawal of each node device from the distributed file system, and the address selected based on the node ID stored in the management node table A notification information processing unit for transmitting the notification information as When the notification information processing unit receives notification information indicating that the node device has joined, the management node table and the search node are used to determine the node ID and address of the storage node device based on the notification information. And when the notification information processing unit receives notification information indicating that the functional node device has participated, the node ID and address of the functional node device are assigned to the management node based on the notification information. When the notification information processing unit receives notification information that is written only in the table and indicates that the storage node device is detached, the node ID of the storage node device and the corresponding address are managed based on the notification information. Deleted from the node table for search and the node table for search and A table processing unit that deletes the node ID of the functional node device and the corresponding address from the management node table based on the notification information when the notification information processing unit receives And a table search unit that acquires an address of the storage node device that manages the file ID based on the file ID and the node ID stored in the search node table. It is a computer program.
本発明によれば、ネットワークを介して接続される複数のノード装置によって構成される分散ファイルシステムにおいて、各ノード装置がファイル検索用の検索用ノードテーブルと、ノード装置管理用の管理用ノードテーブルとを保持し、ファイルを保管するノード装置については、検索用ノードテーブル及び管理用のノードテーブルにノード情報を登録し、ファイルを保管せず個別の機能を有するノード装置については、管理用ノードテーブルにのみノード情報を登録することにより、分散ファイルシステムの稼働中であっても、ファイル管理に影響を及ぼすことなく、個別の機能を有するノード装置の追加や削除が可能となる。また、検索用ノードテーブルを同期させる必要がないため、ネットワークやノード装置へ高い負荷をかけることがない。 According to the present invention, in a distributed file system composed of a plurality of node devices connected via a network, each node device has a search node table for file search, and a management node table for node device management. For node devices that store files and store files, register node information in the search node table and management node table, and for node devices that do not store files and have individual functions, in the management node table By registering only node information, node devices having individual functions can be added or deleted without affecting file management even when the distributed file system is in operation. In addition, since it is not necessary to synchronize the search node table, a high load is not applied to the network and the node device.
以下、図面を参照しながら本発明の実施形態を詳細に説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
[1. 全体説明]
図1は、本発明の一実施の形態による分散ファイルシステムの構成図である。同図において、分散ファイルシステムは、ストレージノード装置100、アクセスノード装置200、容量負荷分散ノード装置300、管理ノード装置400を、通信ネットワーク1を介して接続することによって構成される。通信ネットワーク1は、ルータなどの通信装置やケーブルなどの通信線等の各種ネットワーク装置から構成されるIP(Internet Protocol)通信網である。同図に示す分散ファイルシステムにおいては、複数のストレージノード装置100として、ストレージノード装置100a、100b、100cが示されている。なお、アクセスノード装置200、容量負荷分散ノード装置300、管理ノード装置400が複数存在してもよい。
[1. Overall description]
FIG. 1 is a configuration diagram of a distributed file system according to an embodiment of the present invention. In the figure, the distributed file system is configured by connecting a
ストレージノード装置100は、分散ファイルシステムにおいて管理対象となるファイルを記憶する。アクセスノード装置200、容量負荷分散ノード装置300、管理ノード装置400はそれぞれ、ファイルストレージ以外の個別の機能を提供する。以下、ストレージノード装置100、アクセスノード装置200、容量負荷分散ノード装置300、及び、管理ノード装置400を総称して「ノード装置」と記載し、アクセスノード装置200、容量負荷分散ノード装置300、及び、管理ノード装置400を総称して「機能ノード装置」と記載する。これらの機能ノード装置が提供する機能を付加機能という。付加機能は、分散ファイルシステムへ提供される、ファイルを記憶する機能以外の付加的な機能である。
The
本実施形態のノード装置はノードを実行する装置であり、ノードとはコンピュータ内のプロセスに相当する。1台のコンピュータ装置が1つのノード装置のみを備える場合もあり、1台のコンピュータ装置が2以上のノード装置を備えることにより、1台のコンピュータ装置において機能の異なる複数のノードが実行される場合もある。 The node device of the present embodiment is a device that executes a node, and the node corresponds to a process in a computer. In some cases, one computer device includes only one node device, and when one computer device includes two or more node devices, a plurality of nodes having different functions are executed in one computer device. There is also.
利用者は、アクセスノード装置200に接続されたクライアント装置2を介して、分散ファイルシステム内のファイルを操作することができる。1台のコンピュータ装置がクライアント装置2のみを備える場合もあり、1台のコンピュータ装置において、アクセスノード装置200などのノード装置とクライアント装置2を備える場合もある。
A user can operate a file in the distributed file system via the
本実施形態による分散ファイルシステムは、通信ネットワーク1を介して接続されるノード装置によりオーバーレイネットワークを実現する。オーバーレイネットワークに参加する各ノード装置は、ノードテーブルとして、ファイル検索に用いる検索用ノードテーブルと、オーバーレイネットワークに参加している全てのノード装置の管理に用いる管理用ノードテーブルとを記憶する。そして、ストレージノード装置100については、検索用ノードテーブル及び管理用ノードテーブルの両方に登録し、機能ノード装置については管理用ノードテーブルのみに登録する。ノード装置は、検索用ノードテーブルのみを用いて、DHT(Distributed Hash Table)を使ったP2Pと同様に、ファイルIDを管理するノード装置の検索を行なう。これにより、機能ノード装置の参加や離脱が生じた場合にも、ファイルIDの検索が滞るなどの影響を及ぼさないようにすることが可能となる。
The distributed file system according to the present embodiment implements an overlay network with node devices connected via the
[2. ノード装置の構成]
図2は、ノード装置の構成を示すブロック図であり、本発明と関係する機能ブロックのみ抽出して示している。同図に示すように、ストレージノード装置100、アクセスノード装置200、容量負荷分散ノード装置300、及び、管理ノード装置400の各ノード装置は、ノードテーブル管理部10、固有機能処理部20、ネットワークインタフェース部30、記憶部40を備えて構成される。全てのノード装置は、固有機能処理部20を除き、共通な構成である。
[2. Node device configuration]
FIG. 2 is a block diagram showing the configuration of the node device, and shows only the functional blocks related to the present invention. As shown in the figure, each node device of a
記憶部40は、ハードディスク装置や半導体メモリなどで実現され、管理用ノードテーブル41と検索用ノードテーブル42を記憶する。管理用ノードテーブル41は、オーバーレイネットワークに参加している全ノード装置のノードID及びノードアドレスの対応付けを示す。検索用ノードテーブル42は、ストレージノード装置100のノードID及びノードアドレスの対応付けを示す。
The
ネットワークインタフェース部30は、通信ネットワーク1を介したデータの送受信インタフェースを提供する。ネットワークインタフェース部30は、通信ネットワーク1から受信したデータを各部へ出力したり、各部から指示に従って通信ネットワーク1を介してデータを送信したりする。ノードテーブル管理部10は、他のノード装置との間で、ノード装置の参加及び離脱の通知メッセージを交換し、記憶部40内の管理用ノードテーブル41、検索用ノードテーブル42を更新する。固有機能処理部20は、記憶部40内の管理用ノードテーブル41、検索用ノードテーブル42を利用して、ストレージノード装置100、アクセスノード装置200、容量負荷分散ノード装置300、管理ノード装置400などのノード装置の種類に応じた機能を実行する。
The
[2.1 ノードテーブル管理部10の内部構成]
図3は、図2に示すノード装置のノードテーブル管理部10の内部構成を示すブロック図であり、本発明と関係する機能ブロックのみ抽出して示している。同図に示すように、ノードテーブル管理部10は、通知処理部12(通知情報処理部)、安定化(Stabilization)処理部13、テーブル処理部14を備えて構成される。
通知処理部12は、ネットワークインタフェース部30を介して他のノードの通知処理部12との間で、ノード装置の参加および離脱を表す通知情報として通知メッセージを交換する。安定化処理部13は、記憶部40内の管理用ノードテーブル41及び検索用ノードテーブル42を正しく維持するために、ネットワークインタフェース部30を介して他のノード装置との間で存在確認を行う。テーブル処理部14は、通知処理部12または安定化処理部13からノード装置の参加、離脱の通知を受け、記憶部40内の管理用ノードテーブル41および検索用ノードテーブル42を書き換える。
[2.1 Internal configuration of node table management unit 10]
FIG. 3 is a block diagram showing the internal configuration of the node
The
[2.2 テーブル構成]
図4は、記憶部40に記憶される管理用ノードテーブル41及び検索用ノードテーブル42の設定例を示す図である。同図に示すように、管理用ノードテーブル41には、オーバーレイネットワークに参加している全てのノード装置のノードIDを示すキー値と、そのノードIDにより特定されるノード装置のノードアドレスを示すデータとが対応付けて登録されている。
[2.2 Table structure]
FIG. 4 is a diagram illustrating a setting example of the management node table 41 and the search node table 42 stored in the
一方、検索用ノードテーブル42には、オーバーレイネットワークに参加しているストレージノード装置100のノードIDを示すキー値と、そのノードIDにより特定されるストレージノード装置100のノードアドレスを示すデータとが対応付けて登録されている。
管理用ノードテーブル41、検索用ノードテーブル42においては、ノードIDが小さい順に並べられている。
On the other hand, in the search node table 42, a key value indicating the node ID of the
In the management node table 41 and the search node table 42, the node IDs are arranged in ascending order.
[2.3 ノード装置間の通信パケット]
図5は、通知処理部12および安定化処理部13が他のノード装置と交換する通信パケット(通知情報)の構造を示す図である。同図に示すように、通信パケットは、コマンド種別または応答種別と、送信先アドレス、送信元アドレス、及び、固有データとから構成される。本実施形態の通信パケットには、要求パケットと、要求パケットに対する応答である応答パケットとがある。要求パケットのコマンドの種類には「JOIN」、「PING」、「NOTIFY」があり、応答パケットの応答種別には、「OK」、「NG」がある。
[2.3 Communication packets between node devices]
FIG. 5 is a diagram illustrating a structure of a communication packet (notification information) exchanged between the
図6は、図5に示す通信パケットの固有データの内容を示す図である。同図に示すように、固有データの内容は、コマンドの種別により異なる。
JOINコマンド及びPINGコマンドの場合、ノードID、機能種別、及び、ノードアドレスが固有データに設定され、NOTIFYコマンドの場合、ホストID、機能種別、ノードアドレス、動作種別、及び、通知モードが固有データに設定される。また、JOINコマンドの応答の場合、管理用ノードテーブルが固有データに設定される。PINGコマンド、NOTIFYコマンドの応答には、固有データは設定されない。
機能種別は、例えば、「ストレージノード」、「アクセスノード」、「容量負荷分散ノード」、「管理ノード」などを示し、動作種別は、「参加(JOIN)」、または、「離脱(LEAVE)」のいずれかを示す。
以下に、各コマンドについて説明する。
FIG. 6 is a diagram showing the contents of the unique data of the communication packet shown in FIG. As shown in the figure, the content of the unique data varies depending on the type of command.
In the case of the JOIN command and the PING command, the node ID, the function type, and the node address are set to the unique data. In the case of the NOTIFY command, the host ID, the function type, the node address, the operation type, and the notification mode are set to the unique data. Is set. In the case of a response to the JOIN command, the management node table is set as unique data. No unique data is set in the response to the PING command and NOTIFY command.
The function type indicates, for example, “storage node”, “access node”, “capacity load distribution node”, “management node”, etc., and the operation type is “join (JOIN)” or “leave (LEAVE)”. Indicates one of the following.
Each command will be described below.
[2.3.1 JOINコマンド]
JOINコマンドは、ノード装置がオーバーレイネットワークに参加する場合に用いる。JOINコマンドの要求パケット(以下、「要求パケット(JOIN)」と記載する。)には、オーバーレイネットワークに参加したノード装置のノードID、機能種別、ノードアドレスが固有データとして格納される。また、ノードIDは、あらかじめ決められたハッシュ関数により生成される。例えば、SHA−1のハッシュ関数を使ってノードアドレス(ノード装置のIPドレスとポート番号の組み合わせ)のハッシュ値を算出し、その算出したハッシュ値をノードIDとする。
JOINコマンドが成功すると、要求パケット(JOIN)を受信したノード装置において記憶されている管理用ノードテーブル41が、JOINコマンドに対する応答種別「OK」の応答パケット(以下、「応答パケット(OK)」と記載する。)の固有データに格納され、要求パケット(JOIN)の送信元ノード装置に返送される。
[2.3.1 JOIN command]
The JOIN command is used when the node device participates in the overlay network. In the JOIN command request packet (hereinafter referred to as “request packet (JOIN)”), the node ID, function type, and node address of the node device participating in the overlay network are stored as unique data. Further, the node ID is generated by a predetermined hash function. For example, the hash value of the node address (combination of the IP address and port number of the node device) is calculated using the hash function of SHA-1, and the calculated hash value is used as the node ID.
When the JOIN command is successful, the management node table 41 stored in the node device that has received the request packet (JOIN) has a response type “OK” response packet (hereinafter referred to as “response packet (OK)”) to the JOIN command. The data is stored in the unique data and sent back to the source node device of the request packet (JOIN).
[2.3.2 PINGコマンド]
PINGコマンドは、ノード装置の生存確認を行うために用いる。PINGコマンドの要求パケット(以下、「要求パケット(PING)」と記載する。)には、PINGコマンド送信元のノード装置のノードID、機能種別、ノードアドレスが固有データとして格納される。ノード装置が、相手先のノード装置へ要求パケット(PING)を送信し、その応答パケット(OK)を受信することによって、生存確認対象のノード装置の存在を確認する。また、要求パケット(PING)を受信したノード装置は、要求パケット(PING)の送信元のノード装置が自身の保持するノードテーブルに存在しない場合、ノードテーブルに送信元のノード装置のノードIDとノードアドレスを追加する。
[2.3.2 PING command]
The PING command is used to check the existence of the node device. In the PING command request packet (hereinafter referred to as “request packet (PING)”), the node ID, function type, and node address of the node device that is the source of the PING command are stored as unique data. The node device transmits the request packet (PING) to the destination node device and receives the response packet (OK), thereby confirming the existence of the node device subject to the existence confirmation. In addition, when the node device that has transmitted the request packet (PING) does not exist in the node table held by the node device that has received the request packet (PING), the node ID and the node of the source node device are stored in the node table. Add an address.
[2.3.2 NOTIFYコマンド]
NOTIFYコマンドは、ノード装置の参加、離脱をオーバーレイネットワーク上の全ノード装置に通知するために用いる。NOTIFYコマンドの要求パケット(以下、「要求パケット(NOTIFY)」と記載する。)には、参加または離脱したノード装置のノードID、機能種別及びノードアドレスと、動作種別、通知モードが格納される。通知モードは、OneHopにおける通知の段階を示すものであり、図21において説明した各ステップに相当する。すなわち、通知モード「1」は、通報元からスライス・リーダー(Slice Leader)への通知(図21のステップS1)を、通知モード「2」は、スライス・リーダーから他のスライス・リーダーへの通知(図21のステップS2)を、通知モード「3」は、スライス・リーダーからユニット・リーダー(Unit Leader)への通知(図21のステップS3)を表す。通知モード「4」は、ユニット・リーダーからその配下のノードへの通知を表す。
[2.3.2 NOTIFY command]
The NOTIFY command is used to notify all node devices on the overlay network that the node device has joined or left. The NOTIFY command request packet (hereinafter referred to as “request packet (NOTIFY)”) stores the node ID, function type and node address, operation type, and notification mode of the node device that has joined or withdrawn. The notification mode indicates a notification stage in OneHop and corresponds to each step described in FIG. That is, the notification mode “1” is a notification from the reporting source to the slice leader (Slice Leader) (step S1 in FIG. 21), and the notification mode “2” is a notification from the slice leader to another slice leader. (Step S2 in FIG. 21), the notification mode “3” represents notification from the slice leader to the unit leader (Step S3 in FIG. 21). The notification mode “4” represents notification from the unit leader to its subordinate nodes.
[2.4 ノードテーブル管理部10の動作]
続いて、ノードテーブル管理部10の各部の動作について説明する。
[2.4 Operations of Node Table Management Unit 10]
Next, the operation of each unit of the node
[2.4.1 通知処理部12の動作]
通知処理部12は、JOINコマンドおよびNOTIFYコマンドの送信および受信処理を行う。
[2.4.1 Operation of notification processing unit 12]
The
[2.4.1.1 JOINコマンド送信処理]
ノード装置が新規にオーバーレイネットワークに参加する場合、該ノード装置の通知処理部12は、すでにオーバーレイネットワークに参加している他のノード装置に要求パケット(JOIN)を送信する。参加通知先の他のノード装置のノードアドレスを取得する方法は任意であり、例えば、利用者が入力してもよく、通信ネットワーク1上に検索パケットを送信し、すでにオーバーレイネットワークに参加しているノード装置から検索パケットに対応した応答を受信することにより取得してもよい。通知処理部12は、送信した要求パケット(JOIN)の応答パケット(OK)を受信すると、受信した応答パケット(OK)の固有データに格納された管理用ノードテーブルをテーブル処理部14に出力し、ノードテーブルの更新を指示する。
[2.4.1.1 JOIN command transmission processing]
When a node device newly joins an overlay network, the
[2.4.1.2 JOINコマンド受信処理]
通知処理部12は、オーバーレイネットワークに新規に参加した他のノード装置から要求パケット(JOIN)を受信すると、受信した要求パケット(JOIN)の固有データをノード情報としてテーブル処理部14に出力し、ノードテーブルの更新を指示する。さらに、通知処理部12は、記憶部40から管理用ノードテーブル41を読み出すと、JOINコマンドの応答パケット(OK)の固有データにこの読み出した管理用ノードテーブル41を格納し、要求パケット(JOIN)の送信元ノード装置に返送する。さらに、通知処理部12は、動作種別に「参加(JOIN)」を、通知モードに「1(通報元からスライス・リーダーへの通知)」をセットした要求パケット(NOTIFY)を生成し、スライス・リーダーとなるノード装置へ送信する。
上記処理によって送信された要求パケット(NOTIFY)を受信したノード装置の通知処理部12は、受信したパケットの通知モードに応じて、さらにNOTIFYパケットを送信する。
[2.4.1.2 JOIN command reception processing]
When the
The
[2.4.1.3 NOTIFYコマンド受信処理]
図7は、通知処理部12におけるNOTIFYコマンドの受信処理の流れ図を示す。
通知処理部12は、他のノード装置から要求パケット(NOTIFY)を受信すると、受信した要求パケット(NOTIFY)の固有データをノード情報としてテーブル処理部14に出力し、ノードテーブルの更新を指示する(ステップS12−1)。このときのテーブル処理部14の動作の詳細は後述する。
[2.4.1.3 NOTIFY command reception processing]
FIG. 7 is a flowchart of the NOTIFY command reception process in the
When receiving the request packet (NOTIFY) from another node device, the
通知処理部12は、受信した要求パケット(NOTIFY)のモードが「1(通報元からスライス・リーダーへの通知)」であると判断した場合(ステップS12−2:YES)、当該要求パケット(NOTIFY)の固有データを読み出して通知モードを「2(スライス・リーダーから他のスライス・リーダーへの通知)」に書き換え、この書き換えた固有データを設定した要求パケット(NOTIFY)を全スライス・リーダーに送信する(ステップS12−3)。
When the
通知処理部12は、受信した要求パケット(NOTIFY)のモードが「2」であると判断した場合(ステップS12−2:NO,S12−4:YES)、当該要求パケット(NOTIFY)から固有データを読み出して通知モードを「3(スライス・リーダーからユニット・リーダーへの通知)」に書き換え、この書き換えた固有データを設定した要求パケット(NOTIFY)を自ノード装置が所属するユニット(領域)のユニット・リーダーに送信する(ステップS12−5)。
When the
通知処理部12は、受信した要求パケット(NOTIFY)のモードが「3」であると判断した場合(ステップS12−2:NO,S12−4:NO、ステップS12−6:YES)、当該要求パケット(NOTIFY)から固有データを読み出して通知モードを「4」に書き換え、この書き換えた固有データを設定した要求パケット(NOTIFY)を自ノード装置が所属するユニット(領域)内の全ノード装置に送信する(ステップS12−7)。
When the
[2.4.1.4 スライス・リーダー、ユニット・リーダーの決定方法]
通知処理部12は、管理用ノードテーブル41に登録されているノード装置によって構成されるオーバーレイネットワークをk個の領域に分割し、それぞれの分割領域内のノード装置の1台をスライス・リーダーとして選択する。通知処理部12は、このk個に分割された領域をさらにs個に分割し、その領域内のノード装置の1台をユニット・リーダーとする。各領域内でのスライス・リーダー、ユニット・リーダーの選択方法は任意であるが、例えば、各領域内においてノードIDが最小のノード装置をスライス・リーダー、ユニット・リーダーとして選択する方法などがある。例えば、k=256(28)、s=16(24)で分割する場合、ノードIDの上位8ビットをスライス番号、上位9ビット目から12ビット目までの4ビットをユニット番号として領域を分割することができるので、それぞれの領域における最小値のノードIDを持つノードをスライス・リーダー、ユニット・リーダーと決めるなどの方法がある。
[2.4.1.4 Determination method of slice leader and unit leader]
The
[2.4.2 安定化処理部13の動作]
安定化処理部13は、ノード装置の生存確認を行うことで、オーバーレイネットワークの構造を維持する。
[2.4.2 Operation of stabilization processing unit 13]
The
[2.4.2.1 PINGコマンドの送信処理]
安定化処理部13は、記憶部40に記憶されている管理用ノードテーブル41を参照し、管理用ノードテーブル41に登録されているノード装置に対し、順にPINGコマンドの要求パケット(PING)を定期的に送信する。
[2.4.2.1 PING command transmission processing]
The
具体的には、所定の時間毎に生存確認処理が起動されると、安定化処理部13は、管理用ノードテーブル41から登録されているノード装置のノードアドレスを順に読み出し、この読み出したノードアドレスを送信先アドレスとして要求パケット(PING)を送信する。送信した要求パケット(PING)に対する応答を受信した場合、安定化処理部13は、次の生存確認対象のノード装置へ要求パケット(PING)を送信する。
Specifically, when the survival confirmation process is started every predetermined time, the
一方、送信した要求パケット(PING)に対する応答がなかった場合、安定化処理部13は、要求パケット(PING)の送信先のノード装置が離脱したものとして、動作種別に「離脱(LEAVE)」を設定し、通知モードに「1(通知元からスライス・リーダー)」を設定した要求パケット(NOTIFY)をスライス・リーダーへ送信する。これによって、オーバーレイネットワークを構成する全ノード装置にノード装置の離脱を通知する。その後、次の生存確認対象のノード装置へ要求パケット(PING)を送信する。
On the other hand, when there is no response to the transmitted request packet (PING), the
[2.4.2.2 PINGコマンドの受信処理]
安定化処理部13は、他のノード装置から要求パケット(PING)を受信した場合、受信した要求パケット(PING)内の固有データに格納されている情報をノード情報としてテーブル処理部14に出力し、ノードテーブルの更新を指示する。その後、安定化処理部13は、要求パケット(PING)の送信元へ応答パケット(OK)を返送する。
[2.4.2.2 PING command reception processing]
When the
[2.4.3 テーブル処理部14の動作]
テーブル処理部14は、記憶部40に記憶された管理用ノードテーブル41と検索用ノードテーブル42の変更を行う。
本実施形態では、管理用ノードテーブルにはオーバーレイネットワークに参加している全ノード装置を登録し、検索用ノードテーブルにはストレージノード装置100のみを登録することを特徴としている。これを実現するため、テーブル処理部14は、通知処理部12あるいは安定化処理部13から動作種別が「参加(JOIN)」のノード情報を受信した場合、このノード情報に含まれている機能種別が「ストレージノード」である場合には、ノード情報に含まれているノードID及びノードアドレスの組みを管理用ノードテーブル41および検索用ノードテーブル42に書き込み、機能種別が「アクセスノード」、「容量負荷分散ノード」、「管理ノード」などの機能ノードである場合には、ノード情報に含まれているノードID及びノードアドレスの組みを管理用ノードテーブル41のみに書き込む。このとき、テーブル処理部14は、テーブル内でノードIDの値が小さい順となるように書き込みを行なう。
[2.4.3 Operation of table processing unit 14]
The
This embodiment is characterized in that all node devices participating in the overlay network are registered in the management node table, and only the
また、テーブル処理部14は、通知処理部12あるいは安定化処理部13から動作種別が「離脱(LEAVE)」のノード情報を受信した場合、このノード情報に設定されているノードID及びノードアドレスの組を、管理用ノードテーブル41および検索用ノードテーブル42から削除する。ただし、ノード情報に含まれている機能種別が機能ノードを示している場合、検索用ノードテーブル42に削除対象のノードID及びノードアドレスの組みは登録されていないため、実際には削除は行なわれない。
また、テーブル処理部14は、通知処理部12から管理用ノードテーブルを受信した場合、この受信した管理用ノードテーブルを記憶部40に書き込む。
Further, when the
When the
[2.5 本実施形態のノード装置の効果]
以上の動作により、オーバーレイネットワークに頻繁に機能ノード装置の参加、離脱が生じたとしても、検索用ノードテーブル42には変化がないため、ファイルIDの検索動作には影響が生じない。また、検索用ノードテーブル42は、管理用ノードテーブルを更新するための情報に基づいて生成可能であるため、ノード間の通信量は従来のOneHopと変わらない。
[2.5 Effects of the node device of this embodiment]
With the above operation, even if the function node device frequently participates or leaves the overlay network, the search node table 42 does not change, and thus the file ID search operation is not affected. Further, since the search node table 42 can be generated based on information for updating the management node table, the communication amount between the nodes is the same as that of the conventional OneHop.
なお、本実施形態では、管理用ノードテーブル41のノードの並びはノードIDの小さい順で並べることで説明を行ったがこれに限定されるものではない。例えば、非特許文献3に記載されているように、ノードの物理的な位置の情報が含まれるローカルノードIDを使うことによって、物理的に離れたノード間のパケット量を減少させることが可能である。また、非特許文献3に記載されているように、ストレージノード装置の性能により、仮想ノードIDを生成して検索用ノードテーブル42に登録することで、処理負荷をストレージノード装置の性能に比例させることが可能である。
In the present embodiment, the description has been given by arranging the nodes in the management node table 41 in ascending order of the node IDs, but the present invention is not limited to this. For example, as described in
[3. 各ノード装置の固有機能]
次に、ストレージノード装置100、アクセスノード装置200、容量負荷分散ノード装置300、管理ノード装置400の固有機能の動作について説明する。各ノード装置の固有機能の動作は、図2に示す固有機能処理部20の動作によって決定される。
[3. Unique function of each node device]
Next, operations of the unique functions of the
[3.1 ストレージノード装置100の固有機能]
[3.1.1 固有機能処理部の構成]
図8は、ストレージノード装置100の固有機能処理部120の構成を示す図であり、図2に示す固有機能処理部20に相当する。同図に示すストレージノード装置100の固有機能処理部120は、低レベルインタフェース部101、キーテーブル操作部102、ファイル操作部103、ファイル情報登録部104、ステータス情報登録部105、テーブル検索部106、キーテーブル蓄積部107、及び、ファイル蓄積部108を備えて構成される。キーテーブル蓄積部107及びファイル蓄積部108は、ハードディスク装置や半導体メモリなどで実現される。
[3.1 Unique Function of Storage Node Device 100]
[3.1.1 Configuration of Unique Function Processing Unit]
FIG. 8 is a diagram showing a configuration of the unique
キーテーブル蓄積部107は、key(キー)とvalue(値)との対応付けを示すキーテーブルを記憶する。キーテーブルには、DHT(分散ハッシュテーブル、Distributed Hash Table)によるP2P(Peer-to-Peer)が構成するKey-Value型データベースのうち、自ストレージノード装置100が管理する範囲のKey-Value値を記憶する。本実施形態の分散ファイルシステムでは、P2PによるKey-Value型データベースをファイルIDの管理に用いるため、キーテーブルには、keyとしてファイルを特定するファイルIDが設定され、valueとしてファイルを保存しているストレージノード装置100のノードアドレスが設定される。また、キーテーブルには、各ノード装置の各種ステータス情報もまた設定される。この場合、keyとしてストレージノード装置100及びステータス情報の種類を特定するステータスIDが設定され、valueとしてテータス情報が設定される。ステータス情報は、例えば、ファイル蓄積装置108の最大蓄積容量であるディスク容量、ファイル蓄積装置108の使用ディスク容量、ストレージノード装置100のCPU負荷、ファイル蓄積部108に記憶されているファイル数など、ストレージノード装置100に関する様々な情報である。
ファイル蓄積部108は、分散ファイルシステムにおいて操作対象となるファイルを記憶する。
The key
The
低レベルインタフェース部101は、ネットワークインタフェース部30を介して、自ストレージノード装置100のキーテーブル蓄積部107に記憶されているキーテーブル、および、自ストレージノード装置100のファイル蓄積部108に記録されているファイルを操作するためのインタフェースを提供する。キーテーブル操作部102は、低レベルインタフェース部101が提供するキーテーブル操作用のインタフェースに対応した処理を実行し、キーテーブル蓄積部107に記憶されているキーテーブルに対するキーの登録や検索を行う。ファイル操作部103は、低レベルインタフェース部101が提供するファイル操作用のインタフェースに対応した処理を実行し、ファイル蓄積部108内に記録されたファイルの読み出し、書き込み、削除や、ファイルのリストの取得を行なう。
The low
ファイル情報登録部104は、ファイル蓄積部108内に記憶されているファイルのファイルIDと、自ストレージノード装置100のノードアドレスを、このファイルIDを管理するストレージノード装置100が保持しているキーテーブルに登録する。ステータス情報登録部105は、自ストレージノード装置100のステータス情報を定期的に、このステータス情報を管理するストレージノード装置100が保持しているキーテーブルに登録する。テーブル検索部106は、記憶部40に保存されている検索用ノードテーブル42を参照して、指定されたIDに時計回りに近いノードIDを特定し、その特定したノードIDに対応付けられているノードアドレスを読み出して出力する。
The file
図9は、キーテーブル蓄積部107に記憶されるキーテーブルを示す図である。同図に示すように、キーテーブルは、キー(key)と、値(value)とを対応付けたレコードからなる。ここで、キーは、ファイルを一意に特定するファイルID、または、ステータス情報名とノード装置の組み合わせを特定するステータスIDである。
ファイルIDは、例えば、所定のハッシュ関数を用いてファイル名から生成したハッシュ値を用いることができる。キー(key)がファイルIDの場合、当該ファイルIDにより特定されるファイルを記憶しているストレージノード装置100のノードアドレスが対応する値(value)として設定される。
一方、ステータスIDは、例えば、所定のハッシュ関数を用いて、ステータス情報名とノードアドレスとを結合したデータから生成したハッシュ値を用いることができる。ステータス情報名は、例えば、ディスク容量、使用ディスク容量、CPU負荷などのステータス情報の種類を表す名前である。キー(key)がステータスIDの場合、ステータスIDにより特定されるノード装置及びステータス情報の種類に対応したステータス情報が値(value)として設定される。
FIG. 9 is a diagram illustrating a key table stored in the key
As the file ID, for example, a hash value generated from a file name using a predetermined hash function can be used. When the key is a file ID, the node address of the
On the other hand, for the status ID, for example, a hash value generated from data obtained by combining the status information name and the node address using a predetermined hash function can be used. The status information name is a name indicating the type of status information such as disk capacity, used disk capacity, CPU load, and the like. When the key is a status ID, status information corresponding to the type of the node device and status information specified by the status ID is set as a value.
図10は、低レベルインタフェース部101が提供するインタフェースを示す。同図に示すように、低レベルインタフェース部101は、キーテーブル操作用としてgetおよびput、ファイル操作用としてlow_read、low_write、low_delete、ファイルリスト取得用としてget_listの各インタフェースを提供する。引数のinおよびoutはデータの通信方向を示しており、inはインタフェースの呼び出し側が設定する値、outは呼び出し側へ返答される値を示している。
FIG. 10 shows an interface provided by the low-
getは、キーテーブル蓄積部107に記憶されているキーテーブルから引数keyに対応した値(value)を読み出し、呼び出し元に引数valueとして出力するインタフェースである。
putは、キーテーブル蓄積部107に記憶されているキーテーブルに、引数key及び引数valueの組を書き込むインタフェースである。
get is an interface that reads a value (value) corresponding to the argument key from the key table stored in the key
put is an interface for writing a set of an argument key and an argument value to the key table stored in the key
low_readは、ファイル蓄積部108に記憶されているファイルからデータを読み出すインタフェースである。引数fnameは、データ読み出し対象ファイルのファイル名を示す。引数offsetは、データの読み出しを行なう先頭位置を示し、ファイルの先頭からのバイト数が設定される。引数sizeは、読み出すデータのバイトサイズを示す。また、引数dataは、読み出されたデータを示す。
low_writeは、ファイル蓄積部108に記憶されているファイルへデータを書き込むインタフェースである。引数fnameは、データ書き込み対象ファイルのファイル名を示す。引数offsetは、データの書き込みを行なう先頭位置を示し、ファイルの先頭からのバイト数が設定される。引数sizeは、書き込むデータのバイトサイズを示し、引数dataは、ファイルに書き込むデータを示す。
low_read is an interface that reads data from a file stored in the
low_write is an interface for writing data to a file stored in the
low_deleteは、ファイル蓄積部108に記憶されているファイルを削除するインタフェースである。引数fnameは、削除対象ファイルのファイル名を示す。
get_listは、ファイル蓄積部108に記憶されているファイルのリストを提供するインタフェースである。引数flistは、ファイル蓄積部108に記憶されているファイルのファイル名とサイズとを関連付けたリストを示す。
low_delete is an interface for deleting a file stored in the
get_list is an interface that provides a list of files stored in the
[3.1.2 キーテーブル操作部102の動作]
キーテーブル操作部102は、低レベルインタフェース部101のgetおよびputインタフェースに対する処理を行う。キーテーブル操作部102は、低レベルインタフェース部101のputインタフェースが呼び出された場合、引数key及び引数valueとして指定された(key, value)値の組をキーテーブル蓄積部107に記憶されているキーテーブルに登録する。一方、低レベルインタフェース部101のgetインタフェースが呼び出された場合、キーテーブル操作部102は、引数keyに対する値(value)をキーテーブル蓄積部107に記憶されているキーテーブルから検索して読み出し、getインタフェースの呼び出し元のノード装置に返送する。
[3.1.2 Operation of Key Table Operation Unit 102]
The key
[3.1.3 ファイル操作部103の動作]
ファイル操作部103は、低レベルインタフェース部101のlow_read、low_write、low_delete、get_listの各インタフェースに対する処理を行う。ファイル操作部103は、低レベルインタフェース部101のlow_writeインタフェースが呼び出された場合、ファイル蓄積部108に記憶されている引数fnameのファイル名のファイルに、ファイルの先頭から引数offsetで示されるバイト数だけ進んだ位置を開始位置として、引数sizeで示されるバイト数のデータを書き込む。指定されたファイルが存在しない場合は、新たにファイルを作成し、データを書き込む。
[3.1.3 Operation of file operation unit 103]
The
一方、低レベルインタフェース部101のlow_readインタフェースが呼び出された場合、ファイル操作部103は、ファイル蓄積部108に記憶されている引数fnameがファイル名のファイルの先頭から、引数offsetで示されるバイト数だけすすんだ位置を開始位置として、引数sizeで示されるバイトのデータを読み出して引数dataに設定し、low_readインタフェースの呼び出し元のノード装置に返送する。
On the other hand, when the low_read interface of the low-
また、低レベルインタフェース部101のlow_deleteインタフェースが呼び出された場合、ファイル操作部103は、引数fnameがファイル名であるファイルをファイル蓄積部108から削除する。
また、低レベルインタフェース部101のget_listインタフェースが呼び出された場合、ファイル操作部103は、ファイル蓄積部108に記憶されている全ファイルのファイル名とサイズを読み出し、読み出したファイル名とサイズのリストを呼び出し元のノード装置に返送する。
When the low_delete interface of the low-
When the get_list interface of the low-
[3.1.4 ファイル情報登録部104の動作]
ファイル情報登録部104は、ファイル蓄積部108内に記憶されているファイルのファイルIDをキー(key)とし、自ストレージノード装置100のノードアドレスを値(value)とした(key, value)値の組を、P2Pが構成するKey-Value型データベースへ登録する。
[3.1.4 Operation of file information registration unit 104]
The file
図11は、ファイル情報登録部の104の動作の流れ図を示す。同図に示す流れ図は、ファイル蓄積部108に蓄積された1つのファイルに対する登録動作であり、ファイル情報登録部104は、ファイル蓄積部108に蓄積されたファイル数だけ繰り返しこの動作を行う。なお、ファイル情報登録部104は、定期的に、あるいは、ファイル蓄積部108に新たなファイルが書き込まれたときに起動される。
FIG. 11 shows a flowchart of the operation of the file
まず、ファイル情報登録部104は、ファイル蓄積部108に記憶されているファイルのファイル名からファイルIDを生成する(ステップS104−1)。ファイルIDの生成方法には、例えばファイル名からSHA−1ハッシュ関数により生成する方法がある。次に、生成したファイルIDから、そのファイルIDを登録すべきノード装置を検索する(ステップS104−2)。検索は、テーブル検索部106が行う。テーブル検索部106は、記憶部40に保存されている検索用ノードテーブル42から、指定されたファイルIDに時計回りに近いノードIDを検索し、そのノードアドレスを返す。次に、ファイル情報登録部104は、テーブル検索部106から検索結果として出力されたノードアドレスにより特定される登録先のノード装置に対してputインタフェースの実行を要求する(ステップS104−3)。putインタフェースの引数keyには生成したファイルIDが設定され、引数valueには自ストレージノード装置100のノードアドレスが設定される。これにより、(ファイルID,ノードアドレス)の組を、生成したファイルIDの管理ノードであるストレージノード装置100に登録する。
First, the file
[3.1.5 ステータス情報登録部105の動作]
ステータス情報登録部105は、ストレージノード装置100のステータス情報を定期的にP2PによるKey-Value型データベースに登録する。ステータス情報登録部105が、あらかじめ決められたキーを使ってこれらの情報を登録しておくことで、他のノード装置からストレージノード装置100の様々なステータス情報を取得できるようにする。
[3.1.5 Operation of Status Information Registration Unit 105]
The status
図12は、ステータス情報登録部105の動作の流れ図を示す。
ステータス情報登録部105が起動される際に、ステータス情報の種類を示すステータス情報名が、ステータス情報と共に入力される。ディスク容量、ディスクの使用容量、CPU負荷などのステータス情報は、例えば、ノード装置を実装するストレージノード装置100が有するリソース管理機能部によって取得することができる。ステータス情報登録部105は、はじめにキーを生成する(S105−1)。ステータスIDは、ステータス情報の種別を表す予め決められたステータス情報名と、自ストレージノード装置100のノードアドレスとの組み合わせから、SHA−1等のハッシュ関数により生成したハッシュ値とする。例えば、ディスク容量であれば、「DISKCAPA_ノードアドレス」、CPUの負荷であれば「CPU_ノードアドレス」などをハッシュ関数の入力とし、ハッシュ値を算出する。
FIG. 12 shows a flowchart of the operation of the status
When the status
ステータス情報登録部105は、ハッシュ関数により作られたステータスIDを使ってステータス情報をP2PのKey-Value型データベースに登録するため、テーブル検索部106により当該ステータスIDを管理するノード装置を検索する(ステップS105−2)。すなわち、テーブル検索部106は、記憶部40に保存されている検索用ノードテーブル42から、指定されたステータスIDに時計回りに近いノードIDを検索し、そのノードアドレスを返す。ステータス情報登録部105は、テーブル検索部106から検索結果として出力されたノードアドレスの登録先ストレージノード装置100に対してputインタフェースの実行を要求し、ステータス情報を登録する(ステップS105−3)。putインタフェースの引数keyには生成したステータスIDが設定され、引数valueにはステータス情報が設定される。
Since the status
[3.1.6 ストレージノード装置100の効果]
以上説明したように、固有機能処理部120を有するストレージノード装置100により、DHTを使ったP2Pによる分散ファイルシステムを構築することができる。
[3.1.6 Effects of Storage Node Device 100]
As described above, a P2P distributed file system using DHT can be constructed by the
[3.2 アクセスノード装置200の固有機能]
[3.2.1 固有機能処理部の構成]
図13は、アクセスノード装置200の固有機能処理部220の構成を示す図であり、図2に示す固有機能処理部20に相当する。
アクセスノード装置200の固有機能処理部220は、高レベルインタフェース部201、ファイル処理部202、テーブル検索部203を備えて構成される。
[3.2 Unique Function of Access Node Device 200]
[3.2.1 Configuration of Unique Function Processing Unit]
FIG. 13 is a diagram illustrating a configuration of the unique
The unique
高レベルインタフェース部201は、分散ファイルシステム内のストレージノード装置100に保管されているファイルを操作するためのインタフェースを提供する。クライアント装置2は、通信ネットワーク1を介してこのインタフェースを使用することで、分散ファイルシステム内のファイルを操作することができる。ファイル処理部202は、高レベルインタフェース部201が受信したインタフェースに従って、操作対象ファイルの操作を行なう。テーブル検索部203は、ストレージノード装置100のテーブル検索部106と同様の機能を有し、記憶部40に保存されている検索用ノードテーブル42を参照して、指定されたファイルIDに時計回りに近いノードIDを特定し、その特定したノードIDに対応付けられているノードアドレスを読み出して出力する。
The high-
図14は、高レベルインタフェース部201が提供するインタフェースを示す。同図に示すように、高レベルインタフェース部201は、hi_read、及び、hi_writeインタフェースを提供する。
hi_readは、指定されたファイル名のファイルからデータを読み出すインタフェースである。引数fnameは、データ読み出し対象ファイルのファイル名を示す。引数offsetは、データを読み出す先頭位置を示し、ファイルの先頭からのバイト数が設定される。引数sizeは、読み出すデータのバイトサイズを示す。また、引数dataは、読み出されたデータを示す。
hi_writeは、指定されたファイル名のファイルへデータを書き込むインタフェースである。引数fnameは、データ書き込み対象ファイルのファイル名を示す。引数offsetは、データを書き込む先頭位置を示し、ファイルの先頭からのバイト数が設定される。引数sizeは、書き込むデータのバイトサイズを示し、引数dataは、ファイルに書き込むデータを示す。
FIG. 14 shows an interface provided by the high-
hi_read is an interface for reading data from a file having a specified file name. The argument fname indicates the file name of the data read target file. The argument offset indicates the head position from which data is read, and the number of bytes from the head of the file is set. The argument size indicates the byte size of the data to be read. The argument data indicates the read data.
hi_write is an interface for writing data to a file having a specified file name. The argument fname indicates the file name of the data write target file. The argument offset indicates the start position for writing data, and the number of bytes from the start of the file is set. The argument size indicates the byte size of data to be written, and the argument data indicates data to be written to the file.
[3.2.2 固有機能処理部220の動作]
アクセスノード装置200において、クライアント装置2から高レベルインタフェース部201のhi_readインタフェースまたはhi_writeインタフェースの実行が要求されると、ファイル処理部202は、高レベルインタフェース部201に要求されたインタフェースについての実際の処理を行う。
[3.2.2 Operation of Unique Function Processing Unit 220]
In the
クライアント装置2によって高レベルインタフェース部201のhi_readインタフェースが呼び出された場合、ファイル処理部202は、引数fnameとして指定されたファイル名fnameから、ファイルIDを生成する。ファイルIDの生成には、例えば、SHA−1などのあらかじめ決められたハッシュ関数を用いる。次に、ファイル処理部202は、テーブル検索部203にファイルIDを出力し、ノードアドレスを要求する。テーブル検索部203は、受信したファイルIDをテーブル検索部203に出力し、当該ファイルIDを管理するストレージノード装置100のノードアドレスを検索する。テーブル検索部203は、受信したファイルIDによって記憶部40に記憶されている検索用ノードテーブル42を検索してノードアドレスを取得すると、ファイル処理部202に出力する。
When the hi_read interface of the high-
ファイル処理部202は、テーブル検索部203が検索の結果取得したノードアドレスを用いて、ファイルIDを管理しているストレージノード装置100の低レベルインタフェース部101にgetインタフェースの実行を要求する。getインタフェースの引数keyには、ファイルIDが設定される。getインタフェースの実行が要求されたストレージノード装置100は、キーテーブル蓄積部107に記憶されているキーテーブルから引数keyに対応した値を読み出し、引数valueとして返送する。この引数valueは、ファイルIDにより特定されるファイルを記憶しているストレージノード装置100のノードアドレスを示す。
The
ファイル処理部202は、getインタフェースの引数valueにより示されるノードアドレスを用いて、操作対象のファイルを記憶しているストレージノード装置100の低レベルインタフェース部101に、low_readインタフェースの実行を要求し、ファイルの読み出し処理を行う。low_readインタフェースの引数fname, offset, sizeには、hi_readインタフェースの引数fname, offset, sizeが設定される。low_readインタフェースの実行を受信したストレージノード装置100は、実行結果の引数dataを返送する。アクセスノード装置200のファイル処理部202は、ストレージノード装置100から返送された引数dataをhi_readインタフェースの実行要求元のクライアント装置2へ出力する。
Using the node address indicated by the argument value of the get interface, the
また、高レベルインタフェース部201のhi_writeインタフェースが呼び出された場合も、hi_readインタフェースが呼び出された場合と同様の処理を行ない、ファイルを記憶しているストレージノード装置100の低レベルインタフェース部101に対して、low_writeインタフェースの実行を指示し、ファイルの書き込み処理を行う。low_writeインタフェースの引数fname, offset, size, dataには、hi_writeインタフェースの引数fname, offset, size, dataが設定される。low_writeインタフェースの実行が要求されたストレージノード装置100は、low_writeインタフェースを実行する。
Also, when the hi_write interface of the high
[3.2.3 アクセスノード装置200の効果]
以上説明した固有機能処理部220を有するアクセスノード装置200により、クライアント装置2から、本実施形態の分散ファイルシステムに保存されているファイルの操作が可能となる。アクセスノード装置200は、高レベルインタフェース部201を介して、複数のクライアント装置2に対して、分散ファイルシステムへのアクセスを提供することができる。
[3.2.3 Effects of access node apparatus 200]
The
本実施形態によるアクセスノード装置200を用いることにより、クライアント装置2が増加した場合、アクセスノード装置200を分散ファイルシステムに追加し、分散ファイルシステムへのアクセスの負荷を分散することが可能となる。また、クライアント装置2の数が減少した場合には、アクセスノード装置200を離脱させ、無駄なアクセスノードを削除することができる。本実施形態では、アクセスノード装置200の追加、離脱は、分散ファイルシステムのファイル管理を滞らせることがない。従って、アクセスノード装置200の参加及び離脱は、稼働中の分散ファイルシステムにおいてどのタイミングにおいて行っても問題ない。また、アクセスノード装置200とクライアント装置2を同一のコンピュータ上で稼動させることも可能であり、その場合には、他のクライアント装置2からのアクセスが無い、高速なファイル操作が可能となる。
By using the
なお、本実施形態では、アクセスノード装置200が提供する高レベルインタフェース部201はhi_read、hi_writeインタフェースのような基本的なインタフェースのみについて述べたが、ファイル処理部202に、金子他, “構造型P2Pを使った分散ファイルシステムにおける分散ディレクトリ管理手法”, L-033, FIT2009, 2009(参考文献1)にあるように、ディレクトリファイルによる分散管理方法を用いることで、本実施形態の分散ファイルシステムを、ディレクトリ構造をもったファイルシステムとして提供することも可能である。例えば、分散ファイルシステム内で一意なファイル名が付与されたiノードファイル、ディレクトリファイル、データファイルを分散してストレージノード装置100のファイル蓄積装置108に記憶しておく。ディレクトリファイルは、配下のディレクトリ名とディレクトリファイルのファイル名との対応関係、および、配下のユーザ利用ファイル名とデータファイルのファイル名との対応関係に関する管理情報を含む。iノードファイルは、ディレクトリファイルまたはデータファイルのファイル名を含む。データファイルは、ファイル本体である。アクセスノード装置200は、クライアント装置2からディレクトリ名及びユーザ利用ファイル名によるファイル操作要求を受信する。アクセスノード装置200は、ルートディレクトリに対応したiノードファイルから順に、iノードファイル、及び、ディレクトリファイルをストレージノード装置100より読み出して、ディレクトリ名及びユーザ利用ファイル名に対応したデータファイル名を取得すると、このデータファイル名のデータファイル本体を保持するストレージノード装置100に対して、クライアント装置2から要求されたファイル操作を要求する。なお、iノードファイル、ディレクトリファイルの読み出しや、データファイルのファイル操作は、iノードファイル、ディレクトリファイル、データファイルのファイル名から生成したファイルIDに基づいて、上述した実施形態と同様に行なう。
In the present embodiment, the high-
[3.3 容量負荷分散ノード装置300の固有機能]
[3.3.1 固有機能処理部の構成]
容量負荷分散ノード装置300は、分散ファイルシステム内のストレージノード装置100が備えるファイル蓄積部108の使用率を均等に近づける機能ノード装置である。
図15は、容量負荷分散ノード装置300の固有機能処理部320の構成を示す図であり、図2に示す固有機能処理部20に相当する。容量負荷分散ノード装置300の固有機能処理部320は、ステータス情報取得部301、容量均等化計算部302、ファイル移動部303、テーブル検索部304を備えて構成される。
[3.3 Unique Function of Capacity Load Balancing Node Device 300]
[3.3.1 Configuration of unique function processor]
The capacity load
FIG. 15 is a diagram illustrating a configuration of the unique
ステータス情報取得部301は、分散ファイルシステム内の各ストレージノード装置100のステータス情報を取得する。容量均等化計算部302は、ステータス情報取得部301が取得したステータス情報に基づいて、各ストレージノード装置100のファイル蓄積部108の使用率を均等にするために、ファイル移動を行なう対象のストレージノード装置100と、移動するファイル容量を決定する。ファイル移動部303は、容量均等化計算部302が決定したファイルの移動元及び移動先ストレージノード装置100と、移動するファイル容量に従って、ファイルの移動を指示する。テーブル検索部304は、記憶部40に保存されている検索用ノードテーブル42から、ストレージノード装置100のノードアドレスを順に読み出してステータス情報取得部301へ出力する。また、テーブル検索部304は、ストレージノード装置100のテーブル検索部106と同様の機能を有し、検索用ノードテーブル42を参照して、ステータス情報取得部301またはファイル移動部303から指定されたIDに時計回りに近いノードIDを特定し、その特定したノードIDに対応付けられているノードアドレスを読み出して出力する。
The status
[3.3.2 ステータス情報取得部301の動作]
図16は、ステータス情報取得部301の動作の流れ図を示す。容量負荷分散ノード装置300は、所定の時間に定期的に、あるいは、利用者に指示された時間に、使用率の均等化処理を起動する。これにより、図16の処理が起動される。
[3.3.2 Operation of status information acquisition unit 301]
FIG. 16 shows a flowchart of the operation of the status
同図において、ステータス情報取得部301は、nに初期値として0を設定すると、テーブル検索部304により、検索用ノードテーブル42にn番目に登録されているストレージノード装置100(以下、「ストレージノード装置(n)」と記載する。)のノードアドレスを取得する(ステップS301−1)。次に、ステータス情報取得部301は、ディスク容量及び使用ディスク容量のそれぞれについて、ステータス情報名と、テーブル検索部304が取得したノードアドレスとからステータスIDを生成する(ステップS301−2)。ステータスIDの生成方法は、ストレージノード装置100のステータス情報登録部105の動作において説明した方法と同一であり、例えば、ディスク容量の場合であれば、「DISKCAPA_ノードアドレス」のハッシュ値をハッシュ関数によって生成する。次に、生成したステータスIDをテーブル検索部304に出力し、当該ステータスIDを管理しているノード装置のノードアドレスを要求する。テーブル検索部304は、ステータスIDにより記憶部40に記憶されている検索用ノードテーブル42を検索してノードアドレスを取得し、ステータス情報取得部301は、テーブル検索部304から検索結果のノードアドレスを取得する(ステップS301−3)。
In the figure, when the status
ステータス情報取得部301は、ステップS301−3において取得したノードアドレスを用い、ストレージノード装置100の低レベルインタフェース部101に対して、getインタフェースの実行を要求し、ストレージノード装置(n)のディスク容量及び使用ディスク容量それぞれのステータス情報を取得する(ステップS301−4)。getインタフェースの引数keyには、ステップS301−2において生成したステータスIDが設定される。ストレージノード装置(n)が、検索用ノードテーブル42に登録されている最後のノード装置ではない場合(ステップS301−5:NO)、nに1を加算した後(ステップS301−6)、ステップS301−1からの動作を繰り返す。そして、ステップS301−5において、ストレージノード装置(n)が検索用ノードテーブル42の最後のノード装置であった場合(ステップS301−5:YES)、ステータス情報取得部301の動作を終了し、容量均等化計算部302の動作の実行を開始する(ステップS301−7)。
The status
[3.3.3 容量均等化計算部302の動作]
容量均等化計算部302は、ステータス情報取得部301が取得したストレージノードの最大蓄積容量と使用中の蓄積容量から、全ストレージノード装置100の使用率が一定となるように、ストレージノード装置100間におけるファイルの受け渡し容量を計算する。
[3.3.3 Operations of Capacity Equalization Calculation Unit 302]
The capacity
[3.3.3.1 容量均等化アルゴリズム]
まず、本実施形態による容量均等化の計算方法について説明する。
ノード数Nをストレージノード装置100の数(Nは1以上の整数)、ディスク容量Ciをストレージノード装置(i)のディスク容量、使用ディスク容量Miをストレージノード装置(i)の使用ディスク容量とすると(iは0以上(N−1)以下の整数)、全ストレージノード装置100におけるストレージの平均使用率ravgは下記の式(1)により算出される。
[3.3.3.1 Capacity equalization algorithm]
First, the capacity equalization calculation method according to the present embodiment will be described.
The number of nodes N is the number of storage node devices 100 (N is an integer of 1 or more), the disk capacity C i is the disk capacity of the storage node device (i), and the used disk capacity M i is the used disk capacity of the storage node device (i). Then (i is an integer of 0 or more and (N−1) or less), the average storage usage rate r avg in all the
M’ iを容量均等化後のストレージノード装置(i)の使用ディスク容量とすると、以下の式(2)が成り立つ。 When M ′ i is the used disk capacity of the storage node device (i) after capacity equalization, the following expression (2) is established.
ストレージノード装置(i)の現在のディスクの使用容量Miから、ストレージノード装置(i)の容量均等化後のディスクの使用容量M’ iへの変換行列をAとすると、以下の式(3)が成り立つ。 Assuming that the conversion matrix from the current disk usage capacity M i of the storage node device (i) to the disk usage capacity M ′ i after capacity equalization of the storage node device (i) is A, the following equation (3) ) Holds.
変換行列Aの成分aij(i、jは0以上(N−1)以下の整数)は、現在のストレージノード装置(j)の使用ディスク容量に対する、該ストレージノード装置(j)からストレージノード装置(i)に移動するディスク容量の割合を示す。したがって、容量均等化とは、下記の式(4)が示す条件の下で変換行列Aを求めることである。 The component a ij (i, j is an integer not smaller than 0 and not larger than (N−1)) of the transformation matrix A is calculated from the storage node device (j) to the storage node device with respect to the currently used disk capacity of the storage node device (j). (I) shows the ratio of the disk capacity to be moved. Therefore, capacity equalization is to obtain the transformation matrix A under the condition indicated by the following equation (4).
これは、i列の成分は、ストレージノード装置(i)の使用ディスク容量をどのように分配するかの割合を示しており、分配する割合を合計した列成分の和は1となるためである。 This is because the i column component indicates the proportion of how the used disk capacity of the storage node device (i) is distributed, and the sum of the column components obtained by adding up the distribution proportions is 1. .
変換行列Aは1つに定まらないため、本実施形態では、下記の(手順1)〜(手順3)により変換行列Aを求める。 Since the transformation matrix A is not fixed to one, in this embodiment, the transformation matrix A is obtained by the following (procedure 1) to (procedure 3).
(手順1)対角成分の決定:
変換行列Aの対角成分aii、および、関連する他の成分を、下記にしたがって決定する。
(Procedure 1) Determination of diagonal component:
The diagonal component a ii of the transformation matrix A and other related components are determined according to:
(a)は、現在の使用ディスク容量が、目標の使用容量以上の場合であり、他のストレージノード装置100からファイルを受け取る必要がないためである。また、(b)は、現在の使用ディスク容量が、目標の使用容量より少ない場合であり、他のストレージノード装置100へファイルを移動させる必要がなく、また、列成分の和が1となるためである。
(A) is a case where the current used disk capacity is equal to or greater than the target used capacity, and it is not necessary to receive a file from another
ここで、下記の表1に示す状態の5台のストレージノード装置(0)〜(4)を例にして説明を行う。 Here, description will be given by taking five storage node devices (0) to (4) in the state shown in Table 1 below as an example.
式(5)に示すように、この例での平均使用率ravgは以下である。 As shown in Formula (5), the average usage rate r avg in this example is as follows.
このとから、M’=AMとして下記の式(6)が求められる。つまり、(手順1)においてノードの番号i=0、1、3のストレージノード装置(i)については(a)が適用され、ノードの番号i=2、4のストレージノード装置(i)については(b)が適用される。なお、「−」は未設定成分である。 From this, the following equation (6) is obtained as M ′ = AM. That is, in (procedure 1), (a) is applied to the storage node device (i) of the node number i = 0, 1, 3 and the storage node device (i) of the node number i = 2, 4 is applied. (B) applies. "-" Is an unset component.
(手順2)未設定成分の決定:
処理の対象とする未設定成分をaIJとする。このとき、ファイル移動後のストレージノード100(I)の容量は以下の(7)のように表すことができる。
(Procedure 2) Determination of unset components:
An unset component to be processed is defined as a IJ . At this time, the capacity of the storage node 100 (I) after moving the file can be expressed as (7) below.
そして、(7)に示すファイル移動後のストレージノード装置(I)の容量が最大となるように、下記の条件下で成分aIJを算出する。 Then, the component a IJ is calculated under the following conditions so that the capacity of the storage node device (I) after the file movement shown in (7) is maximized.
条件1は、ストレージノード装置(J)から移動するディスク容量の割合の合計が1以下となることを示している。また、条件2は、ファイル移動後のストレージノード装置(I)の使用ディスク容量が、容量均等化後の使用ディスク容量M’ I以下となることを示している。
さらに、上記による成分aIJの決定により、以下の条件を満たした場合に他の成分も決定する。
Furthermore, by determining the component a IJ as described above, other components are also determined when the following conditions are satisfied.
以上を全未設定成分について順に求めていく。 The above is obtained sequentially for all unset components.
前記の式(6)の例を用いて未設定成分を計算すると、下記のようになる。
まず、処理対象を第0列の未設定成分a20とする。条件1及び条件2から、成分a20=0.511が算出され、(c)により成分a40=0となる。従って、式(6)は、以下の式(8)となる。
When an unset component is calculated using the example of the above equation (6), the result is as follows.
First, the processing target is an unset component a 20 in the 0th column. From
次に、処理対象を第1列の未設定成分a21とする。条件1及び条件2から、成分a21=0.45が算出され、(c)により成分a41=0となる。従って、式(8)は、以下の式(9)となる。
Next, the processing target is an unset component a 21 in the first column. From
次に、処理対象を第3列の未設定成分a23とする。条件1及び条件2から、成分a23=0.095が算出され、以下の式(10)となる。
Next, the processing target is an unset component a 23 in the third column. From
次に、処理対象を第3列の未設定成分a43とする。条件1及び条件2から、成分a43=0.355が算出され、以下の式(11)となる。
Next, the processing target is an unset component a 43 in the third column. From
(手順3)移動元、移動先及び移動容量の決定:
以上の(手順2)により求められた変換行列Aの対角成分以外で、かつ、0以外の成分がディスク容量の移動を表す部分である。すなわち、成分aijに対し、移動元のノード装置がストレージノード装置(j)、移動先のノード装置がストレージノード装置(i)、移動容量がaij×Mjである。
前記の例の場合、表2のようにストレージノード装置100間の移動量を求めることができる。
(Procedure 3) Determination of movement source, movement destination and movement capacity:
A component other than the diagonal component of the transformation matrix A obtained by the above (procedure 2) and a component other than 0 is a portion representing the movement of the disk capacity. That is, for the component a ij , the source node device is the storage node device (j), the destination node device is the storage node device (i), and the migration capacity is a ij × M j .
In the case of the above example, the movement amount between the
[3.3.3.2 処理フロー]
図17及び図18は、容量均等化計算部302の流れ図を示す。
図17において、まず、容量均等化計算部302は、N行N列の変換行列Aの全成分aij(i、jは0以上(N−1)以下の整数)を初期化すると(ステップS302−1)、ステータス情報取得部301が取得したN個の全ストレージノード装置(i)のディスク容量Ci及び使用ディスク容量Miを用い、式(2)により全ストレージノード装置100の平均使用率ravgを算出する(ステップS302−2)。続いて、容量均等化計算部302は、ステップS302−2において算出した平均使用率ravgとストレージノード装置100(i)の使用ディスク容量Miとを用い、式(3)により全てのストレージノード装置(i)について、容量均等化後のストレージノード装置(i)の使用ディスク容量M’ iを算出する(ステップS302−3)。
[3.3.3.2 Processing flow]
17 and 18 show a flowchart of the capacity
In FIG. 17, first, the capacity
続いて、容量均等化計算部302は、iに0を代入して初期化すると(ステップS302−4)、ストレージノード装置(i)の現在の使用ディスク容量Miは容量均等化後の使用ディスク容量M' i以上であるかを判断する(ステップS302−5)。ステップS302−5においてYESと判断した場合、容量均等化アルゴリズムの(手順1)の(a)の処理を行なう。すなわち、容量均等化計算部302は、対角成分aiiに(M' i/Mi)を設定し(ステップS302−6)、他の全てのストレージノード装置(j)からストレージノード装置(i)への移動に対応した成分aijに0を設定する(ステップS302−7)。一方、ステップS302−5においてNOと判断した場合、容量均等化計算部302は、対角成分aiiに1を設定し(ステップS302−8)、ストレージノード装置(i)から他の全てのストレージノード装置(j)への移動に対応した成分ajiに0を設定する(ステップS302−9)。
Subsequently, when the capacity
ステップS302−7またはステップS302−9の処理の後、容量均等化計算部302は、現在のiの値に1を加算すると(ステップS302−10)、iが(N−1)よりも大きいかを判断する(ステップS302−11)。ステップS302−11でNOと判断した場合、容量均等化計算部302は、ステップS302−5からの処理を繰り返し、ステップS302−11でYESと判断した場合、図18の処理を行なう。
After the process of step S302-7 or step S302-9, the capacity
図18において、容量均等化計算部302は、容量均等化アルゴリズムの(手順2)の処理を行なう。すなわち、容量均等化計算部302は、現在値が設定されていない成分aIJを選択する(ステップS302−12)。現在値が設定されていない成分の中から任意に成分aIJを選択することができるが、ここでは、I、Jが最も小さい成分を選択する。
In FIG. 18, the capacity
容量均等化計算部302は、容量均等化アルゴリズムの(手順2)における(条件1)及び(条件2)を満たすように、成分aIJの値を算出すると(ステップS302−13)、容量均等化アルゴリズムの(手順2)の(c)または(d)の条件を満たすかを判断する。
When the capacity
容量均等化計算部302は、ストレージノード装置(J)から移動するディスク容量の割合の合計が1であり、(c)の条件を満たすと判断した場合(ステップS302−14:YES)、まだ値が設定されていない成分akJに0を設定する(ステップS302−15)。また、容量均等化計算部302は、ステップS302−14でNOと判断した場合、ファイル移動後のストレージノード装置(I)の使用ディスク容量が、容量均等化後の使用ディスク容量M' iに等しいかを判断する(ステップS302−16)。容量均等化計算部302は、ステップS302−16がYESであり、(d)の条件を満たすと判断した場合、まだ値が設定されていない成分aIkに0を設定する(ステップS302−17)。
When the capacity
ステップS302−15、ステップS302−17の処理の後、あるいは、ステップS302−16においてNOと判断した場合、容量均等化計算部302は、値が設定されていない成分があるか否かを判断する(ステップS302−18)。値が設定されていない成分があると判断した場合(ステップS302−18:YES)、ステップS302−12からの処理を繰り返す。
After the processing of step S302-15 and step S302-17, or when NO is determined in step S302-16, the capacity
値が設定されていない成分がないと判断した場合(ステップS302−18:NO)、容量均等化計算部302は、容量均等化アルゴリズムの(手順3)を実行する。すなわち、容量均等化計算部302は、0以外の成分aij(i≠j、かつ、i及びjは0以上(N−1)以下の整数)を用いて、ストレージノード装置(i)からストレージノード装置(j)への移動容量aij×Mjを算出し(ステップS302−19)、ファイル移動部303にファイルの移動を指示する(ステップS302−20)。
When it is determined that there is no component for which no value is set (step S302-18: NO), the capacity
[3.3.3 ファイル移動部303の動作]
ファイル移動部303は、容量均等化計算部302により得られたストレージノード装置100間のファイルの移動処理を行う。しかし、容量均等化計算部302において得られたストレージノード装置100間のファイルの移動処理を全て行なうと、通信ネットワーク1に負荷がかかるだけでなく、多くのストレージノード装置100についても負荷が増大してしまう。また、移動の間はファイルへのアクセスが制限される場合もある。そこで、ファイル移動処理は、例えば、移動容量が所定以上である、ファイル移動元のストレージノード装置100のディスク使用率が所定以上であるなど、所定の条件に合致するストレージノード装置100間の移動のみを対象とする。以下では、最も移動容量が多いストレージノード装置100間のファイル移動のみを行うものとして説明する。また、ファイル移動をトラヒックが少ない時間に行うことによって、通信ネットワーク1への負荷を抑える。
[3.3.3 Operation of file moving unit 303]
The
まず、ファイル移動部303は、容量均等化計算部302が算出した移動容量に基づいて、最も移動容量が多い、ストレージノード装置(i)からストレージノード装置(j)へのファイル移動を行うと判断する。
ファイル移動部303は、テーブル検索部304にストレージノード装置(i)のノードIDを出力してノードアドレスを要求し、テーブル検索部304は、記憶部40に記憶されている検索用ノードテーブル42から、ノードIDに対応したノードアドレスを読み出す。ファイル移動部303は、テーブル検索部304が読み出したノードアドレスをあて先として、get_listの実行を要求する。
First, the
The
ストレージノード装置100は、ファイル蓄積部108に記憶されているファイルのファイル名とサイズのリストを読み出し、引数listに設定して容量負荷分散ノード装置300へ返送する。容量負荷分散ノード装置300のファイル移動部303は、ストレージノード装置100から取得したリストに基づいて、サイズの合計が移動容量に近くなるように移動対象のファイルを選択する。例えば、サイズの大きいファイルから順に選択していき、選択したファイルのサイズ移動容量を最初に超えたとき、あるいは、超える直前までに選択したファイルを移動対象として決定したり、ファイルの全ての組み合わせを生成し、合計のファイルサイズが最も移動容量が近いファイルの組み合わせを選択し、移動対象として決定したりすることができる。
The
ファイル移動部303は、移動対象として決定したファイルを読み出すため、ストレージノード装置(i)に移動対象の各ファイルのlow_readの実行を出力する。low_readの引数fnameには、移動対象のファイルのファイル名を、引数offsetに0を、引数sizeに移動対象のファイルのサイズが設定される。ストレージノード装置(i)は、ファイル蓄積部108から指定されたファイル名のファイル本体を読み出し、引数dataに設定して容量負荷分散ノード装置300へ返送する。
The
ファイル移動部303は、移動対象のファイルをストレージノード装置(i)から読み出すと、読み出した各ファイルを移動先に書き込むため、ストレージノード装置(j)に移動対象の各ファイルのlow_writeの実行を出力する。low_readの引数fnameには、移動対象のファイルのファイル名が、引数offsetには0が、引数sizeには移動対象のファイルのサイズが、引数dataにはファイル本体が設定される。ストレージノード装置(j)は、ファイル蓄積部108へ移動対象のファイルを書き込む。ストレージノード装置(j)は、ファイルを書き込むと図11に示す処理を行なう。
When the
続いてファイル移動部303は、ストレージノード装置(i)に記憶されている各移動対象のファイルのlow_deleteの実行を出力する。low_deleteの引数fnameには、移動対象のファイルのファイル名が設定される。ストレージノード装置(i)は、ファイル蓄積部108から引数fnameによって指定されたファイル名のファイルを削除する。
Subsequently, the
[3.3.4 容量負荷分散ノード装置300の効果]
以上、説明したように、容量負荷分散ノード装置300により、本実施形態による分散ファイルシステム内のストレージノード装置の使用容量を均等化する機能を追加することができる。そして、1日1回など定期的に、移動容量が多いストレージノード装置100間についてのみファイル移動を行なうことによって、分散ファイルシステム全体に負荷をかけないよう、ゆるやかに使用容量を均等に近づけることができる。
また、容量負荷分散ノード装置300の分散ファイルシステムの追加や削除は、分散ファイルシステムの検索処理を滞らせることがないため、分散ファイルシステムの稼働中のどのタイミングでも容量負荷分散機能の追加、削除が行え、容量負荷分散ノード装置300の数も限定されない。
[3.3.4 Effect of Capacity Load Balancing Node Device 300]
As described above, the capacity load
In addition, since the addition and deletion of the distributed file system of the capacity load
本実施形態では、分散ファイルシステム内の全ストレージノード装置100の容量を均等化する場合の説明を行ったが、これに限定されるものではない。例えば、非特許文献3で述べられている、ストレージノード装置の物理的な位置を考慮したローカルノードIDを使って管理用ノードテーブル41を作成した場合、容量負荷分散ノード装置300の処理を、ローカルIDで限定される範囲のストレージノード装置100に限定して容量負荷分散を行うことも可能である。
In the present embodiment, the description has been given of the case where the capacities of all the
また、容量負荷分散ノード装置300のファイル移動部303は、各ストレージノード装置100からファイル蓄積部108に記憶されているファイルのファイル名と更新日時のリストを取得し、所定の日時以前の更新日時のファイルを上述したストレージノード装置100間のファイル移動手順に従ってアーカイブ専用のストレージノード装置100に移動させることも可能である。これによって、アーカイブ専用のストレージノード装置100にのみ、古いファイルを移動させるような方法も可能となる。
さらに、容量負荷分散機能の処理を、分散ファイルシステムのアクセスが少ない深夜などの特定の時間のみに稼動させるなども可能である。
In addition, the
Furthermore, the processing of the capacity load distribution function can be operated only at a specific time such as midnight when there are few accesses of the distributed file system.
[3.4 管理ノード装置400の固有機能]
[3.4.1 固有機能処理部の構成]
管理ノード装置400は、分散ファイルシステムの各ノード装置の状態を表示するための機能ノードである。
[3.4 Unique Function of Management Node Device 400]
[3.4.1 Configuration of unique function processor]
The
図19は、管理ノード装置400の固有機能処理部420の構成を示す図であり、図2に示す固有機能処理部20に相当する。管理ノード装置400の固有機能処理部420は、ステータス選択部401、ステータス情報取得部402、情報提示部403、ノード通知部404、テーブル検索部405を備えて構成される。
FIG. 19 is a diagram illustrating a configuration of the unique
ステータス選択部401は、ステータス情報の確認対象を受け付ける。ステータス情報取得部402は、ステータス選択部401が受け付けた確認対象であるノード装置のステータス情報を管理しているストレージノード装置100から、ネットワークインタフェース部30を介してステータス情報を取得し、情報提示部403へ通知する。ノード通知部404は、記憶部40の管理用ノードテーブル41を監視し、ノード装置の参加や離脱が生じた場合に、その参加あるいは離脱したノード装置の情報を情報提示部403に通知する。情報提示部403は、ステータス情報取得部402から通知されたステータス情報、あるいは、ノード通知部404から通知されたノード装置の参加や離脱をディスプレイに表示するなどして利用者に提示する。テーブル検索部405は、ストレージノード装置100のテーブル検索部106と同様の機能を有し、記憶部40に保存されている検索用ノードテーブル42から、指定されたステータスIDに時計回りに近いノードIDを検索し、そのノードアドレスを返す。
The
[3.4.2 管理ノード装置400の動作]
まず、ステータス選択部401は、管理ノード装置400を利用する利用者から、ステータス情報の確認対象となるノード装置の選択、確認したいステータス情報の種別の入力を受け付け、ステータス情報取得部402へそれらの情報を通知する。
[3.4.2 Operation of management node apparatus 400]
First, the
ステータス情報取得部402は、ステータス選択部401から通知されたノード装置のノードアドレス及びステータス情報の種別から、ステータス情報登録部105と同様の方法によりキーとなるステータスIDを生成する。ステータス情報取得部402は、ステータスIDをテーブル検索部405へ出力し、ステータスIDを管理するストレージノード装置100のノードアドレスを取得する。ステータス情報取得部402は、取得したノードアドレスのストレージノード装置100に対してgetインタフェースの実行を要求し、ステータス情報を取得する。getインタフェースの引数keyには、生成したステータスIDが設定される。ステータス情報取得部402は、ストレージノード装置100から取得したステータス情報を情報提示部403に通知し、情報提示部403は、ステータス情報取得部402から通知されたステータス情報を提示する。情報提示部403は、確認対象として指定されたノード装置やステータス情報の種類を併せて提示してもよい。情報提示部403は、例えば、テキストによるデータの表示、ノード毎にグラフ化した表示など、任意の提示方法を用いることができる。
The status
一方、ノード通知部404は、記憶部40の管理用ノードテーブル41を監視し、テーブル処理部14によって管理用ノードテーブル41にノードID及びノードアドレスが追加された場合、そのノードID及びノードアドレスが追加されるトリガとなったノード情報を情報提示部403に通知する。情報提示部403は、ノード通知部404から通知されたノード情報と、参加である旨を提示する。
同様に、ノード通知部404は、テーブル処理部14によって管理用ノードテーブル41からノードID及びノードアドレスが削除された場合、その削除のトリガとなったノード情報を情報提示部403に通知する。情報提示部403は、ノード通知部404から通知されたノード情報と、離脱である旨を提示する。
On the other hand, the
Similarly, when the node ID and the node address are deleted from the management node table 41 by the
[3.4.3 管理ノード装置400の効果]
以上説明したように、管理ノード装置400により、本実施形態の分散ファイルシステム内に参加している全ノード装置の参加、離脱の状態や、各ノード装置のステータス情報を利用者に提供することができる。本実施形態による管理ノード装置400の参加及び離脱は、分散ファイルシステムのファイル管理を滞らせることがないため、分散ファイルシステムの稼働中にいつでも、参加または離脱することができ、管理ノード装置400の数に制限もない。
なお、本実施形態ではノード情報の提示を分散ファイルシステムに参加する全ノード装置を対象として説明したが、これに限定されるものではない。例えば、非特許文献3に提案されているように、ノード装置の物理的な位置の情報を含んだローカルノードIDを本実施形態の管理用ノードテーブルに用いることにより、管理ノード装置400を特定のローカルID、すなわち特定の物理的な範囲のノード装置に限定して、そのステータス情報を表示することも可能である。
[3.4.3 Effects of management node device 400]
As described above, the
In the present embodiment, the presentation of node information has been described for all node devices participating in the distributed file system, but the present invention is not limited to this. For example, as proposed in
[4. 本実施形態の効果]
以上のように本実施形態によれば、DHTを用いたP2P型の分散ファイルシステムにおいて、オーバーレイネットワークに参加する各ノード装置は、ファイル検索用のノードテーブルである検索用ノードテーブルと、ノード装置管理用のノードテーブルである管理用ノードテーブルを保持し、ファイルを保管するストレージノード装置のノードID及びノードアドレスは検索用ノードテーブル及び管理用ノードテーブルに登録し、ファイルを保管せず、各種の付加機能を提供する機能ノード装置については管理用ノードテーブルのみに登録する。従って、機能ノード装置の参加や離脱が生じても検索用ノードテーブルには変更がないため、ファイルIDの検索が滞ることがなく、操作対象のファイルの検索に影響を与えない。また、検索用ノードテーブルを同期させる必要もない。
[4. Effects of this embodiment]
As described above, according to the present embodiment, in a P2P type distributed file system using DHT, each node device participating in the overlay network has a search node table that is a file search node table, and node device management. The node ID and node address of the storage node device that holds the management node table that stores the file and stores the file are registered in the search node table and the management node table. The function node device that provides the function is registered only in the management node table. Therefore, the search node table is not changed even if the function node device joins or leaves, so that the search for the file ID is not delayed and the search for the operation target file is not affected. Further, it is not necessary to synchronize the search node table.
このように、P2P型分散ファイルシステムにおいて、ファイルストレージ以外の様々な機能を持った機能ノード装置の追加や離脱を、ファイルの検索に影響を与えずに行なうことができるため、分散ファイルシステムを停止することなく機能を拡張することが可能となる。
また、分散ファイルシステムの利用者の増減に対応して、本実施形態のアクセスノード装置の参加や離脱を行なうことで、アクセス負荷分散が可能となる。
また、本実施形態の容量負荷分散ノード装置により、ストレージノード装置がファイルの記憶に要するディスクの使用量を均等化したり、あるいは、管理者が意図した使用量に調整したりすることができる。
また、本実施形態の管理ノード装置により、オーバーレイネットワークに参加しているノード装置の状態を把握し、利用者へ提示することが可能となる。
In this way, in the P2P type distributed file system, the addition and removal of functional node devices having various functions other than file storage can be performed without affecting the file search, so the distributed file system is stopped. It is possible to extend the functions without having to do so.
In addition, the access load can be distributed by joining or leaving the access node device according to the present embodiment in response to the increase or decrease of users of the distributed file system.
In addition, the capacity load distribution node device according to the present embodiment can equalize the usage amount of the disk required for the storage node device to store the file, or adjust the usage amount intended by the administrator.
In addition, the management node device according to the present embodiment can grasp the state of the node device participating in the overlay network and present it to the user.
[5. その他]
上述したストレージノード装置100、アクセスノード装置200、容量負荷分散ノード装置300、管理ノード装置400、及び、クライアント装置2を実装する装置は、内部にコンピュータシステムを有している。そして、ストレージノード装置100、アクセスノード装置200、容量負荷分散ノード装置300、管理ノード装置400、クライアント装置2の動作の過程は、プログラムの形式でコンピュータ読み取り可能な記録媒体に記憶されており、このプログラムをコンピュータシステムが読み出して実行することによって、上記処理が行われる。ここでいうコンピュータシステムとは、CPU及び各種メモリやOS、周辺機器等のハードウェアを含むものである。
[5. Others]
The
また、「コンピュータシステム」は、WWWシステムを利用している場合であれば、ホームページ提供環境(あるいは表示環境)も含むものとする。
また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶部のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間の間、動的にプログラムを保持するもの、その場合のサーバーやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含むものとする。また上記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであっても良い。
Further, the “computer system” includes a homepage providing environment (or display environment) if a WWW system is used.
The “computer-readable recording medium” refers to a portable medium such as a flexible disk, a magneto-optical disk, a ROM, and a CD-ROM, and a storage unit such as a hard disk built in the computer system. Furthermore, the “computer-readable recording medium” dynamically holds a program for a short time like a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line. In this case, a volatile memory in a computer system serving as a server or a client in that case is also used to hold a program for a certain period of time. The program may be a program for realizing a part of the functions described above, and may be a program capable of realizing the functions described above in combination with a program already recorded in a computer system.
1…通信ネットワーク
2…クライアント装置
10…ノードテーブル管理部
12…通知処理部(通知情報処理部)
13…安定化処理部
14…テーブル処理部
20、120、220、320、420…固有機能処理部
30…ネットワークインタフェース部
40…記憶部
41…管理用ノードテーブル
42…検索用ノードテーブル
100…ストレージノード装置
101…低レベルインタフェース部
102…キーテーブル操作部
103…ファイル操作部
104…ファイル情報登録部
105…ステータス情報登録部
106…テーブル検索部
107…キーテーブル蓄積部
108…ファイル蓄積部
200…アクセスノード装置
201…高レベルインタフェース部
202…ファイル処理部
203…テーブル検索部
300…容量負荷分散ノード装置
301…ステータス情報取得部
302…容量均等化計算部
303…ファイル移動部
304…テーブル検索部
400…管理ノード装置
401…ステータス選択部
402…ステータス情報取得部
403…情報提示部
404…ノード通知部
405…テーブル検索部
DESCRIPTION OF
13 ...
Claims (9)
ファイルを分散して記憶するストレージノード装置または付加機能を提供する機能ノード装置であり、前記分散ファイルシステムを構成するノード装置のノードIDとアドレスとを対応付けする管理用ノードテーブルと、前記ストレージノード装置のノードIDとアドレスとを対応付けする検索用ノードテーブルとを記憶する記憶部と、
前記分散ファイルシステムへの各ノード装置の参加または離脱の通知情報を受信し、前記管理用ノードテーブルに記憶されている前記ノードIDに基づいて選択した前記アドレスをあて先として前記通知情報を送信する通知情報処理部と、
ストレージノード装置が参加したことを表す通知情報を前記通知情報処理部が受信した場合には、前記通知情報に基づいて前記ストレージノード装置のノードIDとアドレスとを前記管理用ノードテーブルと前記検索用ノードテーブルとに書き込み、
機能ノード装置が参加したことを表す通知情報を前記通知情報処理部が受信した場合には、前記通知情報に基づいて前記機能ノード装置のノードIDとアドレスとを前記管理用ノードテーブルのみに書き込み、
ストレージノード装置が離脱したことを表す通知情報を前記通知情報処理部が受信した場合には、前記通知情報に基づいて前記ストレージノード装置のノードIDと対応するアドレスとを前記管理用ノードテーブルと前記検索用ノードテーブルとから削除し、
機能ノード装置が離脱したことを表す通知情報を前記通知情報処理部が受信した場合には、前記通知情報に基づいて前記機能ノード装置のノードIDと対応するアドレスとを前記管理用ノードテーブルから削除するテーブル処理部と、
指定されたファイルIDと、前記検索用ノードテーブルに記憶されている前記ノードIDとに基づいて、前記ファイルIDを管理する前記ストレージノード装置のアドレスを取得するテーブル検索部と、
を備えることを特徴とするノード装置。 A node device that participates via a network in a distributed file system that distributes and manages files,
A storage node device that distributes and stores files, or a function node device that provides additional functions, a management node table that associates node IDs and addresses of node devices that constitute the distributed file system, and the storage node A storage unit that stores a search node table that associates node IDs and addresses of devices;
Notification of receiving notification information of participation or withdrawal of each node device from the distributed file system, and transmitting the notification information to the address selected based on the node ID stored in the management node table An information processing unit;
When the notification information processing unit receives notification information indicating that a storage node device has participated, the management node table and the search node are used to determine the node ID and address of the storage node device based on the notification information. Write to node table,
When the notification information processing unit receives notification information indicating that a functional node device has participated, the node ID and address of the functional node device are written only in the management node table based on the notification information,
When the notification information processing unit receives notification information indicating that the storage node device has left, the management node table and the address corresponding to the node ID of the storage node device based on the notification information Delete from the search node table,
If the notification information processing unit receives notification information indicating that the functional node device has left, the node ID of the functional node device and the corresponding address are deleted from the management node table based on the notification information A table processing unit to
A table search unit that acquires an address of the storage node device that manages the file ID based on the specified file ID and the node ID stored in the search node table;
A node device comprising:
前記テーブル処理部は、前記管理用ノードテーブルに登録されている前記アドレスの前記ノード装置が離脱したことを前記安定化部が検出した場合、前記管理用ノードテーブルと前記検索用ノードテーブルとから離脱したノード装置のノードIDとアドレスとを削除し、
前記通知情報処理部は、前記管理用ノードテーブルに記憶されている前記ノードIDに基づいて選択した前記アドレスをあて先として、前記安定化部が検出した前記ノード装置が離脱したことを表す通知情報を送信する、
ことを特徴とする請求項1に記載のノード装置。 A stabilizing unit for confirming whether or not the node device at the address registered in the management node table is disconnected;
The table processing unit leaves the management node table and the search node table when the stabilization unit detects that the node device at the address registered in the management node table has left. Delete the node ID and address of the node device
The notification information processing unit, with the address selected based on the node ID stored in the management node table as a destination, notification information indicating that the node device detected by the stabilization unit has detached Send,
The node device according to claim 1, wherein:
ファイルIDと、ファイルを記憶している前記ストレージノード装置のアドレスとを対応付けて記憶するキーテーブル蓄積部と、
指定されたファイルIDに対応した前記ストレージノード装置のアドレスを前記キーテーブル蓄積部から読み出して出力するキーテーブル操作部と、
ファイル名を指定した操作指示を受信し、前記ファイル名により特定される前記ファイル蓄積部内の前記ファイルに対する操作を行うファイル操作部と、
をさらに備えることを特徴とする請求項1または請求項2に記載のノード装置。 A file storage unit for storing files;
A key table storage unit that stores a file ID and an address of the storage node device storing the file in association with each other;
A key table operation unit that reads out and outputs the address of the storage node device corresponding to the specified file ID from the key table storage unit;
A file operation unit that receives an operation instruction specifying a file name and performs an operation on the file in the file storage unit specified by the file name;
The node device according to claim 1, further comprising:
自ノード装置のステータス情報を特定するステータスIDを前記テーブル検索部に渡し、前記ステータスIDに対応して前記テーブル検索部が取得したアドレスをあて先として前記ステータスID及び前記ステータス情報の登録要求を送信するステータス情報登録部をさらに備え、
前記キーテーブル操作部は、ステータスID及びステータス情報の登録要求を受信した場合、登録が要求された前記ステータスIDと前記ステータス情報とを対応付けて前記キーテーブル蓄積部に書き込み、ステータスIDを指定したステータス情報の要求を受信した場合、受信した前記ステータスIDに対応したステータス情報を前記キーテーブル蓄積部から読み出して出力し、
前記テーブル検索部は、ファイルIDの代わりに前記ステータスIDを用いて前記ストレージノード装置のアドレスを取得する、
ことを特徴とする請求項3に記載のノード装置。 The key table storage unit stores a status ID and status information in association with each other,
A status ID for specifying the status information of the own node device is passed to the table search unit, and the registration request for the status ID and the status information is transmitted to the address acquired by the table search unit corresponding to the status ID. It further includes a status information registration unit,
When receiving a registration request for status ID and status information, the key table operation unit writes the status ID requested for registration and the status information in association with each other in the key table storage unit, and designates the status ID. When a request for status information is received, the status information corresponding to the received status ID is read from the key table storage unit and output,
The table search unit acquires the address of the storage node device using the status ID instead of the file ID.
The node device according to claim 3.
ことを特徴とする請求項1または請求項2に記載のノード装置。 A file operation instruction designating a file name is received, a file ID generated from the received file name is passed to the table search unit, and the file obtained by the table search unit corresponding to the file ID is used as the destination. A file processing unit that transmits an ID, receives an address of a storage node device storing a file corresponding to the transmitted file ID, and transmits a file operation instruction specifying the file name with the received address as a destination Further comprising
The node device according to claim 1, wherein the node device is a node device.
前記ステータス情報取得部の要求に応じて取得した前記ストレージノード装置のステータス情報に基づいて、ファイルの移動元及び移動先の前記ストレージノード装置と、移動容量とを決定する容量均等化計算部と、
前記容量均等化計算部によって決定されたファイル移動元の前記ストレージノード装置からファイル移動先の前記ストレージノード装置へ前記移動容量に基づいてファイルを移動するファイル移動部と、をさらに備え、
前記テーブル検索部は、ファイルIDの代わりに前記ステータスIDを用いて前記ストレージノード装置のアドレスを取得する、
ことを特徴とする請求項1または請求項2に記載のノード装置。 A status ID for identifying status information of each storage node device in the distributed file system is passed to the table search unit, and the status ID is transmitted to the address acquired by the table search unit corresponding to the status ID. A status information acquisition unit that requests status information;
Based on the status information of the storage node device acquired in response to the request of the status information acquisition unit, a capacity equalization calculation unit that determines the storage node device of the migration source and migration destination of the file, and the migration capacity;
A file mover for moving a file based on the move capacity from the storage node device of the file move source determined by the capacity equalization calculation unit to the storage node device of the file move destination,
The table search unit acquires the address of the storage node device using the status ID instead of the file ID.
The node device according to claim 1, wherein the node device is a node device.
前記ステータス情報取得部が取得した前記ステータス情報を出力する情報提示部と、をさらに備え、
前記テーブル検索部は、ファイルIDの代わりに前記ステータスIDを用いて前記ストレージノード装置のアドレスを取得する、
ことを特徴とする請求項1または請求項2に記載のノード装置。 A status for acquiring status information by passing a status ID for identifying status information of the node device to the table search unit, transmitting the status ID to the address acquired by the table search unit corresponding to the status ID An information acquisition unit;
An information presentation unit that outputs the status information acquired by the status information acquisition unit,
The table search unit acquires the address of the storage node device using the status ID instead of the file ID.
The node device according to claim 1, wherein the node device is a node device.
ことを特徴とする請求項1または請求項2に記載のノード装置。 An information presenting unit that outputs participation or withdrawal of a node device when it is detected that a node ID has been added or deleted from the management node table;
The node device according to claim 1, wherein the node device is a node device.
ファイルを分散して記憶するストレージノード装置または付加機能を提供する機能ノード装置であり、前記分散ファイルシステムを構成するノード装置のノードIDとアドレスとを対応付けする管理用ノードテーブルと、前記ストレージノード装置のノードIDとアドレスとを対応付けする検索用ノードテーブルとを記憶する記憶部と、
前記分散ファイルシステムへの各ノード装置の参加または離脱の通知情報を受信し、前記管理用ノードテーブルに記憶されている前記ノードIDに基づいて選択した前記アドレスをあて先として前記通知情報を送信する通知情報処理部と、
ストレージノード装置が参加したことを表す通知情報を前記通知情報処理部が受信した場合には、前記通知情報に基づいて前記ストレージノード装置のノードIDとアドレスとを前記管理用ノードテーブルと前記検索用ノードテーブルとに書き込み、
機能ノード装置が参加したことを表す通知情報を前記通知情報処理部が受信した場合には、前記通知情報に基づいて前記機能ノード装置のノードIDとアドレスとを前記管理用ノードテーブルのみに書き込み、
ストレージノード装置が離脱したことを表す通知情報を前記通知情報処理部が受信した場合には、前記通知情報に基づいて前記ストレージノード装置のノードIDと対応するアドレスとを前記管理用ノードテーブルと前記検索用ノードテーブルとから削除し、
機能ノード装置が離脱したことを表す通知情報を前記通知情報処理部が受信した場合には、前記通知情報に基づいて前記機能ノード装置のノードIDと対応するアドレスとを前記管理用ノードテーブルから削除するテーブル処理部と、
指定されたファイルIDと、前記検索用ノードテーブルに記憶されている前記ノードIDとに基づいて、前記ファイルIDを管理する前記ストレージノード装置のアドレスを取得するテーブル検索部、
として機能させることを特徴とするコンピュータプログラム。 A computer used as a node device that participates via a network in a distributed file system that distributes and manages files.
A storage node device that distributes and stores files, or a function node device that provides additional functions, a management node table that associates node IDs and addresses of node devices that constitute the distributed file system, and the storage node A storage unit that stores a search node table that associates node IDs and addresses of devices;
Notification of receiving notification information of participation or withdrawal of each node device from the distributed file system, and transmitting the notification information to the address selected based on the node ID stored in the management node table An information processing unit;
When the notification information processing unit receives notification information indicating that a storage node device has participated, the management node table and the search node are used to determine the node ID and address of the storage node device based on the notification information. Write to node table,
When the notification information processing unit receives notification information indicating that a functional node device has participated, the node ID and address of the functional node device are written only in the management node table based on the notification information,
When the notification information processing unit receives notification information indicating that the storage node device has left, the management node table and the address corresponding to the node ID of the storage node device based on the notification information Delete from the search node table,
If the notification information processing unit receives notification information indicating that the functional node device has left, the node ID of the functional node device and the corresponding address are deleted from the management node table based on the notification information A table processing unit to
A table search unit that acquires an address of the storage node device that manages the file ID based on the specified file ID and the node ID stored in the search node table;
A computer program that functions as a computer program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010096986A JP5470148B2 (en) | 2010-04-20 | 2010-04-20 | Node device and computer program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010096986A JP5470148B2 (en) | 2010-04-20 | 2010-04-20 | Node device and computer program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2011227712A JP2011227712A (en) | 2011-11-10 |
JP5470148B2 true JP5470148B2 (en) | 2014-04-16 |
Family
ID=45042981
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010096986A Active JP5470148B2 (en) | 2010-04-20 | 2010-04-20 | Node device and computer program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5470148B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021249165A1 (en) * | 2020-06-12 | 2021-12-16 | 华为技术有限公司 | Ethernet storage system, and information notifying method therefor and related apparatus thereof |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104679665A (en) * | 2013-12-02 | 2015-06-03 | 中兴通讯股份有限公司 | Method and system for achieving block storage of distributed file system |
MX2020010658A (en) * | 2018-04-10 | 2020-10-28 | Huawei Tech Co Ltd | Point-to-point database synchronization over a transport protocol. |
CN113742429A (en) * | 2021-11-04 | 2021-12-03 | 正链科技(深圳)有限公司 | Distributed network data storage method |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3967666B2 (en) * | 2002-11-19 | 2007-08-29 | 株式会社日立製作所 | Electronic information sharing system |
JP2009230686A (en) * | 2008-03-25 | 2009-10-08 | Nippon Hoso Kyokai <Nhk> | Content management server and content management program |
JP5287059B2 (en) * | 2008-09-09 | 2013-09-11 | ブラザー工業株式会社 | Node device, node processing program, and storage instruction method |
-
2010
- 2010-04-20 JP JP2010096986A patent/JP5470148B2/en active Active
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021249165A1 (en) * | 2020-06-12 | 2021-12-16 | 华为技术有限公司 | Ethernet storage system, and information notifying method therefor and related apparatus thereof |
Also Published As
Publication number | Publication date |
---|---|
JP2011227712A (en) | 2011-11-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10185497B2 (en) | Cluster federation and trust in a cloud environment | |
KR102074006B1 (en) | Cloud-based distributed data system | |
JP6725742B2 (en) | File storage, object storage, and storage systems | |
US9405781B2 (en) | Virtual multi-cluster clouds | |
JP5727020B2 (en) | Cloud computing system and data synchronization method thereof | |
US9031906B2 (en) | Method of managing data in asymmetric cluster file system | |
KR102038527B1 (en) | Distributed cluster management system and method for thereof | |
US8296420B2 (en) | Method and apparatus for constructing a DHT-based global namespace | |
CN105324765A (en) | Selecting a store for deduplicated data | |
US10503693B1 (en) | Method and system for parallel file operation in distributed data storage system with mixed types of storage media | |
JP2014529814A (en) | Data maintenance methods | |
KR20100048130A (en) | Distributed storage system based on metadata cluster and method thereof | |
JP5470148B2 (en) | Node device and computer program | |
JP2012123544A (en) | Load distribution device and program | |
KR102133840B1 (en) | Distributed file system and data processing method for live service | |
JP2015035020A (en) | Storage system, storage control device, and control program | |
JP6196389B2 (en) | Distributed disaster recovery file synchronization server system | |
JP5317827B2 (en) | Distributed data management apparatus, method and program | |
JP5915116B2 (en) | Storage system, storage device, system control program, and system control method | |
JP6011786B2 (en) | Distributed storage system, distributed storage data allocation control method, and distributed storage data allocation control program | |
CN105359107A (en) | Reporting degraded state of data retrieved for distributed object | |
Yu et al. | Granary: A sharing oriented distributed storage system | |
JP6824435B2 (en) | Information distribution storage systems, methods and programs | |
JP2005063374A (en) | Data management method, data management device, program for the same, and recording medium | |
KR101748913B1 (en) | Cluster management method and data storage system for selecting gateway in distributed storage environment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20121226 |
|
TRDD | Decision of grant or rejection written | ||
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20131225 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20140107 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20140203 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5470148 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |