[go: up one dir, main page]

CN105824572B - Disk storage space management method, device and storage device - Google Patents

Disk storage space management method, device and storage device Download PDF

Info

Publication number
CN105824572B
CN105824572B CN201510004657.XA CN201510004657A CN105824572B CN 105824572 B CN105824572 B CN 105824572B CN 201510004657 A CN201510004657 A CN 201510004657A CN 105824572 B CN105824572 B CN 105824572B
Authority
CN
China
Prior art keywords
disk
metadata
raid
partition
data
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.)
Expired - Fee Related
Application number
CN201510004657.XA
Other languages
Chinese (zh)
Other versions
CN105824572A (en
Inventor
谭小兵
范超
陈湘宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN201510004657.XA priority Critical patent/CN105824572B/en
Priority to PCT/CN2015/074030 priority patent/WO2016110004A1/en
Publication of CN105824572A publication Critical patent/CN105824572A/en
Application granted granted Critical
Publication of CN105824572B publication Critical patent/CN105824572B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A kind of disk storage space management method, device and storage equipment.Described method includes following steps: the operation of identification disk insertion storage equipment;According to disk self-contained metadata and file system, identify new insertion disk whether carrying data;When the disk being newly inserted into carries data, according to the instruction of user, retain the data in new insertion disk, and by the file system in new insertion disk on a storage device carry at share directory or by the file system in the disk array RAID of new insertion disk on a storage device carry at share directory.Described device includes, data identification module, data reservation module, catalogue carry module.The method, device and storage equipment can perceive the variation of storage equipment disk, so that user retains the data in old disk.

Description

A kind of disk storage space management method, device and storage equipment
Technical field
The present invention relates to memory technology more particularly to a kind of disk storage space management methods, device and storage equipment.
Background technique
Nowadays, mankind's stepped into information epoch already.Various electronic equipments, such as smart phone, PC, digital camera, with people Life it is closely related.And with the appearance of Blu-ray video, lossless music, high pixel photo etc., family data amount occurs Increase on a large scale.Therefore, the demand to family's special purpose memory devices increasingly enhances.
Software PLC (Redundant Arrays of Independent Disks, disk array), refers to Software Create Disk array.By multiple block devices (such as disk, disk partition, logical volume) as member, by technologies such as stripings Generate a kind of new block device with data protection function.Specifically refer in linux system using mdadm order with "- The block device that C " or "-create " parameter generate, hereinafter referred to as RAID.
Domestic consumer occasionally wants to both transfer to storage system to be managed collectively the old hard disk in family, to utilize storage The various upper level applications of system access to disk, and retain the data in old hard disk.This old disk may be Following situation: may be the disk pulled from the operating systems such as Windows, Linux, MAC;It may be from our another The disk pulled in set family storage equipment;It may be both above situation any amount (in the range that physics slot position is supported It is interior) mixing of disk.
Because RAID is based on multiple disk partition, and a disk can be divided into multiple subregions, so, once Disk changes, and such as damages, plugs and unplugs, and will influence multiple RAID simultaneously, if the disk member of RAID is more, that by The RAID of influence is also more.
After one RAID device is built, MD (Mult iple Devices, multiple devices) driving is to pass through primary and secondary Device number manages RAID member's.One disk after extraction is gone, then turns back to and, although the at this moment same disk, magnetic Disk sequence number is unchanged, but original subregion in disk may it is deleted, modify or repartition, and no matter family is special With the system of storage equipment in identification, the secondary device number of disk partition whether with it is original consistent, above situation is all MD driving It can not handle.For completely new disk, data do not need the disk retained in other words, can directly dispose the number in disk According to being managed in the way of us;But for the old disk of user, disk (or its subregion) once becomes RAID Member, then, the data in disk can all lose.How data in diversified old disk are retained, and to magnetic Disk is managed collectively, and user's access and problem to be solved are supplied to.Thus, it is necessary to be stored in hyperdisk empty Between when actively perceive these variations, accurately identify each member of RAID, and processing appropriate is carried out to RAID.
Summary of the invention
In view of this, the present invention provides a kind of disk storage space management method, device and storage equipment, it can be to storage The variation of equipment disk is perceived, so that user retains the data in old disk.
Based on a kind of above-mentioned purpose disk storage space management method provided by the invention, include the following steps:
Identify the operation of disk insertion storage equipment;
According to disk self-contained metadata and file system, identify new insertion disk whether carrying data;
When the disk being newly inserted into carries data, according to the instruction of user, retain the data in new insertion disk, and will be new Be inserted into disk in file system on a storage device carry at share directory.
Optionally, the step of whether carrying data according to the self-contained metadata of disk, the new insertion disk of identification is specific Include:
Judge whether disk carries metadata, if disk carries metadata, identifies the carrying data of disk;If disk is not Metadata is carried, but there is file system, then identifies that disk carries data.
Carry is specifically included the file system by new insertion disk at the step of share directory on a storage device:
If the disk that is newly inserted into carries metadata, by the disk array RAID of new insertion disk it is file system mounted at Share directory;
If the disk being newly inserted into does not carry metadata but carries file system, by new insertion disk it is file system mounted at Share directory.
Optionally, the step of retaining the data in new insertion disk, specifically includes:
All disks of scanning storage equipment, obtain the partition list in system under current state;
If the disk being newly inserted into carries metadata, according to metadata entrained by new insertion disk, acquisition is described newly to be inserted Enter the subregion Universally Unique Identifier UUID of the disk array RAID member in disk;According to the partition list and the subregion Universally Unique Identifier UUID finds point under the corresponding system current state of the subregion Universally Unique Identifier UUID Area;In the storage equipment, the disk array RAID in new insertion disk is re-assemblied out;According to the RAID re-assemblied out Hanging equipment sets out share directory;
If the disk being newly inserted into does not carry metadata, by the subregion carry in partition list at share directory.
Optionally, the step of going out share directory according to the RAID device carry re-assemblied out specifically includes:
The system of the metadata Universally Unique Identifier UUID and storage equipment that include in the metadata entrained by the disk When Universally Unique Identifier UUID is consistent, the disk array RAID carry re-assemblied out at memory space, then from storage Share directory is recovered in space;
The system of the metadata Universally Unique Identifier UUID and storage equipment that include in the metadata entrained by the disk When Universally Unique Identifier UUID is inconsistent, the disk array RAID carry re-assemblied out at share directory.
Optionally, when the creation memory space trigger condition for reaching setting or the memory space creation for receiving user's transmission When instruction, following steps are executed:
The blank disc of storage equipment is chosen, and subregion is carried out to the blank disc chosen, obtains newly created disk point Area;
As unit of newly created disk partition, soft magnetism disk array RAID is created;
File system is created on the soft magnetism disk array RAID;
The soft magnetism disk array RAID information is saved in first number of blank disc together with the metadata mark of blank disc In, to update the metadata of blank disc;
By the meta-data preservation of updated blank disc in the system configuration file of storage equipment.
Optionally, as unit of newly created disk partition, creation soft magnetism disk array RAID the step of, specifically includes:
The first subregion is constructed on the blank disc chosen, then disk array RAID is constructed for member with the first subregion, is made For reliable memory space;And the second subregion is constructed on the blank disc chosen, then disk battle array is constructed for member with the second subregion RAID is arranged, as unreliable memory space;
The reliable memory space storing data, the disk array RAID used in such a way that there is data redundancy ability It include: RAID1 or RAID5 or RAID6 or RAID10;The unreliable memory space does not have data redundancy ability, uses Disk array RAID include: RAID0 or linear formula storage LINEAR.
Optionally, the method also includes:
Receive the instruction for deleting memory space;
According to the instruction for deleting memory space, memory space is unloaded;
Stop the corresponding disk array RAID of memory space for needing to delete;
Remove the super block message of disk array RAID and metadata of each disk in disk array RAID;
The corresponding metadata of the memory space is deleted in system configuration file;
Other disk arrays are not present in equipment if storing, deletion system identifies in system configuration file.
Optionally, the method also includes:
Receive the instruction for deleting disk;
Unload file system all on disk to be deleted;
If the metadata mark of disk to be deleted is different from the storage metadata mark of equipment, stop disk to be deleted On disk array RAID, remove the super block message of disk array RAID on disk to be deleted and its metadata carried letter Breath.
Optionally, by the disk array RAID member of new insertion disk itself on a storage device carry at share directory it Afterwards, further includes:
Using the share directory, transmitted between the disk that storage equipment has disk and is newly inserted by disk interface Data.
Meanwhile the present invention also provides a kind of disk storage space managing devices, comprising:
Insertion operation identification module: the operation of disk insertion storage equipment for identification;
Data identification module: for the metadata and file system self-contained according to disk, new insertion disk is identified Whether data are carried;
Data reservation module: for according to the instruction of user, retaining new insertion magnetic when the disk being newly inserted into carries data Data in disk;
Catalogue carry module: for by the file system in new insertion disk on a storage device carry at share directory.
Optionally, the data identification module specifically includes:
First recognition unit: for when determining disk carrying metadata, then identifying the carrying data of disk;
Second recognition unit: for not carrying metadata when determining disk, but there is file system, then identifies that disk carries Data.
Optionally, the catalogue carry module specifically includes:
First share directory carry unit: for will newly be inserted into magnetic in the case where the disk being newly inserted into carries metadata It is file system mounted at share directory in the disk array RAID of disk;
Second share directory carry unit: for not carrying metadata in the disk being newly inserted into but carrying the feelings of file system Under condition, by the file system mounted at share directory of new insertion disk.
Optionally, the data reservation module specifically includes:
Partition list obtains module: for scanning all disks of storage equipment, obtaining point in system under current state Area's list;
Universally Unique Identifier UUID acquiring unit: for when the disk being newly inserted into carries metadata, then being inserted according to new Enter metadata entrained by disk, obtains the general unique identification of subregion of the disk array RAID member in the new insertion disk Code UUID;And trigger subregion searching unit;
Subregion searching unit: for finding according to the partition list and the subregion Universally Unique Identifier UUID Subregion under the corresponding system current state of the subregion Universally Unique Identifier UUID;And trigger RAID assembling unit;
RAID assembling unit: in the storage equipment, re-assemblying out the disk array in new insertion disk RAID;And trigger share directory the first carry unit;
Share directory the first carry unit: for going out share directory according to the RAID device carry re-assemblied out;
Share directory the second carry unit:, will be in partition list if the disk for being newly inserted into does not carry metadata Subregion carry is at share directory.
Optionally, the first carry of share directory unit specifically includes:
Memory space carry subelement: for working as the general unique identification of metadata for including in metadata entrained by disk When code UUID is consistent with the storage system Universally Unique Identifier UUID of equipment, the disk array RAID carry re-assemblied out At memory space, then triggers share directory and reply subelement;
Share directory restores subelement: for recovering share directory from memory space;
Share directory carry subelement: for working as the general unique identification of metadata for including in metadata entrained by disk When the code UUID and system Universally Unique Identifier UUID of storage equipment inconsistent, the disk array RAID re-assemblied out is hung Carry into share directory.
Optionally, described device further include:
Blank disc division module: it is sent for working as to reach the creation memory space trigger condition of setting or receive user Memory space when creating instruction, choose the blank disc of storage equipment, and subregion is carried out to the blank disc chosen, obtain new The disk partition of creation;
Soft magnetism disk array RAID creation module: for creating soft magnetism disk array as unit of newly created disk partition RAID;
File system creation module: for creating file system on the soft magnetism disk array RAID;
Metadata updates module: it is protected for identifying the soft magnetism disk array RAID information together with the metadata of blank disc It is stored in the metadata of blank disc, to update the metadata of blank disc;
Meta-data preservation module: for by the meta-data preservation of updated blank disc storage equipment system configuration In file.
Optionally, the soft magnetism disk array RAID creation module specifically includes:
Reliable subregion construction unit: for constructing the first subregion on the blank disc chosen;
Reliable memory space construction unit: for being that member constructs disk array RAID with the first subregion, as reliably depositing Store up space;
Unreliable subregion construction unit: for constructing the second subregion on the blank disc chosen;
Unreliable memory space construction unit: it is that member constructs disk array RAID with the second subregion, is deposited as unreliable Store up space;
The reliable memory space storing data, the disk array RAID used in such a way that there is data redundancy ability It include: RAID1 or RAID5 or RAID6 or RAID10;The unreliable memory space does not have data redundancy ability, uses Disk array RAID include: RAID0 or linear formula storage LINEAR.
Optionally, described device further include:
Delete memory space command reception module: for receiving the instruction for deleting memory space;
Memory space Unload module: for unloading memory space according to the instruction for deleting memory space;
Disk array RAID stopping modular: the corresponding disk array RAID of memory space for stopping needing to delete;
First disk array RAID information removes module: removing the disk array of each disk in disk array RAID The super block message of RAID and metadata;
Metadata removing module: for deleting the corresponding metadata of the memory space in system configuration file;
System banner removing module: if other disk arrays are not present in equipment for storing, in system configuration file Deletion system mark.
Optionally, described device further include:
Delete disk command reception module: for receiving the instruction for deleting disk;
File system Unload module: for unloading file system all on disk to be deleted;
Disk array RAID stopping modular: the metadata for metadata mark and storage equipment when disk to be deleted When identifying different, stop the disk array RAID on disk to be deleted;
Second disk array RAID information removes module: for removing the disk array RAID superblock on disk to be deleted Information and its metadata information carried.
Optionally, described device further include: the share directory is used, in the magnetic that storage equipment has disk and is newly inserted into Data are transmitted by disk interface between disk.
Further, the present invention also provides a kind of storage equipment, further include that the present invention appoints including disk for storing data It anticipates disk storage space managing device provided by an embodiment.
From the above it can be seen that disk storage space management method provided by the invention, device and storage equipment, when It, can be the file system in disk with share directory if the disk being newly inserted into contains data when storage equipment is newly inserted into disk Form be presented to the user use;Software PLC can also be constructed on disk, the memory space of carry Cheng Xin, then creation is shared Catalogue is used to user.User can not only be allowed to make full use of disk old in family in this way, and when user needs ours It, can be very convenient when progress data are moved into, moved out in equipment.
Detailed description of the invention
Fig. 1 is the method flow schematic diagram of the embodiment of the present invention;
Fig. 2 is that the disk type of the embodiment of the present invention shifts schematic diagram;
Fig. 3 A, 3B are that the disk storage space of the embodiment of the present invention divides schematic diagram;
Fig. 4 is the apparatus structure schematic diagram of the embodiment of the present invention.
Specific embodiment
In order to provide effective implementation, the present invention provides following embodiments, below in conjunction with Figure of description to this Inventive embodiments are illustrated.
Present invention firstly provides a kind of disk storage space management methods, include the steps that as shown in Figure 1:
Step 101: the operation of identification disk insertion storage equipment;
Step 102: according to disk self-contained metadata and file system, identify new insertion disk whether carrying number According to;
Step 103: when the disk being newly inserted into carries data, according to the instruction of user, retaining the number in new insertion disk According to, and by the file system in new insertion disk on a storage device carry at share directory.
From the above it can be seen that disk storage space management method provided by the invention, to the disk containing data, File system in disk can be presented to the user use in the form of share directory, so that user sets to family's specific store When standby middle insertion disk, the data in disk can be retained according to their own needs, disk is avoided to insert position in change Internal zone dividing is caused to be deleted and lose when setting.
In a specific embodiment of the present invention, metadata is assigned for the disk being connected in family's special purpose memory devices, It include for identifying disk different disks being known by metadata when being plugged into storage equipment in the metadata Not, it distinguishes.
In some embodiment of the invention, whether carried according to the self-contained metadata of disk, the new insertion disk of identification The step of data, specifically includes:
Judge whether disk carries metadata, if disk carries metadata, identifies the carrying data of disk;If disk is not Metadata is carried, but there is file system, then identifies that disk carries data.
In the specific embodiment of the invention, the storage system mark in the configuration file of storage equipment, when disk is deposited at this It is established in storage equipment after subregion, creation memory space, the system banner of the storage equipment can be written into the metadata of disk, Metadata as disk identifies, and the system banner of different storage device is generally different, thus, according to the metadata mark of disk Know, so that it may learn whether data source that disk currently carries is storage equipment that disk is newly inserted into, to learn disk Whether type is to store the own disk of equipment.
In the specific embodiment of the invention, magnetic disk metadata includes metadata UUID (Universally Unique Identifier, Universally Unique Identifier), RAID information;The RAID information further comprise RAID title, RAID level, File system indicator, RAID number of members, RAID member's size and each subregion UUID.Wherein, the entitled disk of RAID Array title, RAID level can be LINEAR, RAID0, RAID1, RAID5, RAID6, RAID10 etc..RAID number of members, RAID member's size is used to indicate the number of partitions, each partition size of disk array.For example, be respectively 100 with size, 200, 300 three partition creatings, one RAID, then it is 100 that RAID number of members, which is 3, RAID member's size,.It is each on same disk Subregion all has different Universally Unique Identifier UUID.When a disk carry out subregion on a storage device and construct RAID it Afterwards, storage equipment can assign the magnetic disk metadata, and the metadata UUID and memory apparatus system UUID mono- that disk is endowed It causes, after the disk is extracted from storage equipment later, if disk is not formatted as blank disc, the metadata of disk can be always It is retained on disk.
In the specific embodiment of the invention, the disk being plugged into storage equipment is divided into data disks, compatible disc, user Disk, blank disc.Data disks: including metadata information, and metadata mark UUID and current system UUID matches;Compatible disc: Comprising metadata information, but metadata mark UUID and current system UUID is mismatched;User disk: not including metadata information, It but include file system, data need to retain;Blank disc: not including metadata information, does not include file system yet.When disk is inserted It is connected in storage equipment, storage equipment judges metadata UUID and the storage of disk by metadata entrained by identification disk Whether the system UUID of equipment is consistent, if the metadata UUID of disk is consistent with the storage system UUID of equipment, then the disk For data disks;If disk has metadata but metadata UUID and the system UUID of storage equipment are inconsistent, then the disk is Compatible disc, the i.e. disk may be to pull from other storage equipment, and upper the one of the disk institute grafting stores equipment pair The disk has carried out subregion;If disk does not have metadata but has file system, then the disk is user disk, the i.e. magnetic Disk may be to pull from other storage equipment, other storage equipment may be for example Windows system, linux system, MacOS (Apple Macintosh operating system) system etc.;And the storage equipment of the disk last time institute grafting is carrying out subregion to the disk or is writing Metadata is not assigned to the disk when entering data, from the storage of the systems such as Windows system, linux system, MacOS system The disk pulled in equipment can not have metadata proposed by the invention;If disk does not have metadata or file system System does not carry data then the disk is blank disc, the problem of loss of data is not present on being plugged into new storage equipment. In embodiments of the present invention, the affiliated type of disk is changed as the management of memory space operates.The state of disk type Transfer figure such as Fig. 2 shows, in Fig. 2, " being placed in other storage equipment ", which refers to, uses method provided by the invention to assign member for disk The storage equipment of data, and the storage equipment not with systems such as Windows, Linux, MacOS in the prior art.Than Such as, the old disk of user, retains by data, is then changed into user disk;When user is not desired to retain the data in user disk again When, user disk can be deleted, at this moment the disk is then changed into blank disc, and after creating memory space on blank disc, the disk is again It is changed into data disks.
In a specific embodiment of the present invention, the metadata further includes the letters such as version number, check value, metadata signature Breath, for verifying the validity of metadata when identification parses metadata.
Disk carries the case where data including two kinds: first is that, disk carries metadata;At this moment the data carried in disk are Our own equipment creation, include RAID in disk, again includes file system in RAID;Second is that disk directly carries text Part system;At this moment the data carried in disk are other systems (such as Windows, Linux, MacOS etc.) creations.It is described to incite somebody to action Carry specifically includes file system in new insertion disk at the step of share directory on a storage device:
If the disk that is newly inserted into carries metadata, by the disk array RAID of new insertion disk it is file system mounted at Share directory;
If the disk being newly inserted into does not carry metadata but carries file system, by new insertion disk it is file system mounted at Share directory.
In some embodiment of the invention, the step of retaining the data in new insertion disk, specifically includes:
All disks of scanning storage equipment, obtain the partition list in system under current state;
If the disk being newly inserted into carries metadata, according to metadata entrained by new insertion disk, acquisition is described newly to be inserted Enter the subregion Universally Unique Identifier UUID of the disk array RAID member in disk;According to the partition list and the subregion Universally Unique Identifier UUID finds point under the corresponding system current state of the subregion Universally Unique Identifier UUID Area;In the storage equipment, the disk array RAID in new insertion disk is re-assemblied out;According to the RAID re-assemblied out Hanging equipment sets out share directory;
If the disk being newly inserted into does not carry metadata, by the subregion carry in partition list at share directory.
The step of going out share directory according to the RAID device carry re-assemblied out specifically includes:
The system of the metadata Universally Unique Identifier UUID and storage equipment that include in the metadata entrained by the disk When Universally Unique Identifier UUID is consistent, the disk array RAID carry re-assemblied out at memory space, then from storage Share directory is recovered in space;
The system of the metadata Universally Unique Identifier UUID and storage equipment that include in the metadata entrained by the disk When Universally Unique Identifier UUID is inconsistent, the disk array RAID carry re-assemblied out at share directory.
In some embodiment of the invention, when the creation memory space trigger condition for reaching setting or receive user send Memory space create instruction when, execute following steps:
The blank disc of storage equipment is chosen, and subregion is carried out to the blank disc chosen, obtains newly created disk point Area;
As unit of newly created disk partition, soft magnetism disk array RAID is created;
File system is created on the soft magnetism disk array RAID;
The soft magnetism disk array RAID information is saved in first number of blank disc together with the metadata mark of blank disc In, to update the metadata of blank disc;
By the meta-data preservation of updated blank disc in the system configuration file of storage equipment.
The step of as unit of newly created disk partition, creation soft magnetism disk array RAID, specifically includes:
The first subregion is constructed on the blank disc chosen, then disk array RAID is constructed for member with the first subregion, is made For reliable memory space;And the second subregion is constructed on the blank disc chosen, then disk battle array is constructed for member with the second subregion RAID is arranged, as unreliable memory space;
The reliable memory space storing data, the disk array RAID used in such a way that there is data redundancy ability It include: RAID1 or RAID5 or RAID6 or RAID10;The unreliable memory space does not have data redundancy ability, uses Disk array RAID include: RAID0 or linear formula storage LINEAR.
In a specific embodiment of the present invention, reliable RAID memory space is built-up by the subregion of different disk, can The RAID level of choosing has RAID1, RAID5, RAID6, RAID10;Insecure RAID memory space is by individual one on disk Subregion building, optional RAID level have RAID0, LINEAR (linear formula storage).The partition size in reliable memory space can be with It flexibly determines as needed: 30% or 20% as disk total capacity may be selected;It may be alternatively provided as a fixed size, such as 300G, 500G etc..Here " reliable " and " unreliable " is to measure the case where disk failures, loss.Reliable memory is empty Between in data, its storage this disk in lose in the case where, additionally it is possible to identical backup is found in other disks Data.For example, constructing a reliable memory space in two disks A, B, the reliable memory space is by identical in two disks The space of size or different size of space are constituted, can simultaneously when the reliable memory space of data deposit disk A or disk B It is stored in the reliable memory space of disk B or disk A, when disk A or disk B is damaged, the reliable memory of disk B or disk A are empty Between in identical copy data still be able to call, thus guarantee data storage reliability.
In a specific embodiment of the invention, metadata is placed on the position that disk most starts, then each disk It is divided into the area Liang Ge, first subregion occupies the certain percentage of total capacity, such as 30%;Second subregion is the 70% of total capacity. The combination of reliable memory spatial choice RAID1, the combination of unreliable memory space selection RAID0.Disk two-by-two into Row combination, can be divided into two kinds of situations according to the quantity of the disk in system:
Fig. 3 A is the situation that even number disk is shared in system.At this moment one can be constructed between two disks reliably to deposit Store up space, two unreliable memory spaces.The capacity in reliable memory space is the 30% of disk size, and each unreliable storage is empty Between capacity be disk size 70%.At this moment reliable memory space is that had truly by two member compositions Data redundancy ability.In the case where one disk failures, it is ensured that the data in reliable memory space are not lost.
Fig. 3 B is the situation for having odd number disk in system.At this moment first subregion still constructs RAID in the way of RAID1. At this moment only one member of reliable memory space cannot accomplish truly reliable.But when there is new disk insertion When, just increase new member to reliable memory space by the strategy of even number disk, realizes really reliable.That is, working as When having new disk insertion storage equipment, by 30% memory space of new disk together with first of disk shown in Fig. 3 B Together, as reliable memory space, new in disk 70% memory space of being inserted into is together with the of disk shown in Fig. 3 B for subregion Two subregions, respectively as unreliable memory space.
Assuming that a storage unit is made of two disks, the capacity of single disk is U, and reliable memory space uses The mode of RAID1, unreliable memory space is by the way of RAID0.So: in the above-described embodiments, with a subregion for one A storage cell constructs RAID, then can simultaneously obtain a reliable memory space, two unreliable memory spaces, total available sky Between are as follows: total size: 30%*U+70%*2*U=1.7U.And if being that a storage cell constructs RAID with a disk, it Obtain a reliable memory space;Obtain one or two unreliable memory spaces.If obtaining one reliably to deposit Space is stored up, then memory space total size is (U+U) * 50%=U;If obtaining one or two unreliable memory space, that Memory space total size are as follows: U+U=2U.
The reliable memory space number that can simultaneously obtain if the subregion to disk is thinner and unreliable memory space Number all can be more, and the size of total available space is also more flexible.
In some embodiment of the invention, the method also includes:
Receive the instruction for deleting memory space;
According to the instruction for deleting memory space, memory space is unloaded;
Stop the corresponding soft magnetism disk array RAID of memory space for needing to delete;
Remove the super block message of disk array RAID and metadata of each disk in soft magnetism disk array RAID;
The corresponding metadata of the memory space is deleted in system configuration file;
Other disk arrays are not present in equipment if storing, deletion system identifies in system configuration file.
In some embodiment of the invention, the method also includes:
Receive the instruction for deleting disk;
Unload file system all on disk to be deleted;
If the metadata mark of disk to be deleted is different from the storage metadata mark of equipment, stop disk to be deleted On soft magnetism disk array RAID, remove the super block message of disk array RAID on disk to be deleted and its metadata carried Information.
In some embodiment of the invention, the disk array RAID member of new insertion disk itself is hung on a storage device After carrying into share directory, further includes:
Using the share directory, transmitted between the disk that storage equipment has disk and is newly inserted by disk interface Data.
Under practical application scene, user newly buys a family storage equipment, but at this moment have existed in user family compared with A large amount of data with existing, such as photo, video, document.For traditional household NAS (Network Attached Storage, Network attached storage) equipment, at this moment can only by way of network or the mode of USB external tapping data with existing moved into it is new Storage center.If data volume has the even upper T of several hundred G, data transmission will be taken a substantial amount of time.It can be propped up using the present invention The characteristic for holding user data disk is greatly improved the efficiency of migration of subscriber data.
In the specific embodiment of the invention, firstly, creating memory space on the existing disk of storage equipment, then depositing Storage is spatially created that share directory;Then user data disk is inserted into storage equipment, selects data to retain, the use being newly inserted into User data disk carry becomes share directory.Share directory is exactly the basic unit that user can directly operate, so, at this moment only need Data copy is done between both share directories just, and this copy is exactly on same system between different disk Data to copying, data transmission period largely shortens.
Equipment is stored for others, to the data in old disk are imported into storage system, it is necessary to first magnetic Disk is linked into another computer, then allows data in the computer reading disk, then data are transferred to by network and are deposited Storage system is finally saved in data in memory space by storage system.This mode data need the reading by computer, Network transmission, the process of storage system write-in, process is tediously long, and data transmission efficiency is low.
And the Data Migration mode that the above embodiment of the present invention uses because in same system, user data disk with It is shared system bus (such as PCI:Peripheral Component Interconnect, peripheral hardware between memory space data disks Component connection standard), so can almost reach disk interface, such as SATA (Serial Advanced Technology Attachment, Serial Advanced Technology Attachment), (Integrated Drive Electronics, integrated driving electronics are set IDE It is standby) maximum rate.Be far from its transmission speed USB interface, network interface can ratio.For supporting the SATA of hot plug Disk, moreover it is possible to accomplish as USB device easily plug and play, greatly improve the use feeling of user.
Further, the present invention provides a kind of disk storage space managing device, and structure is as shown in Figure 4, comprising:
Insertion operation identification module: the operation of disk insertion storage equipment for identification;
Data identification module: for the metadata and file system self-contained according to disk, new insertion disk is identified Whether data are carried;
Data reservation module: for according to the instruction of user, retaining new insertion magnetic when the disk being newly inserted into carries data Data in disk;
Catalogue carry module: for by the file system in new insertion disk on a storage device carry at share directory.
In some embodiment of the invention, the data identification module specifically includes:
First recognition unit: for when determining disk carrying metadata, then identifying the carrying data of disk;
Second recognition unit: for not carrying metadata when determining disk, but there is file system, then identifies that disk carries Data.
In some embodiment of the invention, the catalogue carry module specifically includes:
First share directory carry unit: for will newly be inserted into magnetic in the case where the disk being newly inserted into carries metadata It is file system mounted at share directory in the disk array RAID of disk;
Second share directory carry unit: for not carrying metadata in the disk being newly inserted into but carrying the feelings of file system Under condition, by the file system mounted at share directory of new insertion disk.
In some embodiment of the invention, the data reservation module specifically includes:
Partition list obtains module: for scanning all disks of storage equipment, obtaining point in system under current state Area's list;
Universally Unique Identifier UUID acquiring unit: for when the disk being newly inserted into carries metadata, then being inserted according to new Enter metadata entrained by disk, obtains the general unique identification of subregion of the disk array RAID member in the new insertion disk Code UUID;And trigger subregion searching unit;
Subregion searching unit: for finding according to the partition list and the subregion Universally Unique Identifier UUID Subregion under the corresponding system current state of the subregion Universally Unique Identifier UUID;And trigger RAID assembling unit;
RAID assembling unit: in the storage equipment, re-assemblying out the disk array in new insertion disk RAID;And trigger share directory the first carry unit;
Share directory the first carry unit: for going out share directory according to the RAID device carry re-assemblied out;
Share directory the second carry unit:, will be in partition list if the disk for being newly inserted into does not carry metadata Subregion carry is at share directory.
In some embodiment of the invention, the first carry of share directory unit specifically includes:
Memory space carry subelement: for working as the general unique identification of metadata for including in metadata entrained by disk When code UUID is consistent with the storage system Universally Unique Identifier UUID of equipment, the disk array RAID carry re-assemblied out At memory space, then triggers share directory and reply subelement;
Share directory restores subelement: for recovering share directory from memory space;
Share directory carry subelement: for working as the general unique identification of metadata for including in metadata entrained by disk When the code UUID and system Universally Unique Identifier UUID of storage equipment inconsistent, the disk array RAID re-assemblied out is hung Carry into share directory.
In some embodiment of the invention, described device further include:
Blank disc division module: it is sent for working as to reach the creation memory space trigger condition of setting or receive user Memory space when creating instruction, choose the blank disc of storage equipment, and subregion is carried out to the blank disc chosen, obtain new The disk partition of creation;
Soft magnetism disk array RAID creation module: for creating soft magnetism disk array as unit of newly created disk partition RAID;
File system creation module: for creating file system on the soft magnetism disk array RAID;
Metadata updates module: it is protected for identifying the soft magnetism disk array RAID information together with the metadata of blank disc It is stored in the metadata of blank disc, to update the metadata of blank disc;
Meta-data preservation module: for by the meta-data preservation of updated blank disc storage equipment system configuration In file.
In some embodiment of the invention, the soft magnetism disk array RAID creation module specifically includes:
Reliable subregion construction unit: for constructing the first subregion on the blank disc chosen;
Reliable memory space construction unit: for being that member constructs disk array RAID with the first subregion, as reliably depositing Store up space;
Unreliable subregion construction unit: for constructing the second subregion on the blank disc chosen;
Unreliable memory space construction unit: it is that member constructs disk array RAID with the second subregion, is deposited as unreliable Store up space;
The reliable memory space storing data, the disk array RAID used in such a way that there is data redundancy ability It include: RAID1 or RAID5 or RAID6 or RAID10;The unreliable memory space does not have data redundancy ability, uses Disk array RAID include: RAID0 or linear formula storage LINEAR.
In some embodiment of the invention, described device further include:
Delete memory space command reception module: for receiving the instruction for deleting memory space;
Memory space Unload module: for unloading memory space according to the instruction for deleting memory space;
Disk array RAID stopping modular: the corresponding disk array RAID of memory space for stopping needing to delete;
First disk array RAID information removes module: removing the disk array of each disk in disk array RAID The super block message of RAID and metadata;
Metadata removing module: for deleting the corresponding metadata of the memory space in system configuration file;
System banner removing module: if other disk arrays are not present in equipment for storing, in system configuration file Deletion system mark.
In some embodiment of the invention, described device further include:
Delete disk command reception module: for receiving the instruction for deleting disk;
File system Unload module: for unloading file system all on disk to be deleted;
Disk array RAID stopping modular: the metadata for metadata mark and storage equipment when disk to be deleted When identifying different, stop the disk array RAID on disk to be deleted;
Second disk array RAID information removes module: for removing the disk array RAID superblock on disk to be deleted Information and its metadata information carried.
In some embodiment of the invention, described device further include: use the share directory, have magnetic in storage equipment Data are transmitted by disk interface between disk and the disk being newly inserted into.
Further, the present invention also provides a kind of storage equipment, and the disk including this for storing data, further includes the present invention Storage space management device provided by any one embodiment.
It should be appreciated that multiple embodiments described in this specification are merely to illustrate and explain the present invention, it is not used to limit The fixed present invention.And in the absence of conflict, the features in the embodiments and the embodiments of the present application can be combined with each other.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.

Claims (19)

1.一种磁盘存储空间管理方法,其特征在于,包括如下步骤:1. a disk storage space management method, is characterized in that, comprises the steps: 识别磁盘插入存储设备的操作;Identify the operation of inserting a disk into a storage device; 根据磁盘自身携带的元数据和文件系统,识别新插入磁盘的是否携带数据;According to the metadata and file system carried by the disk itself, identify whether the newly inserted disk carries data; 当新插入的磁盘携带数据时,根据用户的指令,保留新插入磁盘中的数据,包括:扫描存储设备的所有磁盘,得到系统中当前状态下的分区列表;若新插入的磁盘携带元数据,则根据新插入磁盘所携带的元数据,获得所述新插入磁盘中的磁盘阵列RAID成员的分区通用唯一识别码UUID;根据所述分区列表和所述分区通用唯一识别码UUID,查找到所述分区通用唯一识别码UUID对应的系统当前状态下的分区;在所述存储设备上,重新组装出新插入磁盘中的磁盘阵列RAID;根据重新组装出的RAID设备挂载出共享目录;若新插入的磁盘不携带元数据,则将分区列表中的分区挂载成共享目录;When the newly inserted disk carries data, according to the user's instruction, the data in the newly inserted disk is retained, including: scanning all disks of the storage device to obtain the partition list in the current state of the system; if the newly inserted disk carries metadata, Then, according to the metadata carried by the newly inserted disk, obtain the partition universal unique identifier UUID of the disk array RAID member in the newly inserted disk; according to the partition list and the partition universal unique identifier UUID, find the The partition in the current state of the system corresponding to the partition universal unique identifier UUID; on the storage device, reassemble the disk array RAID newly inserted into the disk; mount the shared directory according to the reassembled RAID device; If the disk does not carry metadata, mount the partition in the partition list as a shared directory; 将新插入磁盘中的文件系统在存储设备上挂载成共享目录。Mount the newly inserted file system on the disk as a shared directory on the storage device. 2.根据权利要求1所述的方法,其特征在于,根据磁盘自身携带的元数据、识别新插入磁盘是否携带数据的步骤具体包括:2. The method according to claim 1, wherein the step of identifying whether the newly inserted disk carries data according to the metadata carried by the disk itself specifically comprises: 判断磁盘是否携带元数据,若磁盘携带元数据,则识别磁盘的携带数据;若磁盘不携带元数据,但具有文件系统,则识别磁盘携带数据。Determine whether the disk carries metadata. If the disk carries metadata, identify the data carried on the disk; if the disk does not carry metadata, but has a file system, identify the data carried on the disk. 3.根据权利要求2所述的方法,其特征在于,所述将新插入磁盘中的文件系统在存储设备上挂载成共享目录的步骤具体包括:3. The method according to claim 2, wherein the step of mounting the file system newly inserted into the disk into a shared directory on the storage device specifically comprises: 若新插入的磁盘携带元数据,将新插入磁盘的磁盘阵列RAID中的文件系统挂载成共享目录;If the newly inserted disk carries metadata, mount the file system in the RAID array of the newly inserted disk as a shared directory; 若新插入的磁盘不携带元数据但携带文件系统,将新插入磁盘的文件系统挂载成共享目录。If the newly inserted disk does not carry metadata but carries a file system, mount the file system of the newly inserted disk as a shared directory. 4.根据权利要求1所述的方法,其特征在于,根据重新组装出的RAID设备挂载出共享目录的步骤具体包括:4. The method according to claim 1, wherein the step of mounting the shared directory according to the reassembled RAID device specifically comprises: 当磁盘所携带的元数据中包含的元数据通用唯一识别码UUID与存储设备的系统通用唯一识别码UUID一致时,把重新组装出的磁盘阵列RAID挂载成存储空间,然后从存储空间中恢复出共享目录;When the metadata UUID contained in the metadata carried by the disk is consistent with the system universal unique identifier UUID of the storage device, mount the reassembled disk array RAID as a storage space, and then restore from the storage space out the shared directory; 当磁盘所携带的元数据中包含的元数据通用唯一识别码UUID与存储设备的系统通用唯一识别码UUID不一致时,把重新组装出的磁盘阵列RAID挂载成共享目录。When the metadata universal unique identifier UUID contained in the metadata carried by the disk is inconsistent with the system universal unique identifier UUID of the storage device, mount the reassembled disk array RAID as a shared directory. 5.根据权利要求1所述的方法,其特征在于,当达到设定的创建存储空间触发条件或接收到用户发送的存储空间创建指令时,执行如下步骤:5. method according to claim 1, is characterized in that, when reaching the creation storage space trigger condition of setting or receiving the storage space creation instruction that user sends, execute the following steps: 选中存储设备的空白磁盘,并对选中的空白磁盘进行分区,得到新创建的磁盘分区;Select the blank disk of the storage device, and partition the selected blank disk to obtain the newly created disk partition; 以新创建的磁盘分区为单位,创建软磁盘阵列RAID;Create a floppy disk array RAID with the newly created disk partition as a unit; 在所述软磁盘阵列RAID上创建文件系统;creating a file system on the floppy disk array RAID; 将所述软磁盘阵列RAID信息连同空白磁盘的元数据标识保存到空白磁盘的元数据中,以更新空白磁盘的元数据;saving the RAID information of the floppy disk array together with the metadata identification of the blank disk into the metadata of the blank disk to update the metadata of the blank disk; 将更新后的空白磁盘的元数据保存在存储设备的系统配置文件中。Save the metadata of the updated blank disk in the system configuration file of the storage device. 6.根据权利要求5所述的方法,其特征在于,以新创建的磁盘分区为单位、创建软磁盘阵列RAID的步骤具体包括:6. method according to claim 5, is characterized in that, with the newly created disk partition as unit, the step of creating floppy disk array RAID specifically comprises: 在选中的空白磁盘上构建第一分区,再以第一分区为成员构建磁盘阵列RAID,作为可靠存储空间;并在选中的空白磁盘上构建第二分区,再以第二分区为成员构建磁盘阵列RAID,作为不可靠存储空间;Build the first partition on the selected blank disk, and then use the first partition as a member to build a disk array RAID as a reliable storage space; and build a second partition on the selected blank disk, and then use the second partition as a member to build a disk array RAID, as unreliable storage space; 所述可靠存储空间采用具有数据冗余能力的方式存储数据,使用的磁盘阵列RAID包括:RAID1、或RAID5、或RAID6、或RAID10;所述不可靠存储空间不具有数据冗余能力,使用的磁盘阵列RAID包括:RAID0、或线性式存储LINEAR。The reliable storage space stores data in a way with data redundancy capability, and the used disk array RAID includes: RAID1, or RAID5, or RAID6, or RAID10; the unreliable storage space does not have data redundancy capability, and the used disks Array RAID includes: RAID0, or linear storage LINEAR. 7.根据权利要求1所述的方法,其特征在于,所述方法还包括:7. The method of claim 1, wherein the method further comprises: 接收到删除存储空间的指令;Receive an instruction to delete storage space; 根据所述删除存储空间的指令,卸载存储空间;According to the instruction for deleting the storage space, unload the storage space; 停止需要删除的存储空间对应的磁盘阵列RAID;Stop the disk array RAID corresponding to the storage space to be deleted; 清除磁盘阵列RAID中的各个磁盘的磁盘阵列RAID超级块信息和元数据;Clear the disk array RAID super block information and metadata of each disk in the disk array RAID; 在系统配置文件中删除所述存储空间对应的元数据;Delete the metadata corresponding to the storage space in the system configuration file; 若存储设备中不存在其它磁盘阵列,在系统配置文件中删除系统标识。If there are no other disk arrays in the storage device, delete the system ID in the system configuration file. 8.根据权利要求1所述的方法,其特征在于,所述方法还包括:8. The method of claim 1, wherein the method further comprises: 接收到删除磁盘的指令;Receive an instruction to delete the disk; 卸载待删除的磁盘上所有的文件系统;Unmount all file systems on the disk to be deleted; 若待删除的磁盘的元数据标识与存储设备的元数据标识不同,则停止待删除磁盘上的磁盘阵列RAID,清除待删除磁盘上的磁盘阵列RAID超级块信息以及其携带的元数据信息。If the metadata identifier of the disk to be deleted is different from the metadata identifier of the storage device, the disk array RAID on the disk to be deleted is stopped, and the disk array RAID super block information and the metadata information carried by the disk array RAID on the disk to be deleted are cleared. 9.根据权利要求1所述的方法,其特征在于,将新插入磁盘本身的磁盘阵列RAID成员在存储设备上挂载成共享目录之后,还包括:9. The method according to claim 1, wherein after the newly inserted disk array RAID member of the disk itself is mounted as a shared directory on the storage device, the method further comprises: 使用所述共享目录,在存储设备已有磁盘和新插入的磁盘之间通过磁盘接口传输数据。Using the shared directory, data is transferred through the disk interface between the existing disk of the storage device and the newly inserted disk. 10.一种磁盘存储空间管理装置,其特征在于,包括:10. A disk storage space management device, comprising: 插入操作识别模块:用于识别磁盘插入存储设备的操作;Insertion operation identification module: used to identify the operation of inserting a disk into a storage device; 数据识别模块:用于根据磁盘自身携带的元数据和文件系统,识别新插入磁盘的是否携带数据;Data identification module: used to identify whether the newly inserted disk carries data according to the metadata and file system carried by the disk itself; 数据保留模块:用于当新插入的磁盘携带数据时,根据用户的指令,保留新插入磁盘中的数据;所述数据保留模块具体包括:Data retention module: when the newly inserted disk carries data, according to the user's instruction, retain the data newly inserted into the disk; the data retention module specifically includes: 分区列表获得模块:用于扫描存储设备的所有磁盘,得到系统中当前状态下的分区列表;Partition list acquisition module: used to scan all disks of the storage device to obtain the partition list in the current state of the system; 通用唯一识别码UUID获取单元:用于当新插入的磁盘携带元数据时,则根据新插入磁盘所携带的元数据,获得所述新插入磁盘中的磁盘阵列RAID成员的分区通用唯一识别码UUID;并触发分区查找单元;Universal unique identifier UUID obtaining unit: used to obtain the partition universal unique identifier UUID of the disk array RAID member in the newly inserted disk according to the metadata carried by the newly inserted disk when the newly inserted disk carries metadata ; and trigger the partition search unit; 分区查找单元:用于根据所述分区列表和所述分区通用唯一识别码UUID,查找到所述分区通用唯一识别码UUID对应的系统当前状态下的分区;并触发RAID组装单元;Partition search unit: for finding the partition in the current state of the system corresponding to the partition universal unique identifier UUID according to the partition list and the partition universal unique identifier UUID; and triggering the RAID assembly unit; RAID组装单元:用于在所述存储设备上,重新组装出新插入磁盘中的磁盘阵列RAID;并触发共享目录第一挂载单元;RAID assembly unit: used to reassemble the disk array RAID newly inserted into the disk on the storage device; and trigger the first mount unit of the shared directory; 共享目录第一挂载单元:用于根据重新组装出的RAID设备挂载出共享目录;The first mounting unit of the shared directory: used to mount the shared directory according to the reassembled RAID device; 共享目录第二挂载单元:用于若新插入的磁盘不携带元数据,则将分区列表中的分区挂载成共享目录;Shared directory second mounting unit: used to mount the partitions in the partition list as a shared directory if the newly inserted disk does not carry metadata; 目录挂载模块:用于将新插入磁盘中的文件系统在存储设备上挂载成共享目录。Directory mount module: used to mount the file system newly inserted into the disk as a shared directory on the storage device. 11.根据权利要求10所述的装置,其特征在于,所述数据识别模块具体包括:11. The device according to claim 10, wherein the data identification module specifically comprises: 第一识别单元:用于当确定磁盘携带元数据,则识别磁盘的携带数据;The first identification unit: used to identify the data carried by the disk when it is determined that the disk carries metadata; 第二识别单元:用于当确定磁盘不携带元数据,但具有文件系统,则识别磁盘携带数据。The second identification unit is used to identify that the disk carries data when it is determined that the disk does not carry metadata but has a file system. 12.根据权利要求11所述的装置,其特征在于,所述目录挂载模块具体包括:12. The apparatus according to claim 11, wherein the directory mounting module specifically comprises: 第一共享目录挂载单元:用于在新插入的磁盘携带元数据的情况下,将新插入磁盘的磁盘阵列RAID中的文件系统挂载成共享目录;The first shared directory mounting unit: used to mount the file system in the disk array RAID of the newly inserted disk into a shared directory when the newly inserted disk carries metadata; 第二共享目录挂载单元:用于在新插入的磁盘不携带元数据但携带文件系统的情况下,将新插入磁盘的文件系统挂载成共享目录。The second shared directory mounting unit: used to mount the file system of the newly inserted disk into a shared directory when the newly inserted disk does not carry metadata but carries a file system. 13.根据权利要求10所述的装置,其特征在于,所述共享目录第一挂载单元具体包括:13. The apparatus according to claim 10, wherein the first mounting unit of the shared directory specifically comprises: 存储空间挂载子单元:用于当磁盘所携带的元数据中包含的元数据通用唯一识别码UUID与存储设备的系统通用唯一识别码UUID一致时,把重新组装出的磁盘阵列RAID挂载成存储空间,然后触发共享目录回复子单元;Storage space mounting sub-unit: used to mount the reassembled disk array RAID as storage space, and then trigger the shared directory reply subunit; 共享目录恢复子单元:用于从存储空间中恢复出共享目录;Shared directory recovery subunit: used to recover the shared directory from the storage space; 共享目录挂载子单元:用于当磁盘所携带的元数据中包含的元数据通用唯一识别码UUID与存储设备的系统通用唯一识别码UUID不一致时,把重新组装出的磁盘阵列RAID挂载成共享目录。Shared directory mount subunit: used to mount the reassembled disk array RAID as Shared directory. 14.根据权利要求10所述的装置,其特征在于,所述装置还包括:14. The apparatus of claim 10, wherein the apparatus further comprises: 空白磁盘分区模块:用于当达到设定的创建存储空间触发条件或接收到用户发送的存储空间创建指令时,选中存储设备的空白磁盘,并对选中的空白磁盘进行分区,得到新创建的磁盘分区;Blank disk partition module: When the set trigger condition for creating storage space is reached or the storage space creation instruction sent by the user is received, the blank disk of the storage device is selected, and the selected blank disk is partitioned to obtain a newly created disk. partition; 软磁盘阵列RAID创建模块:用于以新创建的磁盘分区为单位,创建软磁盘阵列RAID;floppy disk array RAID creation module: used to create a floppy disk array RAID with the newly created disk partition as a unit; 文件系统创建模块:用于在所述软磁盘阵列RAID上创建文件系统;File system creation module: used to create a file system on the floppy disk array RAID; 元数据更新模块:用于将所述软磁盘阵列RAID信息连同空白磁盘的元数据标识保存到空白磁盘的元数据中,以更新空白磁盘的元数据;Metadata updating module: for storing the RAID information of the floppy disk array together with the metadata identification of the blank disk in the metadata of the blank disk, to update the metadata of the blank disk; 元数据保存模块:用于将更新后的空白磁盘的元数据保存在存储设备的系统配置文件中。Metadata saving module: used to save the metadata of the updated blank disk in the system configuration file of the storage device. 15.根据权利要求14所述的装置,其特征在于,所述软磁盘阵列RAID创建模块具体包括:15. The apparatus according to claim 14, wherein the floppy disk array RAID creation module specifically comprises: 可靠分区构建单元:用于在选中的空白磁盘上构建第一分区;Reliable partition building unit: used to build the first partition on the selected blank disk; 可靠存储空间构建单元:用于以第一分区为成员构建磁盘阵列RAID,作为可靠存储空间;Reliable storage space construction unit: used to build a disk array RAID with the first partition as a member, as a reliable storage space; 不可靠分区构建单元:用于在选中的空白磁盘上构建第二分区;Unreliable partition building unit: used to build a second partition on the selected blank disk; 不可靠存储空间构建单元:以第二分区为成员构建磁盘阵列RAID,作为不可靠存储空间;Unreliable storage space construction unit: use the second partition as a member to build a disk array RAID as an unreliable storage space; 所述可靠存储空间采用具有数据冗余能力的方式存储数据,使用的磁盘阵列RAID包括:RAID1、或RAID5、或RAID6、或RAID10;所述不可靠存储空间不具有数据冗余能力,使用的磁盘阵列RAID包括:RAID0、或线性式存储LINEAR。The reliable storage space stores data in a way with data redundancy capability, and the used disk array RAID includes: RAID1, or RAID5, or RAID6, or RAID10; the unreliable storage space does not have data redundancy capability, and the used disks Array RAID includes: RAID0, or linear storage LINEAR. 16.根据权利要求10所述的装置,其特征在于,所述装置还包括:16. The apparatus of claim 10, wherein the apparatus further comprises: 删除存储空间指令接收模块:用于接收到删除存储空间的指令;Delete storage space instruction receiving module: used to receive an instruction to delete storage space; 存储空间卸载模块:用于根据所述删除存储空间的指令,卸载存储空间;Storage space unloading module: used to unload the storage space according to the instruction for deleting the storage space; 磁盘阵列RAID停止模块:用于停止需要删除的存储空间对应的磁盘阵列RAID;Disk array RAID stop module: used to stop the disk array RAID corresponding to the storage space to be deleted; 第一磁盘阵列RAID信息清除模块:清除磁盘阵列RAID中的各个磁盘的磁盘阵列RAID超级块信息和元数据;The first disk array RAID information clearing module: clears the disk array RAID super block information and metadata of each disk in the disk array RAID; 元数据删除模块:用于在系统配置文件中删除所述存储空间对应的元数据;Metadata deletion module: used to delete the metadata corresponding to the storage space in the system configuration file; 系统标识删除模块:用于若存储设备中不存在其它磁盘阵列,在系统配置文件中删除系统标识。System ID deletion module: used to delete the system ID in the system configuration file if there are no other disk arrays in the storage device. 17.根据权利要求10所述的装置,其特征在于,所述装置还包括:17. The apparatus of claim 10, wherein the apparatus further comprises: 删除磁盘指令接收模块:用于接收到删除磁盘的指令;Delete disk command receiving module: used to receive the command to delete the disk; 文件系统卸载模块:用于卸载待删除的磁盘上所有的文件系统;File system unloading module: used to unload all file systems on the disk to be deleted; 磁盘阵列RAID停止模块:用于当待删除的磁盘的元数据标识与存储设备的元数据标识不同时,停止待删除磁盘上的磁盘阵列RAID;Disk array RAID stop module: used to stop the disk array RAID on the disk to be deleted when the metadata identification of the disk to be deleted is different from the metadata identification of the storage device; 第二磁盘阵列RAID信息清除模块:用于清除待删除磁盘上的磁盘阵列RAID超级块信息以及其携带的元数据信息。The second disk array RAID information clearing module: used to clear the disk array RAID super block information on the disk to be deleted and the metadata information carried by the disk array. 18.根据权利要求10所述的装置,其特征在于,所述装置还包括:使用所述共享目录,在存储设备已有磁盘和新插入的磁盘之间通过磁盘接口传输数据。18 . The apparatus according to claim 10 , wherein the apparatus further comprises: using the shared directory to transmit data between the existing disk and the newly inserted disk in the storage device through a disk interface. 19 . 19.一种存储设备,其特征在于,包括用于存储数据的磁盘,还包括权利要求10-18中任意一项所述的磁盘存储空间管理装置。19. A storage device, characterized by comprising a magnetic disk for storing data, and further comprising the disk storage space management device according to any one of claims 10-18.
CN201510004657.XA 2015-01-05 2015-01-05 Disk storage space management method, device and storage device Expired - Fee Related CN105824572B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510004657.XA CN105824572B (en) 2015-01-05 2015-01-05 Disk storage space management method, device and storage device
PCT/CN2015/074030 WO2016110004A1 (en) 2015-01-05 2015-03-11 Management method and apparatus for disk storage space, and storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510004657.XA CN105824572B (en) 2015-01-05 2015-01-05 Disk storage space management method, device and storage device

Publications (2)

Publication Number Publication Date
CN105824572A CN105824572A (en) 2016-08-03
CN105824572B true CN105824572B (en) 2019-06-04

Family

ID=56355445

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510004657.XA Expired - Fee Related CN105824572B (en) 2015-01-05 2015-01-05 Disk storage space management method, device and storage device

Country Status (2)

Country Link
CN (1) CN105824572B (en)
WO (1) WO2016110004A1 (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10365837B2 (en) * 2016-08-22 2019-07-30 Western Digital Technologies, Inc. Automatic RAID provisioning
CN107070972B (en) * 2016-12-30 2020-02-07 中国银联股份有限公司 Distributed file processing method and device
CN109144657B (en) * 2017-06-14 2023-10-13 中兴通讯股份有限公司 Method and device for sharing files across operating system platforms
CN107301106A (en) * 2017-06-28 2017-10-27 郑州云海信息技术有限公司 The restoration methods and device of a kind of RAID system failure
CN109976811B (en) * 2017-12-27 2020-11-17 株洲中车时代电气股份有限公司 Automatic mounting method of movable storage equipment and locomotive video monitoring system
CN110008064A (en) * 2019-04-10 2019-07-12 苏州浪潮智能科技有限公司 A kind of RAID restoration methods, device, equipment and medium
CN111475111A (en) * 2020-04-01 2020-07-31 苏州浪潮智能科技有限公司 A RAID group pairing method and device for avoiding destruction of hard disk data
CN112596678B (en) * 2020-12-24 2024-01-16 得一微电子股份有限公司 Storage device, firmware setting method thereof and repartitioning method thereof
CN113505111B (en) * 2021-06-22 2024-03-12 新华三大数据技术有限公司 Shared directory mounting method and distributed network additional storage system
CN114489945B (en) * 2022-01-25 2025-06-24 联想(北京)有限公司 Access control method and electronic device
CN114995760B (en) * 2022-05-31 2025-07-22 济南浪潮数据技术有限公司 Backup recovery method, device and medium
CN115686932B (en) * 2022-09-07 2023-06-23 安徽鼎甲计算机科技有限公司 Backup set file recovery method and device and computer equipment
CN115951845B (en) * 2023-03-14 2023-05-30 苏州浪潮智能科技有限公司 Disk management method, device, equipment and storage medium
CN116257326B (en) * 2023-05-11 2023-08-29 安徽海马云科技股份有限公司 Method and device for managing container storage space

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1808366A (en) * 2005-01-21 2006-07-26 英业达股份有限公司 Hard disk re-identification system and method in redundant array of cheap disks
CN101685379A (en) * 2008-09-27 2010-03-31 佛山市顺德区汉达精密电子科技有限公司 System and method for reconstructing disk array
CN102622315A (en) * 2012-02-24 2012-08-01 华为技术有限公司 Method, device and system for controlling disc visiting

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1312570C (en) * 2004-08-06 2007-04-25 威盛电子股份有限公司 Method and related device for performing hard disk array data migration
CN101556802B (en) * 2009-05-25 2011-04-13 杭州华三通信技术有限公司 RAID array transposing method and device thereof
CN102541475B (en) * 2012-03-12 2015-02-04 华为数字技术(成都)有限公司 Data storage method and data storage device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1808366A (en) * 2005-01-21 2006-07-26 英业达股份有限公司 Hard disk re-identification system and method in redundant array of cheap disks
CN101685379A (en) * 2008-09-27 2010-03-31 佛山市顺德区汉达精密电子科技有限公司 System and method for reconstructing disk array
CN102622315A (en) * 2012-02-24 2012-08-01 华为技术有限公司 Method, device and system for controlling disc visiting

Also Published As

Publication number Publication date
CN105824572A (en) 2016-08-03
WO2016110004A1 (en) 2016-07-14

Similar Documents

Publication Publication Date Title
CN105824572B (en) Disk storage space management method, device and storage device
CN106407040B (en) Method and system for remote data replication
US9690823B2 (en) Synchronizing copies of an extent in an append-only storage system
US10248356B2 (en) Using scratch extents to facilitate copying operations in an append-only storage system
US9569515B2 (en) Facilitating distributed deletes in a replicated storage system
EP2378437A1 (en) Data synchronization methods in communication systems
EP3125501A1 (en) File synchronization method, server, and terminal
CN105068856A (en) Mirror image snapshooting based on virtual machine backup system and backup method
US20160092125A1 (en) Constructing an index to facilitate accessing a closed extent in an append-only storage system
US20160092124A1 (en) Append-only storage system supporting open and closed extents
CN105187523B (en) A kind of directory access method and device
CN102821111A (en) Real-time synchronizing method for file cloud storage
CN105376277A (en) Data synchronization method and device
CN113688142B (en) Index management method, device, storage medium and electronic equipment
CN102142010A (en) Method and equipment for inputting data to multimedia service database on embedded equipment
CN102622315B (en) Method, device and system for controlling disc visiting
US20090150332A1 (en) Virtual file managing system and method for building system configuration and accessing file thereof
CN103176867A (en) Fast file differential backup method
CN109669621A (en) A kind of file management method, file management system, electronic equipment and storage medium
CN102377688B (en) File transmission method and equipment
US9875046B2 (en) Tape backup and restore in a disk storage environment with intelligent data placement
US20160037119A1 (en) Video recording apparatus, and video recording method when temporary network failure occurs
CN106453663B (en) Improved storage expansion method and device based on cloud service
TW201227268A (en) Data backup system and data backup and retrival method
CN103905694A (en) Key frame processing method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20190604