The subject matter herein generally relates to data storage.
In the field of data storage, mass-storage servers have evolved from a single mass-storage server to a distributed system composed of numerous, discrete, storage servers networked together. Each of the storage servers includes a solid state disk (SSD). However, it fails to balance the SSD storage space of the storage servers.
Implementations of the present technology will now be described, by way of example only, with reference to the attached figures.
It will be appreciated that for simplicity and clarity of illustration, where appropriate, reference numerals have been repeated among the different figures to indicate corresponding or analogous elements. In addition, numerous specific details are set forth in order to provide a thorough understanding of the embodiments described herein. However, it will be understood by those of ordinary skill in the art that the embodiments described herein can be practiced without these specific details. In other instances, methods, procedures, and components have not been described in detail so as not to obscure the related relevant feature being described. Also, the description is not to be considered as limiting the scope of the embodiments described herein. The drawings are not necessarily to scale and the proportions of certain parts may be exaggerated to better illustrate details and features of the present disclosure. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean “at least one”.
Several definitions that apply throughout this disclosure will now be presented.
The term “coupled” is defined as connected, whether directly or indirectly through intervening components, and is not necessarily limited to physical connections. The connection can be such that the objects are permanently coupled or releasably coupled. The term “comprising,” when utilized, means “including, but not necessarily limited to”; it specifically indicates open-ended inclusion or membership in the so-described combination, group, series and the like.
The disclosure is described in relation to a distributed data storage-fetching system.
Referring to
In one embodiment, a number of the multiple servers, 1a to 1c, is three, and each of the servers, 1a to 1c comprises four HDDs.
The distributed data storage-fetching system 100 further comprises a partition module 2, a setup module 3, a first establishing module 4, and a second establishing module 5.
In one embodiment, the one or more function modules can include computerized code in the form of one or more programs that are stored in a memory, and executed by a processor.
The following will use the server 1a as an embodiment to describe a principle of the distributed data storage-fetching system 100.
The partition module 2 is configured to segment the SSD of the server 1a to multiple partition areas. A number of the multiple partition areas is equal to a number of the multiple servers 1a to 1c. It is means that the partition module 2 segments the SSD of the server 1a into three partition areas. The three partition areas can comprise a first partition area, a second partition area, and a third partition area.
The setup module 3 is configured to set the first partition area as a local partition area, that is, for the first server 1a. The setup module 3 further sets the second partition area and the third partition area respectively as remote partition areas to the servers, 1b to 1c. For example, the setup module 3 sets the second partition area as a remote partition area to the server 1b and sets the third partition area as a remote partition area to the server 1c. The second partition area and the third partition area are accessible to the servers, 1b to 1c, via the network.
In one embodiment, the setup module 3 sets the second and third partition areas via an internet small computer system interface (iSCSI) protocol.
The first establishing module 4 is configured to establish the local partition area of the first server 1a and two remote partition areas respectively shared by the servers, 1b to 1c, into a block device.
In one embodiment, the server 1b shares a remote partition area to the server 1a and shares a remote partition area to the server 1c. The server 1c shares a remote partition area to the server 1a and shares a remote partition area to the server 1b.
The second establishing module 5 is configured to establish the four HDDs of the server 1a into a redundant array of independent disks (RAID), and maps the block device to the RAID to establish a device mapper (DM), to store and fetch data.
In the distributed data storage-fetching system 100, the DM is used to replace the four HDDs as a base storage space. A speed of the SSD is greater than a speed of the HDD, and the RAID is mapped to the SSD. Data storing and fetching on the DM is faster than on the four HDDs.
In one embodiment, a store-and-fetch speed of the local partition area of the SSD is greater than that of the remote partition area of the SSD. The first establishing module 4 establishes the local partition area of the first server 1a and the two remote partition area respectively shared by the servers, 1b to 1c, into the block device according to a zettabyte file system (ZFS) algorithm. Then the block device sets the local partition area of the first server 1a as a first priority channel, and sets the two remote partition areas shared by the servers, 1b to 1c, as second priority channels. External data is preferentially written in the local partition area. When the local partition area is full, external data can be written in the two remote partition areas.
Referring to
Detailed descriptions and configurations of the server 1b and the server 1c are omitted, these being substantially the same as for those of the server 1a.
In step S300, the partition module 2 segments the SSD of the server 1a into multiple partition areas. The number of the multiple partition areas is equal to the number of the multiple servers 1a to 1c. The multiple partition areas can comprise a first partition area, a second partition area, and a third partition area.
In step S302, the setup module 3 sets the first partition area as the local partition area for the first server 1a. The second and third partition areas are respectively set as the remote partition areas for the servers, 1b and 1c. The second partition area and the third partition area are accessible to the servers, 1b and 1c, via the network.
In step S304, the first establishing module 4 establishes the local partition area of the first server 1a and the two remote partition areas respectively shared by the servers, 1b to 1c, into a block device.
In step S306, the second establishing module 5 maps the block device to the HDD of the server 1a to establish a device mapper (DM), for storing and fetching data.
In one embodiment, in the step S302, the setup module 3 sets the second partition area and the third partition area as the remote partition areas to share to the servers, 1b to 1c, via iSCSI protocol.
In one embodiment, a store-and-fetch speed of the local partition area of the SSD is greater than that of a remote partition area of the SSD. In the step S304, the first establishing module 4 establishes the local partition area of the first server 1a and the two remote partition areas respectively shared by the servers, 1b to 1c, into the block device according to the ZFS algorithm. Then the block device sets the local partition area of the first server 1a as a first priority channel and sets the two remote partition areas shared by the servers, 1b to 1c, as second priority channels. External data is preferentially written in the local partition area. When the local partition area is full, external data can be written in the two remote partition areas.
In one embodiment, the server 1a comprises multiple HDDs. In the step S306, the second establishing module 5 establishes the multiple HDDs to the RAID, and maps the block device to the RAID to establish the DM via a flash cache module 6. The flash cache module 6 comprises a flash cache algorithm or a buffer cache algorithm.
The DM replaces the multiple HDDs as the base storage space. The speed of the SSD is greater than the speed of the multiple HDDs, and the RAID is mapped to the SSD. The store-and-fetch speed of external data on the DM is faster than that of external data on the multiple HDDs.
While the disclosure has been described by way of example and in terms of the embodiment, it is to be understood that the disclosure is not limited thereto. On the contrary, it is intended to cover various modifications and similar arrangements as would be apparent to those skilled in the art. Therefore, the range of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.
| Number | Date | Country | Kind |
|---|---|---|---|
| 201610745192.8 | Aug 2016 | CN | national |