Storage system
By implementing page-level data management and garbage collection optimization of logical storage areas in the storage system, the problem of increasing garbage collection processing volume in snapshot operations is solved, and data processing performance and snapshot deletion efficiency are improved.
Patent Information
- Application Number
- CN202410152948.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-05-31
- Filing Date
- 2024-02-02
- Publication Date
- 2024-12-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
During snapshot operation, the garbage collection processing volume increases, affecting I/O performance, and additional GC processing is required after snapshot removal, further affecting performance.
In the storage system, data is managed through the page level of the logical storage area, allowing multiple volumes to share data, and moving invalid data from one volume to another page during garbage collection, freeing up storage areas, and setting some pages as external objects for garbage collection To avoid unnecessary data copying and page release.
Effectively manage memory, reduce GC processing volume, maintain I/O performance, improve snapshot and garbage collection efficiency, and reduce pressure on storage system capacity.
Smart Images

Figure CN119105694A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a storage system. Background Art
[0002] In recent years, the demand for data utilization has increased, and the opportunities for data replication have increased. As a result, the snapshot function has become increasingly important in storage systems. In the past, as a representative means of implementing snapshots, there was the Redirect on Write (RoW) method (for example, refer to Patent Document 1). The RoW method has the advantage of having little impact on I / O performance because there is no data replication during I / O. The RoW method is widely used in AFA (All Flash Array) devices.
[0003] The RoW method is a method of appending data. Append writing refers to a method of storing the written data in a new area without overwriting the old data stored before writing when writing data to the storage system, and rewriting the data storage method of the meta information by referring to the data stored in the new area. At this time, the old data before the update becomes invalid data called garbage. If the garbage increases due to the writing process, it will put pressure on the capacity of the storage system, so it is necessary to perform garbage collection (GC) to recycle the garbage and free up capacity to ensure the capacity of the storage system.
[0004] In the GC process, for each capacity management unit of the storage system, valid data other than garbage is copied to other areas, and a free area is secured by releasing the target area. When a snapshot is obtained from the copy source volume and written, the difference data between the copy source volume and the snapshot increases, and the valid data in the storage system also increases. In the prior art, there is a problem that due to the increase in the amount of valid data, the amount of valid data copied during GC execution also increases, and the GC processing amount increases, which affects the I / O performance.
[0005] In addition, if the snapshot is deleted, the differential data becomes garbage. In order to collect the garbage generated by deleting the snapshot and free up the capacity of the storage system, GC processing is also required. There is a problem that the I / O performance is affected by the operation of GC processing.
[0006] Patent Document 1: Japanese Patent Application Publication No. 2022-26812 Summary of the invention
[0007] The present invention has been made in view of the above-mentioned problems, and an object of the present invention is to suppress the GC processing amount when using a snapshot in a storage system and to maintain I / O performance.
[0008] In order to solve the above-mentioned problems, one of the representative storage systems of the present invention is a storage system, which comprises: a storage device; and a processor, which processes data input to or output from the storage device, wherein the processor performs the following processing: forming a page capable of storing a plurality of data in a logical storage area formed based on a physical storage area of the storage device; providing a volume, inputting data related to data input and output to the volume into or outputting data from a page of the logical storage area; mapping the data of the logical storage area from the volume; being able to release the storage area in units of the page; having a plurality of the volumes, and being able to share the data of the logical storage area; performing garbage collection, wherein the garbage collection deletes data that is not referenced from any of the plurality of volumes as invalid data, moves data referenced from any of the volumes to other pages, and releases the storage area of the page where the data is deleted and moved; and storing the plurality of data in the page as the move destination through the garbage collection, so that the plurality of data stored in the same page is mapped from the same volume.
[0009] In addition, one of the representative storage systems of the present invention is a storage system comprising: a storage device; and a processor that processes data input to or output from the storage device, wherein the processor performs the following processing: forming a page capable of storing a plurality of data in a logical storage area formed based on a physical storage area of the storage device; providing a volume, inputting data related to data input and output to the volume into or outputting data from a page of the logical storage area; mapping the data in the logical storage area from the volume; having a plurality of the volumes, and the plurality of the volumes being able to share the data in the logical storage area; performing garbage collection processing, the garbage collection processing deleting data that is not referenced from any of the plurality of volumes as invalid data, moving data referenced from any of the volumes to another page, and releasing the storage area of the page where the data is deleted and moved; and setting the page mapped from the same volume as an object of the garbage collection processing for all stored data, and, when one of the volumes that maps data of the page set as an object of the garbage collection processing is deleted, deleting the data to release the storage area of the page.
[0010] According to the present invention, it is possible to efficiently manage memory in a storage system and maintain data processing performance. Other problems, structures, and effects than those described above will become clear from the following description of the embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1It is a diagram showing a configuration example of a system including a storage system according to an embodiment.
[0012] Figure 2 This is a diagram showing an example of the structure of the memory of the first embodiment and the programs and management information in the memory.
[0013] Figure 3 This is a diagram showing an example of a logical structure within the storage system of the embodiment.
[0014] Figure 4 It is a diagram showing a detailed example of the logical structure in the storage system of the embodiment.
[0015] Figure 5 This is a diagram showing an example of a table of contents.
[0016] Figure 6 This is a diagram showing an example of a snapshot management volume mapping table.
[0017] Figure 7 This is a diagram showing an example of a mapping table for additional volumes.
[0018] Figure 8 This is a diagram showing an example of a volume management table.
[0019] Fig. 9 This is a diagram showing an example of a directory area allocation management table.
[0020] Fig.10 This is a diagram showing an example of a directory tree management table.
[0021] Fig.11 This is a diagram showing an example of a snapshot generation management table.
[0022] Fig.12 This is a diagram showing an example of a page conversion table.
[0023] Fig.13 It is a diagram showing an example of a page allocation management table.
[0024] Fig.14 It is a diagram showing an example of a sub-block management table.
[0025] Fig.15 It is a diagram showing an example of a search data management table.
[0026] Fig.16 This is a flowchart showing the processing procedure of the snapshot generation process.
[0027] Fig.17 This is a flowchart showing the processing procedure of the additional processing.
[0028] Fig.18 This is a flowchart showing the processing procedure of the reading process.
[0029] Fig.19 This is a flowchart showing the processing procedure of the front-end write processing.
[0030] Fig. 20 This is a flowchart showing the processing sequence of the back-end write process.
[0031] Fig.21 This is a flowchart showing the processing procedure of the snapshot data defragmentation process in the first embodiment.
[0032] Fig. 22 This is a flowchart showing the processing procedure of the data search process of the first embodiment.
[0033] Fig.23 This is a flowchart showing the processing procedure of the garbage collection process in the first embodiment.
[0034] Fig.24 This is a flowchart showing the processing procedure of snapshot deletion processing.
[0035] Fig.25 This is a diagram for explaining the effect of Example 1 (Part 1).
[0036] Fig.26 This is a diagram for explaining the effect of Example 1 (part 2).
[0037] Fig. 27 This is a flowchart showing the processing procedure of the data search process of the second embodiment.
[0038] Fig.28 This is a flowchart showing the processing procedure of the snapshot data defragmentation process according to the third embodiment.
[0039] Fig.29 This is a flowchart showing the processing procedure of the data copy processing in the third embodiment.
[0040] Explanation of symbols
[0041] 100 storage systems,
[0042] 102 server system,
[0043] 103 management system,
[0044] 110 storage controller,
[0045] 111 processor,
[0046] 112 memory,
[0047] 120PDEV,
[0048] 200 local storage,
[0049] 201 cache memory,
[0050] 203 shared memory,
[0051] 300 main volumes,
[0052] 301 snapshot,
[0053] 303 additional volume,
[0054] 304 pools,
[0055] 312 pages,
[0056] 401 snapshot management volume,
[0057] 402 Directory List,
[0058] 403 mapping table,
[0059] 404 Additional Area. DETAILED DESCRIPTION
[0060] In the following description, an "interface unit" may be more than one interface. The one or more interfaces may be more than one communication interface device of the same type (e.g., more than one NIC (Network Interface Card)) or more than two communication interface devices of different types (e.g., a NIC and an HBA (Host Bus Adapter)).
[0061] In the following description, a "memory unit" refers to one or more memories, and may be typically a main storage device. At least one memory in the memory unit may be a volatile memory or a nonvolatile memory.
[0062] In the following description, a "PDEV unit" is one or more PDEVs, which may be a secondary storage device. A "PDEV" refers to a physical storage device, which is typically a non-volatile storage device such as a HDD (Hard Disk Drive) or an SSD (Solid State Drive).
[0063] In the following description, the "storage unit" refers to at least one of the memory unit and at least a part of the PDEV unit (typically, at least the memory unit).
[0064] In the following description, a "processor unit" refers to one or more processors. The at least one processor is typically a microprocessor such as a CPU (Central Processing Unit), but may also be another type of processor such as a GPU (Graphics Processing Unit). The at least one processor may be a single-core or multi-core processor.
[0065] Furthermore, at least one processor may be a hardware circuit that performs a part or all of the processing (for example, a processor in a broad sense such as an FPGA (Field-Programmable Gate Array) or an ASIC (Application Specific Integrated Circuit)).
[0066] In the following description, sometimes the information of output obtained for input is described by expression such as "xxx table", but the information can be data of any structure, or a learning model such as a neural network that generates output for input. Therefore, "xxx table" can be referred to as "xxx information".
[0067] In the following description, the structure of each table is an example, and one table may be divided into two or more tables, or all or part of two or more tables may be one table.
[0068] In addition, in the following description, "program" is sometimes used as the subject to explain the processing, but the program is executed by the processor unit, thereby appropriately using the storage unit and / or interface unit to perform the determined processing, so the subject of the processing can also be the processor unit (or a device such as a controller having the processor unit).
[0069] The program can be installed in a device such as a computer, for example, it can also be in a program distribution server or a computer-readable (for example, non-temporary) recording medium. In addition, in the following description, more than two programs can be implemented as one program, and one program can be implemented as more than two programs.
[0070] In the following description, a "computer system" is a system including one or more physical computers. A physical computer may be a general-purpose computer or a special-purpose computer. A physical computer may function as a computer (e.g., a host computer) that issues an I / O (Input / Output) request, or may function as a computer (e.g., a storage device) that performs I / O of data in response to an I / O request.
[0071] That is, the computer system may be at least one of one or more host computers that issue I / O requests, i.e., a host system, and one or more storage devices that perform I / O of data in response to the I / O requests, i.e., a storage system. In at least one physical computer, one or more virtual computers (e.g., VMs (Virtual Machines)) may also be executed. A virtual computer may be a computer that issues an I / O request, or a computer that performs I / O of data in response to the I / O request.
[0072] In addition, the computer system may be a distributed system composed of one or more (typically a plurality of) physical node devices. The physical node device is a physical computer.
[0073] In addition, a physical computer (e.g., a node device) may be used to execute predetermined software, and SDx (Software-Defined anything) may be constructed in the physical computer or a computer system including the physical computer. As SDx, for example, SDS (Software Defined Storage) or SDDC (Software-defined Datacenter) may be used.
[0074] For example, a storage system as an SDS may be constructed by having a physical general-purpose computer execute software having a storage function.
[0075] In addition, at least one physical computer (e.g., a storage device) may also execute one or more virtual computers as a host system and a virtual computer as a storage controller (typically a device that inputs and outputs data to the PDEV unit in response to I / O requests) of the storage system.
[0076] In other words, such at least one physical computer may have both the function of at least a part of the host system and the function of at least a part of the storage system.
[0077] In addition, a computer system (typically, a storage system) may have a redundant structure group. The redundant structure may be a structure in multiple node devices such as Erasure Coding, RAIN (Redundant Array of Independent Nodes) and inter-node mirroring, or a structure in a single computer (e.g., a node device) such as one or more RAID (Redundant Array of Independent (or Inexpensive) Disks) groups that are at least a part of the PDEV unit.
[0078] In the following description, a "data set" refers to a block of logical electronic data viewed from a program such as an application program, and may be, for example, a record, a file, a key-value pair, or a tuple.
[0079] In the following description, identification numbers are used as identification information of various objects, but identification information of a type other than identification numbers (for example, identifiers including alphabetical letters or symbols) may be used.
[0080] In the following description, when describing the same kind of elements without distinguishing them from each other, reference symbols (or common symbols among reference symbols) are sometimes used, and when describing the same kind of elements by distinguishing them from each other, identification numbers of the elements (or reference symbols) are sometimes used.
[0081] For example, when describing the "page" as a unit of storage area without specifically distinguishing it, it is recorded as "page 312", and when describing the individual pages, the page number is sometimes used such as "page #0", "page #1", or reference symbols are used such as "page 312-0", "page 312-1".
[0082] [Example 1]
[0083] Below, use Figure 1 to Figure 26 Embodiment 1 of the present invention will be described.
[0084] Figure 1 1 is a diagram showing a configuration example of a system including a storage system 100 . The storage system 100 includes a plurality of (or one) PDEVs 120 and a storage controller 110 connected to the plurality of PDEVs 120 .
[0085] The storage controller 110 includes a SI / F 114, a MI / F 115, a PI / F 113, a memory 112, and a processor 111. The SI / F 114, the MI / F 115, and the PI / F 113 are examples of an interface unit. The memory 112 is an example of a storage unit.
[0086] The SI / F 114 is a communication interface device that mediates the exchange of data between the server system 102 and the storage controller 110. The server system 102 is connected to the SI / F 114 via a Fibre Channel (FC) network 104.
[0087] The server system 102 sends an I / O request (write request or read request) to the storage controller 110 that specifies an I / O destination (for example, a logical volume number such as LUN (Logical Unit Number) or a logical address such as LBA (Logical Block Address)).
[0088] The MI / F 115 is a communication interface device that mediates the exchange of data between the management system 103 and the storage controller 110. The management system 103 is connected to the MI / F 115 via an IP (Internet Protocol) network 105.
[0089] The network 104 and the network 105 may be the same communication network. The management system 103 manages the storage system 100 .
[0090] The PI / F 113 is a communication interface device that mediates data exchange between the plurality of PDEVs 120 and the storage controller 110 . The PI / F 113 is connected to a plurality of (or one) PDEVs 120 .
[0091] The memory 112 stores a program executed by the processor 111 and data used by the processor 111. The processor 111 executes the program stored in the memory 112. In the present embodiment, for example, a set of the memory 112 and the processor 111 is duplicated.
[0092] Figure 2 1 is a diagram showing an example of the structure of the memory 112 and the programs and management information in the memory 112. The memory 112 includes memory areas such as a local memory 200, a cache memory 201, and a shared memory 203. At least one of these memory areas may be an independent memory. The local memory 200 is used by the processor 111 belonging to the same group as the memory 112 including the local memory 200.
[0093] The local storage 200 stores a snapshot creation program 210, a reading program 211, a front-end writing program 212, a back-end writing program 213, a snapshot data defragmentation program 214, a garbage collection program 215, and a snapshot deletion program 216. These programs will be described later.
[0094] The cache memory 201 temporarily stores data sets to be written to or read from the PDEV 120 .
[0095] The shared memory 203 is used by both the processor 111 belonging to the same group as the memory 112 including the shared memory 203 and the processor 111 belonging to a different group. In the shared memory 203, management information is stored.
[0096] The management information includes a volume management table 220 , a directory area allocation management table 221 , a directory tree management table 222 , a snapshot generation management table 223 , a page conversion table 224 , a page allocation management table 225 , a sub-block management table 226 , and a search data management table 227 .
[0097] These tables will be described later with reference to the drawings.
[0098] Figure 3 This is a diagram showing an example of a logical structure in a storage system 100. The storage system 100 is a storage system that uses the RoW (Redirect on Write) method when generating a snapshot. The storage system 100 has a PVOL (Primary Volume) 300, a snapshot 301, an additional volume 303, a pool 304, and an RG (Raid Group) 305 as a logical structure.
[0099] PVOL300 is a logical volume provided to the host device, and stores write data or reads data and forwards it to the host device based on the read / write request of the host device. Snapshot 301 is a copy volume of PVOL300 generated by RoW method and provided to the host device. If snapshot 301 is in the "SUSPEND (split)" state after the data copy from PVOL300 is completed, it can also be read and written from the host device.
[0100] The additional volume 303 is a logical volume for additionally storing data written from the server system 102. One additional volume 303 is associated with one PVOL 300 and one or more snapshots 301.
[0101] The pool 304 is a logical storage area based on one or more RGs 305. The pool 304 is composed of a plurality of pages 312-i (i=0, 1, ..., n-1). The RG 305 is a space of a RAID group composed of a plurality of PDEVs 120.
[0102] An example of a snapshot 301 written to the SUSPEND (split) state is shown below.
[0103] When receiving a write request from the server system 102 , the storage controller 110 compresses the data set C to be written, and adds the compressed data set C′ to the page 312 - 1 allocated to the additional volume 303 corresponding to the snapshot 301 .
[0104] Pages 312 are allocated from pool 304 to additional volume 303, and the total capacity of the allocated pages 312 becomes the capacity used in storage system 100. That is, page 312-1 is page 312 allocated to additional volume 303 corresponding to snapshot 301, in other words, is page 312 allocated indirectly to snapshot 301.
[0105] The compressed data set C' is additionally stored in the page 312-1. The page allocated to the additional volume 303 (the page indirectly allocated to the snapshot 301) can be called an "additional page".
[0106] In the following description, the area occupied by the compressed data set in page 312-1 is referred to as "sub-block 313". A plurality of sub-blocks 313 are stored in page 312. Read processing / write processing based on a read / write request from the server system 102 is performed in units of the sub-block. In the case where all sub-blocks 313 in page 312 are unnecessary invalid data, the storage area is released in units of pages, thereby ensuring the capacity of the storage system 100.
[0107] The meta information 311 is a table for managing the storage destination address of the sub-block 313 in the additional page corresponding to the logical data block 310 of the PVOL 300 or the snapshot 301. After the compressed data set C' is appended, the reference destination address of the meta information 311 corresponding to the logical address of the logical data block "C" 310-2 is updated to the additional destination address of the compressed data set C' in the additional page 312-1, so that the data written to the snapshot 301 can be managed.
[0108] Figure 4 This diagram shows an example of the logical structure of meta-information that describes in detail the relationship between the logical data block 310 that manages the PVOL 300 or the snapshot 301 and the storage destination address of the sub-block 313 in the additional page.
[0109] The meta information 311 is composed of a directory table 402 and a mapping table 403. The directory table 402 and the mapping table 403 are stored in areas within the snapshot management volume 401 and the additional volume 303.
[0110] The snapshot management volume 401 is a logical volume for managing the data sharing relationship between the PVOL 300 and the snapshot 301 .
[0111] The directory table 402-0 for PVOL is allocated in the area within the snapshot management volume and is a table that converts the PVOL internal address of the logical data block 310-i (i=0, 1) of the PVOL 300 into the address within the snapshot management volume 401 of the storage mapping table 403-0.
[0112] The snapshot directory table 402-1 is configured in an area within the snapshot management volume, and is a table that converts the address within the logical data block 310-i (i=0, 2) of the snapshot 301 into the address within the snapshot management volume 401 of the storage mapping table 403-0. The snapshot directory table 402-1 is a copy of the PVOL directory table 402-0. In addition, it has the same table structure as the PVOL directory table 402-0.
[0113] In the snapshot management volume 401, a mapping table 403-0 for PVOL 300 and snapshot 301 is configured. The mapping table 403-0 exists for each PVOL 300. The mapping table 403-0 converts the address in the PVOL / snapshot of the logical data block 310-i (i=0, 2, 3) into the address in the additional area 404-0 of the snapshot management volume.
[0114] In this way, information required for accessing the additional area 404 - 0 from the PVOL 310 or the snapshot 301 is managed using the directory table 402 as the first layer and the mapping table 403 as the second layer.
[0115] In addition, the additional volume 303 is a logical volume for additionally storing data, but the compressed sub-block 313 is additionally stored in the additional area 404-1 of the additional volume at an address different from the storage address of the logical data block 310 of the additional area 404-0 of the snapshot management volume. Therefore, the directory table 402-2 and the mapping table 403-1 are also configured in the additional volume 303. The directory table 402-2 and the mapping table 403-1 of the additional volume are used to convert the address of the logical data block 310 of the additional area 404-0 of the snapshot management volume into an address in the additional area 404-1 of the additional volume. In the garbage collection process, when copying the sub-block 313, it is necessary to update the directory table 402 and the mapping table 403 that manage the storage address of the sub-block to the copy destination address. Since the directory table 402-2 and the mapping table 403-1 also exist in the additional volume, it is not necessary to update both the directory table 402-0 for PVOL and the directory table 402-1 for snapshot, which is efficient.
[0116] An example of a table is described below.
[0117] Figure 5 402-i (i=0, 1, 2). The PVOL directory table 402-0, the snapshot directory table 402-1, and the additional volume directory table 402-2 have the same structure. One entry of each directory table 402 corresponds to data in units of the granularity of the logical data of the PVOL 300 (e.g., 256KB).
[0118] The directory table 402 has a PVOL / snapshot internal address 500 and a reference destination address (address in the mapping area) 501. The PVOL / snapshot internal address 500 is a storage logical address of object data in the PVOL 300 in the case of the directory table 402-0, a storage logical address of object data in the snapshot 301 in the case of the directory table 402-1, and a storage logical address of object data in the additional area 404-0 of the snapshot management table in the case of the directory table 402-2. The reference destination address (address in the mapping area) 501 is pointer information pointing to the mapping table 403.
[0119] The reference destination address (address within the mapping area) 501 corresponds to the address 600 within the mapping area of the mapping table 403 that is associated with the directory table 402 .
[0120] Figure 6 1 and 2 are diagrams for explaining the structure of the snapshot management mapping table 403 - 0 . The mapping table 403 - 0 has a mapping area in-addition address 600 and a reference destination address (additional area address) 601 .
[0121] The mapping area address 600 is the reference address (mapping area address) 501 of the directory table 402-i (i=0, 1) corresponding to the mapping table 403-0. The reference address (additional area address) 601 is an address in the additional area 404-0 where the target data is stored.
[0122] Figure 7 1 is an explanatory diagram of the structure of the additional volume mapping table 403-1. The mapping table 403-1 has a mapping area address 700, a reference destination address (additional area address) 701, a compressed capacity 702, and a snapshot #703.
[0123] The mapping area in-area address 700 is the reference destination address (mapping area address) 501 of the directory table 402-2 corresponding to the mapping table 403-1. The reference destination address (additional area address) 701 is an address in the additional area 404-1 storing the object data. The compressed capacity 702 is the compressed data volume when the object data of the PVOL 300 or the snapshot 301 is stored in the additional area 404-1. The snapshot # 703 is information set in the snapshot data defragmentation program 214, and is a number for uniquely identifying the snapshot 301 copied from the PVOL 300.
[0124] Figure 82 is an explanatory diagram of the structure of the volume management table 220. The volume management table 220 is a table for managing volumes such as PVOL 300, snapshot 301, snapshot management volume 401, and additional volume 404. The volume management table 220 has VOL# / snapshot#800, attribute 801, PVOL#802, directory#803, VOL capacity 804, and pool#805.
[0125] VOL#800 is the number that identifies the volume. Attribute 801 is the type of volume identified by VOL#800, which can be PVOL, snapshot, append, etc. PVOL#802 is the number that identifies the copy source PVOL of the snapshot. Directory#803 is the number that identifies the directory table assigned to the PVOL or snapshot. For example, in Figure 8 In the example, snapshot # is snapshot 2, copy source PVOL # is 0, and directory table is assigned # 5. PVOL # and directory # of snapshot management volume 401 and additional volume 303 are NULL (empty).
[0126] Capacity 804 is the capacity of the volume identified by VOL#800. Pool#805 is the number of the pool from which the volume identified by VOL#800 is extracted.
[0127] Fig. 9 2 is an explanatory diagram of the structure of the directory area allocation management table 221. The directory area allocation management table 221 is a table for managing the volume or snapshot to which the directory #900 is allocated, in correspondence with the allocation destination VOL / snapshot #901.
[0128] Fig.10 2 is an explanatory diagram of the structure of the directory tree management table 222. The directory tree management table 222 is a table that manages the directories of the generated snapshots in the order in which they are generated. Fig.10 In the example, when directory #1000 of a certain snapshot is 2, directory # (previous directory #1001) of a snapshot one generation newer than the snapshot is 1, and directory # (next directory #1002) of a snapshot one generation older than the snapshot is 3.
[0129] Fig.11 1104, a snapshot generation management table 223, and a snapshot generation management table 223. The snapshot generation management table 223 manages the latest generation of the snapshot for each PVOL# of the PVOL 300 that is the replication source. The snapshot generation management table 223 includes PVOL#1100, latest generation#1101, generation#1102, snapshot generation time 1103, snapshot#1104, status 1105, and defragmentation flag 1106. The snapshot generation management table 223 manages, for example, 1024 generations (generation#=0 to 1023) for each PVOL#.
[0130] In the snapshot generation management table 223, each time a snapshot of each PVOL# is generated, the latest generation# is incremented, and the snapshot generation time 1103, snapshot#1104, status 1105, and defragmentation flag 1106 corresponding to the latest generation#1101 are updated. In the status 1105, there is a PAIR (pairing) that makes the I / O for the snapshot impossible and synchronizes the data of the PVOL and the snapshot after the snapshot of the PVOL is generated. In addition, in the status 1105, there is a SUSPEND (split) that allows the I / O for the snapshot without synchronizing the data of the PVOL and the snapshot. The defragmentation flag 1106 manages whether the snapshot data defragmentation program 214 is executed on the snapshot 301, and is updated to an unfinished state after the snapshot is generated.
[0131] Fig.12 1 is an explanatory diagram of the structure of the page conversion table 224. The page conversion table 224 sets PVOL or additional volume for each volume. The page conversion table 224 holds information on the relationship between the area (for example, page 312-0) and page 312-2 in the additional volume 303, for example.
[0132] For example, the page conversion table 224 has an entry for each area in the additional volume 303. Each entry stores information such as the VOL internal address 1200, allocation flag 1201, page # 1202, and GC unnecessary flag 1203. The following description takes one area (referred to as "target area") as an example.
[0133] The VOL internal address 1200 is information about the logical address of the target area (for example, the beginning logical address). The allocation flag 1201 is information about whether the page 312-2 is allocated to the target area ("allocated") or not allocated ("unallocated"). The page # 1202 is information about the number of the page 312-2 allocated to the target area. The GC unnecessary flag 1203 is information about whether the page does not need GC processing ("unnecessary") or needs GC processing ("necessary").
[0134] Fig.13 2 is an explanatory diagram of the structure of the page allocation management table 225. The page allocation management table 225 is set for each pool 304. The page allocation management table 225 holds information on the relationship between the page 312-2 and its allocation destination. For example, the page allocation management table 225 has an entry for each page 312-2.
[0135] Each entry stores information such as page #1300, allocation flag 1301, allocation destination VOL #1302, and address 1303 in the allocation destination VOL. Hereinafter, a description will be given using one page 312 (referred to as "target page") as an example. Page #1300 is information on the number of the target page. Allocation flag 1301 is information on whether the target page is allocated ("allocated") or unallocated ("unallocated").
[0136] The allocation destination VOL# 1302 is information on the number of the allocation destination VOL (additional volume 303) of the target page. The allocation destination VOL internal address 1303 is information on the logical address (for example, the beginning logical address) of an area in the allocation destination VOL of the target page.
[0137] Fig.14 2 is a diagram showing an example of the sub-block management table 226. The sub-block management table 226 is set for each additional volume 303. The sub-block management table 226 holds information on the sub-block 313. For example, the sub-block management table 226 has an entry for each sub-block 313.
[0138] Each entry stores information such as page #1400, in-page address 1401, subblock size 1402, reference source address 1403, and allocation flag 1404. Hereinafter, one subblock 313 (referred to as "target subblock") will be described as an example.
[0139] Page # 1400 is information about the number of page 312-0 including the target subblock. In-page address 1401 is information about the logical address of the target subblock in page 312-0. Subblock size 1402 is information about the size of the target subblock (the size of the compressed data set stored in the target subblock).
[0140] The reference source address 1403 is the address information of the referenced sub-block. The reference source address of the sub-block 313 of the additional volume is the address in the additional area 404-0 of the snapshot management volume. The allocation flag 1404 is information on whether the target sub-block is allocated ("allocated") or unallocated ("unallocated"), in other words, whether the target sub-block is in use or unused.
[0141] Fig.15 2 is a diagram showing an example of the search data management table 227. The search data management table 227 is a table for temporarily storing the processing target data searched by the snapshot data defragmentation program 214. It has entries of the number of searched processing target data, data #1500 of the data and an address 1501 of the data storage destination (additional area storage address).
[0142] Fig.161 is a flowchart showing the processing sequence of the snapshot generation process. The snapshot generation process is a process of copying the data of the PVOL 300, which is the copy source VOL, to the snapshot 301. In the RoW method, the directory table 402-0 for the PVOL that manages the data storage destination address is copied to the directory table 402-1 for the snapshot without copying the user data, so that the data of the PVOL 300 can be referenced from the snapshot 301, and it can be seen that the data is copied to the snapshot 301. The snapshot generation process is executed by the snapshot generation program 210 according to the instruction from the management system 103.
[0143] First, in step 1600, the snapshot generation program 210 receives the VOL# of the PVOL, i.e., the replication source VOL, which is the target of the snapshot generation. Next, in step 1601, the snapshot generation program 210 determines whether dirty data that has not been destaged from the replication source VOL received in step 1600 exists in the cache memory 201. If there is dirty data that has not been destaged from the replication source VOL ("Yes" in step 1601), the snapshot generation program 210 transfers the processing to step 1602. If there is no dirty data ("No" in step 1601), the snapshot generation program 210 transfers the processing to step 1603. In step 1602, the snapshot generation program 210 performs the additional processing of the dirty data. For details, refer to Fig.17 This will be described later.
[0144] In 1603, the snapshot creation program 210 obtains the capacity and directory # of the copy source VOL from the volume management table 220. Next, in 1304, the snapshot creation program 210 checks whether a directory area for the snapshot (copy destination) to be copied from the copy source VOL can be secured in the snapshot management volume 401. If the directory area for the snapshot (copy destination) can be secured ("Yes" in 1605), the snapshot creation program 210 transfers the processing to 1606. If the directory area for the snapshot (copy destination) cannot be secured ("No" in 1605), the snapshot creation processing ends.
[0145] In 1606, the snapshot generation program 210 refers to the directory area allocation management table 221 to allocate the directory # for the snapshot, and updates the allocation destination snapshot # of the allocated directory #. Next, in 1607, the volume information including the PVOL#, directory #, capacity, and pool # of the attribute = snapshot generated in this snapshot generation process is added to the volume management table 220 for updating.
[0146] Next, in step 1608, the snapshot creation program 210 updates the previous directory #1001 and the next directory #1002 of the target directory # of the directory management table so that the directory # of the created snapshot is connected to the last position of the directory tree management table 222. In addition, the next directory # of the directory # of the snapshot of the old generation located at the last position before the update is updated to the directory # of the created snapshot.
[0147] Next, in 1609, the snapshot generation program 210 adds 1 to the latest generation #1101 of the generated snapshot, sets the snapshot generation time 1103, snapshot #1104 (equivalent to VOL# in the volume management table 220), status 1105 = SUSPEND, and defragmentation flag 1106 = incomplete, to update the snapshot generation management table 223.
[0148] Next, in 1610, the snapshot creation program 210 instructs the storage controller 110 to copy the directory. Next, in 1611, the snapshot creation program 210 receives the instruction of the directory copy in 1610 and copies the directory table 402-0 of the PVOL, which is the copy source VOL, to the directory area reserved in 1606. The directory table 402-1 generated by the copy is referred to in the I / O processing of the generated snapshot.
[0149] Fig.17 The append process is a process of transferring data stored in the cache memory 201 of the storage system by the front-end write process 212 to the append volume 303 for appending, and updating the directory table 402 and the mapping table 403 to refer to the appended data. Fig.17 Indicated in Fig.16 1602 Fig.19 1904 Fig. 20 The following is the details of each additional process performed in 2001. Fig.16 The additional processing executed in 1602 will be described with the snapshot creation program 210 as the processing subject.
[0150] In addition, Fig.19 In 1904, the front-end writing program 212 becomes the processing subject. Fig. 20 In 2001, the backend writing program 213 becomes the processing subject.
[0151] First, in step 1700, the snapshot generation program 210 determines dirty data. Next, in step 1701, the snapshot generation program 210 refers to the snapshot generation management table 223 to determine whether the PVOL has a snapshot in the SUSPEND state. In the case of a snapshot in the SUSPEND state, other snapshot generation programs 210 are in operation, and there is a possibility that directory replication is in progress, so the processing is transferred to step 1702. If there is no snapshot in the SUSPEND state ("No" in step 1701), the snapshot generation program 210 transfers the processing to step 1704. If there is a snapshot in the SUSPEND state ("Yes" in step 1701), the processing is transferred to step 1702.
[0152] In 1702, the snapshot generation program 210 determines whether the directory copy corresponding to the logical address (LBA) of the dirty data to be appended is completed. If the append process is performed before the directory copy is completed, the directory table that is the copy object is updated, the directory copy cannot be performed, and the snapshot cannot be performed. If the directory copy is completed ("Yes" in 1702), the snapshot generation program 210 transfers the processing to 1704. If the directory copy is not completed ("No" in 1702), the directory information of the area is expelled (1703). Expelling the copy means that in Fig.16 In the case where an additional process is performed on an uncopied area in the copy process in step 1611, the process of accurately copying only the directory information of the additional process target area is performed.
[0153] Next, in step 1704, the snapshot generation program 210 reserves an area in the additional area 404-0 of the snapshot management volume corresponding to the logical address (LBA) of the dirty data to be added. Next, in step 1705, the snapshot generation program 210 maintains the storage location in the additional area secured in step 1704 in an unused entry in each entry of the mapping table 403-0 of the snapshot management volume to which the reference destination address (additional area address) 601 is not set. That is, the secured additional area address is set as the reference destination address (additional area address) 601. Next, in step 1706, the snapshot generation program 210 sets the mapping area address 600 of the mapping information generated in step 1705 as the reference destination address (mapped area address) 501 in each entry of the directory table 402-1 corresponding to the logical address of the data (LBA accessible from the host).
[0154] Next, in step 1707, the snapshot generation program 210 compresses the dirty data determined in step 1700. Next, in step 1708, the snapshot generation program 210 determines whether the additional page 312-0 of the additional volume that is the forwarding destination of the compressed data is free. If there is a free page ("Yes" in step 1708), the snapshot generation program 210 transfers the processing to step 1710, and if there is no free page ("No" in step 1708), a new additional page is allocated from the pool 304. Next, in step 1710, the snapshot generation program 210 copies the compressed data set compressed in step 1707 to the additional area 404-1 of the additional volume corresponding to the copy source volume. Next, in step 1713, the snapshot generation program 210 destages the dirty data copied to the additional area in step 1710 and stores the data in the drive.
[0155] Fig.18 2 is a flowchart showing the processing procedure of the read process. The read process is executed by the read program 211 in response to a read request from the host device.
[0156] In 1800, the read program 211 obtains the address of the data in the PVOL or snapshot that is the object of the read request from the server system 102. Next, in 1801, the read program 211 determines whether the object data of the read request is cache hit. If the object data of the read request is cache hit ("Yes" in 1801), the read program 211 transfers the processing to S1807, and if it is not cache hit ("No" in 1801), the processing is transferred to 1802.
[0157] In 1802, the read program 211 refers to the directory tables 402-0 and 402-1 of the snapshot management volume, and obtains the reference destination address (address in the mapping area) 501 based on the address in the PVOL / snapshot obtained in 1800. The read program 211 refers to the directory table 402-0 for PVOL when the target data of the read request is data in PVOL 300, and refers to the directory table 402-1 for snapshot when the target data of the read request is data in snapshot 301.
[0158] Next, at 1803 , the reading program 211 refers to the snapshot management volume mapping table 403 - 0 , and acquires the reference destination address (additional area address) 601 based on the reference destination address (mapped area address) acquired at 1802 .
[0159] Next, in step 1804, the reading program 211 refers to the directory table 402-2 of the additional volume corresponding to the reference destination address (address in the mapping area of the snapshot management volume) obtained in step 1803, and obtains the reference destination address (address in the mapping area) 501 of the additional volume. Next, in step 1805, the reading program 211 refers to the additional volume mapping table 403-1, and obtains the reference destination address (address in the mapping area) 701 based on the reference destination address (address in the mapping area) obtained in step 1804.
[0160] Next, at 1806 , the reading program 211 decompresses the data stored at the address in the additional area of the additional volume identified at 1805 and stages the data in the cache memory.
[0161] Next, in 1807 , the read program 211 transfers the data cache-hit in 1801 or the data staged in 1806 to the host device.
[0162] Fig.19 2 is a flowchart showing the processing sequence of the front-end write process (common to PVOL / snapshot). The front-end write process is a process of writing write data to the cache memory 201 of the storage system in synchronization with the write request when a write request is received from the host device. Fig. 20 The back-end write process described in the foregoing is a process of forwarding the write data (dirty data) on the cache memory 201 to the additional area 404-1 of the additional volume and storing it in the drive. The front-end write process is executed by the front-end write program 212 when a write request to the PVOL 300 or the snapshot 301 is received from the host device.
[0163] First, in 1900, the front-end write program 212 determines whether the target data of the write request from the host device is cache hit. If the target data of the write request is cache hit ("Yes" in 1900), the front-end write program 212 transfers the processing to 1902, and if it is not cache hit ("No" in 1900), the front-end write program 212 transfers the processing to 1901. In 1901, the front-end write program 212 reserves a cache area in the cache memory 201.
[0164] In 1902, the front-end write program 212 determines whether the object data hit in the cache in 1900 is dirty data. If the object data hit in the cache in 1900 is dirty data ("Yes" in 1902), the front-end write program 212 transfers the processing to 1903, and if it is not dirty data ("No" in 1902), the front-end write program 212 transfers the processing to 1905.
[0165] In 1903, the front-end write program 212 determines whether the WR (WRight) generation # of the dirty data determined in 1902 is consistent with the generation # of the target data of the write request. The WR generation # is stored in the management information of the cache data (not shown). Fig.11 The latest generation #1101 obtains the generation # of the object data of the write request. 1903 prevents the dirty data from being updated with the object data of the write request and overwriting the snapshot data during the period when the append processing of the object data (dirty data) of the snapshot just obtained is not performed. The front-end write program 212 transfers the processing to 1905 when the WR generation # is consistent with the latest generation # ("Yes" in 1903), and transfers the processing to 1904 when the WR generation # is inconsistent with the latest generation # ("No" in 1903).
[0166] In 1904, the front-end writing program 212 performs a reference Fig.17 The additional processing described above: At 1904 , dirty data of WR generation # that is inconsistent with the latest generation # is written to the additional area and destaged from the cache memory 201 .
[0167] In 1905 , the front-end write program 212 writes the target data of the write request to the cache area secured in 1901 or to the cache area where dirty data requiring additional processing is additionally processed and dirty data can be regenerated.
[0168] In 1906, the front end write program 212 sets the WR generation # of the cache data written to the cache memory 201 in 1905 to the latest generation # compared in 1903. In 1907, the front end write program 212 returns a normal response (Good response) to the host device.
[0169] Fig. 20 1 is a flowchart showing the processing sequence of the back-end write processing. The back-end write processing is a process of writing the unreflected data to the additional area 106 when there is data (dirty data) not reflected in the additional area 404-1 of the additional volume 303 on the cache memory 201. The back-end write processing is performed synchronously or asynchronously with the front-end processing. The back-end write processing is executed by the back-end write program 213.
[0170] First, in 2000, the back-end write program 213 determines whether there is dirty data in the cache memory 201. If there is dirty data in the cache memory 201 ("Yes" in S2000), the back-end write program 213 transfers the processing to 2001. If there is no dirty data ("No" in S2000), the back-end write processing ends. In 2001, the back-end write program 213 executes Fig.17 Additional processing described in .
[0171] Fig.21 This is a flowchart showing the processing sequence of the snapshot data defragmentation processing of Example 1. The snapshot data defragmentation processing 214-1 is started when the management system 103 instructs the snapshot generation processing or as a regular asynchronous processing, and executes the processing of searching for snapshot differential data and setting the searched differential data as a replication target.
[0172] First, in 2100, the snapshot defragmentation program 214-1 refers to the snapshot generation management table 223 to determine whether there is a snapshot that has not been defragmented yet and has a state 1105 of SUSPEND and a defragmentation flag 1106 of incomplete. If there is a snapshot that has not been defragmented yet ("Yes" in 2100), the process is transferred to 2101. If there is no snapshot that has not been defragmented yet ("No" in 2100), the snapshot data defragmentation process is terminated. In 2101, a snapshot that has not been defragmented yet is selected.
[0173] Next, in 2102, the snapshot defragmentation program 214-1 refers to the snapshot generation management table to determine whether there is a snapshot in the SUSPEND state in a new generation of the snapshot selected in 2101. If there is a snapshot in the SUSPEND state ("Yes" in 2102), the process is transferred to 2103. If there is no snapshot in the SUSPEND state ("No" in 2102), the process is repeated from 2100. For example, if snapshot #1104 is 100 and generation #1102 is 4, as a snapshot of a new generation, there is a snapshot #200 whose generation #1102 is 5 and whose state 1105 is SUSPEND. Therefore, the snapshot whose snapshot #1104 is 100 can be processed in 2103. Through this determination, since there is a snapshot in the new generation, the amount of differential data of the snapshot to be processed does not change, and the same process does not need to be performed again.
[0174] In 2103 , the snapshot defragmentation program 214 - 1 obtains the directory # 803 of the directory table identifying the processing target snapshot from the volume management table 220 .
[0175] In the processing after 2104, the processing is looped from the logical address head to the end address of the processing object snapshot. In 2104, the snapshot defragmentation program 214-1 determines whether the end of the logical address has been reached. When the end has been reached ("Yes" in 2104), the defragmentation processing of the processing object snapshot is completed, and other snapshots are processed again from the processing of 2100. When the end has not been reached ("No" in 2104), the processing is transferred to 2105. In 2105, the snapshot defragmentation program 214-1 performs the search processing of the defragmentation object data. For details, refer to Fig. 22 This will be described later.
[0176] In 2106, the snapshot defragmentation program 214-1 determines whether the defragmentation target data retrieved in 2105 has a size of 1 page. If there is a size of 1 page ("Yes" in 2106), the defragmentation target data can be neatly assembled into 1 page, so the process is transferred to 2107. If there is not a size of 1 page ("No" in 2106), the process is transferred to 2104 to continue the data retrieval process.
[0177] In 2107 and 2108, a snapshot # is set for the data determined to be the object of defragmentation, so that the garbage collection process ( Fig.23 ) Which data should be summarized as the differential data of which snapshot.
[0178] Next, the snapshot defragmentation program 214-1 updates the additional volume mapping table 403-1 corresponding to the defragmentation target data as a preparation process for the defragmentation target data of one page in 2107. By setting the snapshot # of the processing target in snapshot #703 of the additional volume mapping table 403-1, it is possible to determine which snapshot the defragmentation target data belongs to.
[0179] In 2108, the snapshot defragmentation program 214-1 updates the reference destination address (address in the mapping area) 501 of the directory table 402-2 of the additional volume by updating the mapping table in 2107. The address of the mapping table (address in the mapping area) updated in 2107 is set as the reference destination address (address in the mapping area) 501 of the directory table 402.
[0180] This snapshot data defragmentation process performs information setting, so that the defragmentation target data can be searched and the data can be identified. Fig.23 ) describes the process of copying and gathering the defragmentation target data.
[0181] Fig. 22 This is a flowchart showing the processing procedure of the data search process of the first embodiment. Fig. 22 Indicated in Fig.21 2105 Fig.24 The following is a detailed description of each data retrieval process performed in 2406. Fig.21 The data retrieval process executed in 2105 will be described with the snapshot data defragmentation program 214-1 as the processing subject.
[0182] In addition, Fig.24 In 2406, the snapshot deletion program 216 becomes the processing subject. The data search program 2105-1 is a program that compares the data of the search target snapshot and the snapshot of the next generation of the search target snapshot, and the data of the search target snapshot and the snapshot of the previous generation of the search target snapshot, and records the data referenced by only the search target snapshot as defragmentation target data in the data management table.
[0183] First, in 2200, the snapshot data defragmentation program 214-1 refers to the next directory #1002 of the directory tree management table 222, and selects the next directory # of the directory # of the snapshot of the new generation of the search target snapshot. Similarly, it refers to the previous directory #1001 of the directory tree management table 222, and selects the previous directory # of the directory # of the snapshot of the old generation of the search target snapshot.
[0184] At 2201 , the snapshot data defragmentation program 214 - 1 compares the reference address (in-mapped area address) 501 of the directory table 402 of the next directory # acquired at 2200 with the reference address (in-mapped area address) 501 of the directory table 402 of the target snapshot.
[0185] In 2202, the snapshot data defragmentation program 214-1 determines whether the data of the processing target snapshot is shared with the snapshot of the next generation. That is, if the reference destination address (address in the mapping area) 501 of the directory table 402 of the processing target snapshot is inconsistent with the reference destination address (address in the mapping area) 501 of the directory table 402 of the next directory # ("No" in 2202), the processing is transferred to 2203. If they are consistent ("Yes" in 2202), the data search processing is terminated.
[0186] At 2203 , the snapshot data defragmentation program 214 - 1 compares the reference address (in-mapped area address) 501 of the directory table 402 of the previous directory # acquired at 2200 with the reference address (in-mapped area address) 501 of the directory table 402 of the target snapshot.
[0187] In 2204, the snapshot data defragmentation program 214-1 determines whether the data of the processing target snapshot is shared with the snapshot of the previous generation. That is, if the reference destination address (address in the mapping area) 501 of the directory table 402 of the processing target snapshot is inconsistent with the reference destination address (address in the mapping area) 501 of the directory table 402 of the previous directory # ("No" in 2204), the processing is transferred to 2205. If they are consistent ("Yes" in 2204), the data search processing is terminated.
[0188] As can be seen from 2202 and 2204, the reference destination address 501 is different in the unit of the granularity of logical data (e.g., 256KB) as the management unit of the directory table, so the same data is not shared. However, in the unit of the finer granularity of logical data of the mapping table 403-0 referenced by the directory table, data may be shared in the additional area 404-0 of the snapshot management volume. In the subsequent processing, the reference destination address (address in the additional area) 601 of the snapshot management volume mapping table 403-0 is used as a unit to determine whether data is shared.
[0189] In 2205, the snapshot data defragmentation program 214-1 obtains the mapping tables 403-0 of the reference destination address (address within the mapping area) 501 of the directory table 402 of the processing object snapshot, the reference destination address (address within the mapping area) 501 of the directory table 402 of the subsequent directory #, and the reference destination address (address within the mapping area) 501 of the directory table 402 of the previous directory #.
[0190] At 2206, the snapshot data defragmentation program 214-1 compares the reference address (additional area address) 601 of the mapping table 403-0 referenced by the next directory # obtained at 2205 with the reference address (additional area address) 601 of the mapping table 403-0 referenced by the directory table of the target snapshot.
[0191] In 2207, the snapshot data defragmentation program 214-1 determines whether the data of the processing target snapshot is shared with the snapshot of the next generation. That is, if the reference destination address (address in the additional area) 601 of the mapping table 403-0 of the processing target snapshot is inconsistent with the reference destination address (address in the additional area) 601 of the mapping table 403-0 referenced by the next directory # ("No" in 2207), the processing is transferred to 2208. If they are consistent ("Yes" in 2207), the data search processing is terminated.
[0192] At 2208, the snapshot data defragmentation program 214-1 compares the reference address (additional area address) 601 of the mapping table 403-0 referenced by the previous directory # obtained at 2205 with the reference address (additional area address) 601 of the mapping table 403-0 referenced by the directory table of the target snapshot.
[0193] In 2209, the snapshot data defragmentation program 214-1 determines whether the data of the processing target snapshot is shared with the snapshot of the previous generation. That is, if the reference destination address (address in the additional area) 601 of the mapping table 403-0 of the processing target snapshot is inconsistent with the reference destination address (address in the additional area) 601 of the mapping table 403-0 referenced by the previous directory # ("No" in 2209), the processing is transferred to 2210. If they are consistent ("Yes" in 2209), the data search processing is terminated.
[0194] In 2210 , the snapshot data defragmentation program 214 - 1 adds the address in the additional area of the snapshot management volume 401 of only the data referenced by the processing target snapshot to the search data management table 227 .
[0195] Fig.23 This is a flowchart showing the processing sequence of the garbage collection (GC) processing of Example 1. The GC processing is a processing as follows: valid data in a page that is a capacity management unit of the storage system is copied to other pages, and pages that have become only invalid data are released, thereby releasing the capacity of the storage system (the capacity of data stored in the drive) and ensuring a free area. First, in 2300, the GC program 215 selects a processing target volume from the volume management table. If there is a processing target ("Yes" in 2300), the processing is transferred to 2301. If there is no processing target ("No" in 2300), the garbage collection processing is terminated.
[0196] Next, at 2301, the GC program 215 refers to the page conversion table 224 of the volume selected at 2300 and determines the processing target page. For example, the page #0 whose allocation flag 1201 indicates allocated and whose GC unnecessary flag indicates required is selected as the processing target page.
[0197] In the subsequent processing, the processing is repeated from the head address of the processing target page to the end. In 2302, the GC program 215 determines whether the processing target page has been reached. If it has been reached ("Yes" in 2302), the processing is transferred to 2313. If it has not been reached ("No" in 2302), the processing is transferred to 2303.
[0198] The processing from 2303 to 2306 determines whether the sub-block 313 in the processing target page is valid data or invalid garbage. The reference source address 1403 of the sub-block management table 226 stores the additional area address of the SS management volume that references the sub-block. When the same sub-block in the page can be reached from the additional area address of the stored SS management volume through the directory table 402-2 and the mapping table 403-1 (when the addresses are consistent), the reference source and the reference destination (sub-block) point to each other, so it is determined to be valid data. On the other hand, when the sub-block of the reference destination is different due to the write processing, the sub-block in the page is not referenced by anyone, so it can be determined to be garbage.
[0199] At 2303 , the GC program 215 refers to the sub-block management table 226 corresponding to the sub-block 313 of the processing target page, and acquires the reference source address 1403 of the sub-block.
[0200] Next, at 2304 , the GC program 215 refers to the directory table 402 - 2 of the additional volume based on the reference source address (address in the additional area of the snapshot management volume) obtained at 2303 , and obtains the reference destination address (address in the mapping area) 501 .
[0201] In 2305 , the GC program 215 obtains the additional volume mapping table from the address in the mapping area obtained in 2304 .
[0202] Next, at 2306, the GC program 215 determines whether the reference destination address (additional area address) 701 of the mapping table obtained at 2305 is consistent with the address of the sub-block storing the processing target page selected at 2303 (the page address 1401 of the sub-block management table 226). If they are consistent ("Yes" at 2306), the target sub-block is valid data referenced from the logical address, so the processing is transferred to 2307. If they are inconsistent ("No" at 2306), the target sub-block is garbage, so data copy is not performed and the processing is restarted from 2302.
[0203] In 2307, the GC program 215 refers to the snapshot #703 of the additional volume mapping table 403-1, and when a valid value is set, selects the page # that collects the differential data of the snapshot #. When the snapshot #703 is NULL (empty), since it is not the defragmentation target data, the data copy destination page (additional page) set by the GC program 215 is selected.
[0204] In 2308 , the GC program 215 copies the sub-block of valid data to the copy destination page selected in 2307 .
[0205] Next, at 2309 , since the GC program 215 has copied the sub-block at 2308 , it updates the object record of the additional volume mapping table 403 - 1 that refers to the copied sub-block.
[0206] In 2310, the GC program 215 updates the reference destination address (address in the mapping area) 501 of the directory table 402-2 of the additional volume by updating the mapping table in 2309. The address (address in the mapping area) of the mapping table updated in 2309 is set as the reference destination address (address in the mapping area) 501 of the directory table 402.
[0207] In 2311, the GC program 215 determines whether the data copied in 2308 has a snapshot # specified and whether the copy destination page has reached the end. If a snapshot # has been specified and the copy destination page has reached the end ("Yes" in 2311), the process moves to 2312. If the end has not been reached ("No" in 2311), the process restarts from 2302.
[0208] In 2312, the GC program 215 sets the copy destination page as a page that does not require GC processing because the copy destination page is filled with data that is referenced only by the specific snapshot in 2311. Specifically, the GC unnecessary flag 1203 of the page conversion table 224 is updated to unnecessary. As a result, the page will not be selected as a GC processing target in the future and does not need to be copied.
[0209] In 2313 , the GC program 215 has completed copying all valid data in the processing target page, so that the processing target page including garbage can be released, thereby ensuring the capacity of the storage system 100 .
[0210] Fig.24 2 is a flowchart showing the processing procedure of the snapshot deletion process. The snapshot deletion process is executed by the snapshot deletion program 216 in response to an instruction to delete the snapshot from the management system 103 .
[0211] First, at 2400 , the snapshot deletion program 216 receives the snapshot # of the deletion target. Next, at 2401 , the snapshot deletion program 216 obtains the directory # of the snapshot of the deletion target from the volume management table 220 .
[0212] In 2402 , the snapshot deletion program 216 deletes the record of the deleted snapshot from the snapshot generation management table 223 .
[0213] Next, in 2403 , the snapshot deletion program 216 deletes the record of the volume corresponding to the deleted snapshot from the volume management table 220 .
[0214] The processing from 2404 to 2409 is repeatedly processed from the head address to the end of the snapshot to be deleted. In 2404, the snapshot deletion program 216 determines whether the address end of the snapshot to be deleted has been reached. If the end has been reached ("Yes" in 2404), the processing is transferred to 2410. If the end has not been reached ("No" in 2404), the processing is transferred to 2405.
[0215] At 2405, the snapshot deletion program 216 executes Fig. 22 In the data search process described in , only the data referenced by the snapshot of the deleted object is searched.
[0216] Next, at 2406 , the snapshot deletion program 216 deletes, from the additional volume mapping table 403 - 1 , the record of the additional volume mapping table corresponding to the data referenced only by the snapshot of the garbage-deletion target checked at 2405 .
[0217] In 2407 , the snapshot deletion program 216 deletes the record of the directory table 402 - 1 that refers to the mapping table 403 - 1 deleted in 2406 .
[0218] Next, in 2408, the snapshot deletion program 216 refers to the page conversion table 224 to determine whether the page of the reference destination address (additional area address) 701 of the record of the mapping table 403-1 deleted in 2406 is a page whose GC unnecessary flag is on (ON) ("unnecessary"). When the GC unnecessary flag is on ("unnecessary") ("Yes" in 2408), the object page aggregates the deletion object snapshot, so the page can be released immediately without GC processing, and the capacity of the storage system 100 can be ensured (2409). On the other hand, when the GC unnecessary flag is off (OFF) ("necessary") ("No" in 2408), the page cannot be released immediately, so the processing is restarted from 2404.
[0219] In 2410, since the process of garbage-ing the differential data of the snapshot of the deletion object has been completed, the snapshot deletion program 216 deletes the directory # of the snapshot of the deletion object from the directory tree management table. Then, the directory # that the deleted directory # refers to as the next directory #1002 is updated to the next directory #1002 of the deleted directory #. Similarly, the directory # that the deleted directory # refers to as the previous directory #1001 is updated to the previous directory #1001 of the deleted directory #.
[0220] Next, refer to Fig.25 and Fig.26 The effect of Example 1 is described. In this embodiment, Fig.25As shown, for example, only the differential data ("A0") referred to by the snapshot 301-0 is moved to a page not required for GC, and the differential data of the snapshot does not need to be copied in the GC process, so an increase in the GC process amount can be suppressed.
[0221] In addition, in this embodiment, Fig.26 As shown, when the snapshot deletion instruction of the snapshot 301-0 is issued, only the data ("A0") referenced by the snapshot 301-0 is garbaged by the snapshot deletion process 216, but the data referenced by the deletion target snapshot including the data ("A0") is aggregated in the GC unnecessary page. Therefore, the GC unnecessary page does not require GC processing, so the page can be released. Since the GC processing does not require action, there is no impact on the I / O performance. In addition, the capacity of the storage system 100 can be immediately ensured.
[0222] [Example 2]
[0223] Below, use Fig. 27 Embodiment 2 of the present invention will be described.
[0224] In the first embodiment, in the data search process 2105-1 of the snapshot data defragmentation process 214-1, data of the processing target snapshot is searched for data that is not shared by snapshots of a new generation or a snapshot of an old generation, and is only referenced by the processing target snapshot, and defragmentation is performed. On the other hand, there is data shared by multiple snapshots. In addition, in the backup example, snapshot deletion instructions are given from the oldest snapshot, so the snapshot for which snapshot deletion instructions are given can be considered to be the oldest snapshot. In the second embodiment, if it can be determined in the data search process 2105-2 that there is no data shared with a snapshot of a new generation, it is determined to be data to be defragmented. That is, even if the data is shared by multiple snapshots, if the processing target snapshot is the latest snapshot among the snapshots that share data, the data is determined to be data to be defragmented.
[0225] Fig. 27 1 is a flowchart showing the processing sequence of the data search process of the snapshot data defragmentation process of the second embodiment. Compared with the first embodiment, only the data search process 2105-1 of the snapshot data defragmentation process 214-1 is changed to the data search process 2105-2. Fig. 27 2500, 2501, 2502, 2506, 2507 in Fig. 22 2200, 2201, 2202, 2206, and 2207 are the same.
[0226] After the processing corresponding to the latter directory # of 2500 , 2501 , and 2502 , in the second embodiment, the snapshot data defragmentation program 214 - 1 does not perform the processing corresponding to the former directory # of 2203 and 2204 , and transfers the processing to 2505 .
[0227] At 2505, the snapshot data defragmentation program 214-1 obtains the mapping table 403-0 of each of the referenced address (address in the mapping area) 501 of the directory table 402 of the processing target snapshot and the referenced address (address in the mapping area) 501 of the directory table 402 of the next directory #.
[0228] After the processing corresponding to the mapping table 403-0 referenced by the next directory # at 2506 and 2507, in the second embodiment, the snapshot data defragmentation program 214-1 does not perform the processing corresponding to the mapping table 403-0 referenced by the previous directory # at 2208 and 2209, and transfers the processing to 2510.
[0229] In 2510 , the snapshot data defragmentation program 214 - 1 can search for data of the latest snapshot among the snapshots that share data with the processing target snapshot, and therefore adds the data to the search data management table 227 .
[0230] In Example 2, Fig.26 The data (“B0”) shared by the snapshot 301 - 1 and the snapshot 301 - 0 can also be aggregated into the GC unnecessary page 312 - 1 as data that is garbaged when the snapshot 301 - 1 is instructed to delete the snapshot.
[0231] [Example 3]
[0232] Below, use Figure 28-29 Embodiment 3 of the present invention will be described.
[0233] In the first embodiment, in the snapshot data defragmentation process 214-1, information is set in the additional volume mapping table 403-1 so that the defragmentation target data can be identified and the defragmentation target data is copied in the garbage collection process. In the third embodiment, the defragmentation target data is copied in the snapshot data defragmentation process 214-2.
[0234] Fig.28 This is a flowchart showing the processing procedure of the snapshot data defragmentation process according to the third embodiment. Fig.28 2600, 2601, 2602, 2603, 2604, 2605, 2606 are respectively Fig.21 2100, 2101, 2102, 2103, 2104, 2105, and 2106 are the same.
[0235] In 2607 after 2606, the snapshot data defragmentation 214-2 performs a copy process of the retrieved defragmentation data. For details, refer to Fig.29 This will be described later.
[0236] In step 2608, the snapshot data defragmentation 214-2 fills the copy destination page with the differential data 2607 of the specific snapshot through 2607, so that the copy destination page is set as a page that does not require GC processing. Specifically, the GC unnecessary flag 1203 of the page conversion table 224 is updated to unnecessary. As a result, it will not be selected as a GC processing object in the future and does not need to be copied.
[0237] Fig.29 This is a flowchart showing the processing procedure of the data copying process of the embodiment 3. First, at 2700, the snapshot data defragmentation 214-2 refers to the search data management table 227 to which the data copying program defragmentation target data is added.
[0238] Next, at 2701 , the snapshot data defragmentation 214 - 2 updates the page allocation management table 225 to allocate a new page 312 as a copy destination of the defragmentation target data.
[0239] In 2702, the snapshot data defragmentation 214-2 copies the sub-block of the defragmentation target data to the page 312 of the additional area 404-1 of the additional volume secured in 2701. Specifically, the directory table 402-2 of the additional volume corresponding to the reference destination address (address in the additional area of the snapshot management volume) 1501 of the search data management table is referenced to obtain the reference destination address (address in the mapping area) 501. The sub-block 313 of the copy target is determined and copied by referring to the reference destination address (address in the additional area) 701 of the additional volume mapping table 403-1 corresponding to the obtained address in the mapping area.
[0240] In 2703 , the snapshot data defragmentation 214 - 2 adds a record corresponding to the copied data to the sub-block management table.
[0241] Next, in 2704, since the snapshot data defragmentation 214-2 has copied the sub-block in 2702, the object record of the additional volume mapping table 403-1 is updated with reference to the copied sub-block.
[0242] In 2705, the reference destination address (address in the mapping area) 501 of the directory table 402-2 of the additional volume is changed by the update of the mapping table in 2704, so the snapshot data defragmentation 214-2 is updated. The address of the mapping table updated in 2104 (address in the mapping area) is set as the reference destination address (address in the mapping area) 501 of the directory table 402.
[0243] As described above, the disclosed storage system 100 is a storage system having a storage device (PDEV120) and a processor 111 for processing data input to or output from the storage device, wherein the processor 111 performs the following processing: forming a page capable of storing multiple data in a logical storage area formed based on a physical storage area of the storage device; providing a volume, inputting data related to data input and output for the volume into or outputting data from a page of the logical storage area; mapping the data of the logical storage area from the volume; being able to release the storage area in units of the page; having a plurality of the volumes, and being able to share the data of the logical storage area; performing garbage collection, wherein the garbage collection deletes data that is not referenced from any of the plurality of volumes as invalid data, moves data referenced from any of the volumes to other pages, and releases the storage area of the page where the data is deleted and moved; and, through the garbage collection, storing the multiple data in the page as the destination of the move, so that the multiple data stored in the same page are mapped from the same volume.
[0244] Therefore, the GC processing amount can be suppressed, the memory can be managed efficiently, and the data processing performance can be maintained.
[0245] Furthermore, the volume includes a primary volume for inputting and outputting data and a plurality of snapshot volumes copied from the primary volume, and a page of data mapped from only one of the snapshot volumes is excluded from the garbage collection.
[0246] Therefore, garbage collection related to the snapshot volume can be made more efficient.
[0247] Furthermore, in the case where a snapshot volume of data mapped to a page other than a target of the garbage collection is deleted, the disclosed system releases a storage area by deleting the page without performing the garbage collection.
[0248] Therefore, snapshot deletion can be made more efficient.
[0249] In addition, as an example, the volume includes a master volume for inputting and outputting data and a plurality of snapshot volumes copied from the master volume, the plurality of snapshot volumes are snapshot volumes of multiple generations copied from the same master volume at different times, the plurality of snapshot volumes of multiple generations are snapshot volumes deleted starting from an older generation, and the same plurality of data as the snapshot volume of the latest generation among the one or more snapshot volumes storing the respective data are stored in the same page and set in a page outside the object of garbage collection.
[0250] In this configuration, old snapshots can be deleted more efficiently.
[0251] In addition, as an example, the volume includes a master volume for inputting and outputting data and a plurality of snapshot volumes copied from the master volume, the plurality of snapshot volumes being generated by copying the master volume and including a plurality of generations of snapshot volumes generated from the master volume at different times, the plurality of snapshot volumes each having data shared in the logical storage area in common with data of the master volume and other snapshot volumes, and data not shared with data of the master volume and other snapshot volumes but independently retained, and a page storing only data independently retained by one of the snapshot volumes is excluded from the objects of the garbage collection.
[0252] In this configuration, garbage collection can be made more efficient based on the generation of the snapshot volume.
[0253] In addition, the disclosed storage system 100 is a storage system having a storage device (PDEV120) and a processor 111 for processing data input to or output from the storage device, wherein the processor 111 performs the following processing: forming a page capable of storing multiple data in a logical storage area formed based on a physical storage area of the storage device; providing a volume, inputting data related to data input and output for the volume into or outputting data from a page of the logical storage area; mapping the data in the logical storage area from the volume; having a plurality of the volumes, and the plurality of the volumes being able to share the data in the logical storage area; performing garbage collection processing, the garbage collection processing deletes data that is not referenced from any of the plurality of volumes as invalid data, moves data referenced from any of the volumes to other pages, and releases the storage area of the page where the data is deleted and moved; and for all the stored data, setting the pages mapped from the same volume as outside the objects of the garbage collection processing, and, when one of the volumes that maps the data of the page set as outside the object of the garbage collection processing is deleted, deleting the data to release the storage area of the page.
[0254] Therefore, the GC processing amount can be suppressed, the memory can be managed efficiently, and the data processing performance can be maintained.
[0255] In addition, the volume includes a main volume for inputting and outputting data and multiple snapshot volumes copied from the main volume. In addition to setting pages to which all data is mapped only from the same snapshot volume as objects of the garbage collection process, pages storing data mapped from the main volume are set as objects of the garbage collection process.
[0256] Therefore, garbage collection related to the snapshot volume can be made more efficient.
[0257] In addition, the volume includes a master volume for inputting and outputting data and a plurality of snapshot volumes copied from the master volume, the plurality of snapshot volumes are snapshot volumes of multiple generations copied from the same master volume at different times, the snapshot volumes of the multiple generations are snapshot volumes deleted starting from an older generation, and the same plurality of data as the snapshot volume of the latest generation among the one or more snapshot volumes storing the respective data are stored in the same page and set in a page outside the object of garbage collection.
[0258] Therefore, old snapshots can be deleted efficiently.
[0259] In addition, the present invention is not limited to the above-mentioned embodiments, and includes various modifications. For example, Figure 1 The storage system 100 is described as only one, but it can also be a cluster structure composed of multiple storage systems, and the storage system can also be located on the cloud. In addition, the above embodiments are examples described in detail to easily explain the present invention, and are not limited to all the structures described. In addition, it is not limited to the deletion of the structure, and the structure can also be replaced or added.
[0260] In addition, the above-mentioned structures, functions, processing parts, processing units, etc. can also be implemented in part or in whole by hardware, for example, by designing with integrated circuits. In addition, the present invention can also be implemented by the program code of the software that realizes the functions of the embodiments. In this case, a recording medium with program code recorded is provided to the computer, and the processor possessed by the computer reads the program code stored in the recording medium. In this case, the program code itself read from the recording medium realizes the functions of the above-mentioned embodiments, and the program code itself and the recording medium storing the program code constitute the present invention. As a recording medium for providing such a program code, for example, a floppy disk, CD-ROM, DVD-ROM, hard disk, SSD (solid state drive), optical disk, magneto-optical disk, CD-R, magnetic tape, non-volatile memory card, ROM, etc. are used.
[0261] In addition, the program code that realizes the functions described in this embodiment can be implemented by a wide range of programs or script languages such as assembly language, C / C++, perl, Shell, PHP, Java (registered trademark), etc.
[0262] In the above-mentioned embodiments, the control lines and information lines are those considered necessary for the description, and not all control lines and information lines are necessarily shown in the product. All structures may be connected to each other.
Claims
1. A storage system comprising: a storage device; and a processor for processing data input to or output from the storage device, characterized in that: The processor performs the following processing: In a logical storage area formed based on a physical storage area of the storage device, forming a page capable of storing a plurality of data; providing a volume, inputting data related to data input and output for the volume into or outputting data from a page of the logical storage area; The data of the logical storage area is mapped from the volume; The storage area can be released in units of pages; There are a plurality of volumes, and the plurality of volumes can share data in the logical storage area; performing garbage collection, wherein the garbage collection deletes data that is not referenced from any of the plurality of volumes as invalid data, moves data referenced from any of the volumes to other pages, and releases a storage area of the page where the data is deleted and moved; as well as By the garbage collection, the plurality of data are stored in the page as the destination of movement so that the plurality of data stored in the same page are mapped from the same volume.
2. The storage system according to claim 1, characterized in that: The volumes include a primary volume for inputting and outputting data and a plurality of snapshot volumes copied from the primary volume. A page of data mapped only from one of the snapshot volumes is set to be outside the scope of the garbage collection.
3. The storage system according to claim 2, characterized in that: In the case of a snapshot volume in which data mapped to a page other than a target of the garbage collection is deleted, the page is deleted without the garbage collection to release the storage area.
4. The storage system according to claim 1, characterized in that: The volumes include a primary volume for inputting and outputting data and a plurality of snapshot volumes copied from the primary volume. The plurality of snapshot volumes are snapshot volumes of multiple generations copied from the same primary volume at different times. The snapshot volumes of the multiple generations are snapshot volumes deleted starting from the oldest generation. The same plurality of data as the snapshot volume of the latest generation among the one or more snapshot volumes storing the respective data are stored in the same page and set in a page that is not a target of the garbage collection.
5. The storage system according to claim 1, characterized in that: The volumes include a primary volume for inputting and outputting data and a plurality of snapshot volumes copied from the primary volume. The plurality of snapshot volumes are generated by copying the primary volume and include snapshot volumes of multiple generations generated from the primary volume at different times. The plurality of snapshot volumes each have data that is shared with data of the primary volume and other snapshot volumes in the logical storage area, and data that is not shared with data of the primary volume and other snapshot volumes and is retained independently. A page storing only data held by the snapshot volume alone is excluded from the garbage collection target.
6. A storage system comprising: a storage device; and a processor for processing data input to or output from the storage device, characterized in that: The processor performs the following processing: In a logical storage area formed based on a physical storage area of the storage device, forming a page capable of storing a plurality of data; providing a volume, inputting data related to data input and output for the volume into or outputting data from a page of the logical storage area; The data of the logical storage area is mapped from the volume; There are a plurality of volumes, and the plurality of volumes can share data in the logical storage area; performing a garbage collection process, wherein the garbage collection process deletes data that is not referenced from any of the plurality of volumes as invalid data, moves data referenced from any of the volumes to other pages, and releases a storage area of the page where the data is deleted and moved; as well as For all stored data, pages mapped from the same volume are set as outside the objects of the garbage collection process, and when one of the volumes mapping the data of the pages set as outside the objects of the garbage collection process is deleted, the data is deleted to release the storage area of the page.
7. The storage system according to claim 6, characterized in that: The volumes include a primary volume for inputting and outputting data and a plurality of snapshot volumes copied from the primary volume. In addition to setting pages where all data is mapped only from the same snapshot volume as targets of the garbage collection process, pages storing data mapped from the primary volume are set as targets of the garbage collection process.
8. The storage system according to claim 6, characterized in that: The volumes include a primary volume for inputting and outputting data and a plurality of snapshot volumes copied from the primary volume. The plurality of snapshot volumes are snapshot volumes of multiple generations copied from the same primary volume at different times. The snapshot volumes of the multiple generations are snapshot volumes deleted starting from the oldest generation. The same plurality of data as the snapshot volume of the latest generation among the one or more snapshot volumes storing the respective data are stored in the same page and set in a page that is not a target of the garbage collection.
