Method and device for data storage
A data storage and data technology, applied in the computer field, can solve the problems of storage failure, idle storage space of storage unit, data overflow of storage unit, etc., and achieve the effect of improving the success rate
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0034] A possible application scenario of this embodiment is: each storage unit has stored logical data, and the data storage method adopted may be the same as that in the prior art. For example, when storing, the data to be stored is hashed into N logical areas through a hash operation, and the data in each logical area is called a piece of logical data, and a total of N logical data can be obtained. Then, the N shares of logical data are evenly divided according to the number of storage units, and stored in each storage unit. However, after using the existing method to store data, there will be the same number of copies of logical data stored in each storage unit, but the storage usage rate is different. On the one hand, it will cause data overflow in some storage units with small storage capacity, resulting in storage On the other hand, some storage units with large storage capacity have the defect of idle storage space, resulting in waste of storage resources.
[0035] Th...
Embodiment 2
[0077] An application scenario of the embodiment of the present invention is: each storage unit does not store logical data, or has stored logical data according to the method provided by the embodiment of the present invention. The storage usage of the storage unit tends to be consistent.
[0078] Such as Image 6 As shown, the embodiment of the present invention provides a data storage method, including:
[0079] 201. Acquire the sum of the number of logical data shares to be stored.
[0080] 202. Calculate the respective storage capabilities of each storage unit.
[0081] One implementation of this step is: calculating the maximum number of copies of logic data that each storage unit can store respectively; rate ratio. For the specific calculation method, refer to the detailed description in step 102 above.
[0082] 203. Determine the target number of logical data to be written into each storage unit according to the sum of the logical data shares to be stored and the ...
Embodiment 3
[0091] Such as Figure 7 As shown, an embodiment of the present invention provides a data storage device, including:
[0092] An acquisition module 11, configured to acquire the sum of the actual number of logical data stored in each storage unit;
[0093] Calculation module 12, used to calculate the respective storage capacity of each storage unit and the total storage capacity of each storage unit;
[0094] The obtaining module 11 is also used to obtain the target logical data ratio of each storage unit according to the ratio of the respective storage capacity of each storage unit to the total storage capacity;
[0095] Determining module 13, for determining the target number of copies of logic data to be stored in each storage unit according to the sum of the actual number of copies of logical data stored in each storage unit and the ratio of target logic data in each storage unit;
[0096] The control module 14 is used for migrating logical data between storage units acc...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 