Storage Systems
The storage system optimizes snapshot methods by managing data in logical storage areas to reduce garbage collection processing, maintaining efficient memory and I/O performance.
Patent Information
- Application Number
- JP2023089833
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2023-05-31
- Publication Date
- 2025-09-01
- Estimated Expiration
- 2043-05-31
Smart Images

Figure 0007731935000001 
Figure 0007731935000002 
Figure 0007731935000003
Abstract
Description
[Technical Field]
[0001] The present invention relates to a storage system. [Background technology]
[0002] In recent years, the need for data utilization has increased, leading to more opportunities for data duplication. Accordingly, snapshot functions have become increasingly important in storage systems. A typical method for implementing snapshots has traditionally been the Redirect on Write (RoW) method (see, for example, Patent Document 1). The RoW method has the advantage of having little impact on I / O performance, since no data copying is performed during I / O. The RoW method is widely adopted in AFA (All Flash Array) devices.
[0003] The RoW method is a method of writing data after it has been written. After writing is a data storage method in which, when data is written to a storage system, the old data that was stored before the write is not overwritten, but the write data is stored in a new area and the meta information is rewritten so that it references the data stored in the new area. In this case, the old data before the update becomes invalid data known as garbage. As the amount of garbage increases due to write processing, it puts pressure on the capacity of the storage system, so it is necessary to perform garbage collection (GC) to collect the garbage and free up space, thereby securing capacity in the storage system. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Japanese Patent Publication No. 2022-26812 Summary of the Invention [Problem to be solved by the invention]
[0005] In GC processing, valid data other than garbage is copied to another area for each capacity management unit of the storage system, and freed up the target area to secure free space. When a snapshot is taken from the source volume and written, the differential data between the source volume and the snapshot increases, and the valid data in the storage system also increases. With conventional technology, as the amount of valid data increases, the amount of valid data copied when GC is executed also increases, resulting in an increase in the amount of GC processing and an impact on I / O performance.
[0006] Furthermore, when a snapshot is deleted, the differential data becomes garbage. GC processing is required to collect the garbage generated by deleting the snapshot and free up space in the storage system, and the operation of GC processing can have an impact on I / O performance.
[0007] The present invention has been made in view of the above-mentioned problems, and has as its object to reduce the amount of GC processing when using snapshots in a storage system and maintain I / O performance. [Means for solving the problem]
[0008] In order to solve the above-mentioned problems, one representative storage system of the present invention is a storage system comprising a storage device and a processor that processes data input / output to the storage device, wherein the processor forms pages capable of storing multiple pieces of data within a logical storage area configured based on the physical storage area of the storage device, provides a volume, and inputs / outputs data related to data input / output to / from the volume to a page of the logical storage area, wherein mapping is performed from the volume to the data of the logical storage area, and the storage area can be released in page units, there are multiple volumes, and the multiple volumes can share the data of the logical storage area, and data that is not referenced by any of the multiple volumes is deleted as invalid data, data referenced by any of the volumes is moved to another page, and garbage collection is performed to release the storage area of the page from which the data has been deleted and moved, and the garbage collection stores the multiple pieces of data in the page to which it has been moved so that the multiple pieces of data stored in the same page are mapped from the same volume. Furthermore, one representative storage system of the present invention is a storage device comprising a storage device and a processor that processes data input and output to the storage device, wherein the processor forms pages capable of storing a plurality of data within a logical storage area configured based on the physical storage area of the storage device, provides a volume, and inputs and outputs data related to data input and output to the volume to a page of the logical storage area, wherein mapping is performed from the volume to the data of the logical storage area, there are a plurality of volumes, and the plurality of volumes can share the data of the logical storage area, and deletes data that is not referenced by any of the plurality of volumes as invalid data, moves data referenced by any of the volumes to another page, and performs garbage collection processing to free the storage area of the page from which the data has been deleted and the data has been moved, and sets pages mapped from the same volume for all data to be stored as excluded from the garbage collection processing, and when one of the volumes to which data of the page set as excluded from the garbage collection processing is mapped is deleted, the processor deletes the data and frees the storage area of the page. [Effects of the Invention]
[0009] According to the present invention, it is possible to efficiently manage memory in a storage system and maintain data processing performance. Problems, configurations, and effects other than those described above will become apparent from the following description of the embodiment. [Brief explanation of the drawings]
[0010] [Figure 1] FIG. 1 illustrates an example of the configuration of a system including a storage system according to an embodiment. [Figure 2] 2 is a diagram illustrating an example of a memory configuration and an example of programs and management information in the memory according to the first embodiment; FIG. [Figure 3] FIG. 2 is a diagram illustrating an example of a logical configuration in a storage system according to an embodiment. [Figure 4]FIG. 2 is a diagram illustrating a detailed example of a logical configuration in a storage system according to an embodiment. [Figure 5] FIG. 10 is a diagram illustrating an example of a directory table. [Figure 6] FIG. 10 is a diagram showing an example of a mapping table for a Snapshot management volume. [Figure 7] FIG. 10 is a diagram showing an example of a mapping table for an additional volume. [Figure 8] FIG. 10 is a diagram illustrating an example of a volume management table. [Figure 9] FIG. 10 is a diagram illustrating an example of a directory area allocation management table. [Figure 10] FIG. 10 illustrates an example of a directory tree management table. [Figure 11] FIG. 10 is a diagram illustrating an example of a snapshot generation management table. [Figure 12] FIG. 10 is a diagram illustrating an example of a page conversion table. [Figure 13] FIG. 10 is a diagram illustrating an example of a page allocation management table. [Figure 14] FIG. 10 is a diagram illustrating an example of a sub-block management table. [Figure 15] FIG. 10 is a diagram illustrating an example of a search data management table. [Figure 16] 10 is a flowchart showing the processing steps of a snapshot creation process. [Figure 17] 10 is a flowchart showing the processing procedure of an additional writing process. [Figure 18] 10 is a flowchart showing a processing procedure for a read process. [Figure 19] 10 is a flowchart showing the procedure of a front-end write process. [Figure 20] 10 is a flowchart showing the processing procedure of back-end write processing. [Figure 21] 10 is a flowchart showing the processing procedure of a Snapshot data defragmentation process according to the first embodiment. [Figure 22] 10 is a flowchart showing the processing procedure of a data search process according to the first embodiment. [Figure 23] 10 is a flowchart illustrating a procedure for garbage collection processing according to the first embodiment. [Figure 24] 10 is a flowchart showing the processing steps of a snapshot deletion process. [Figure 25] FIG. 1 is a diagram (part 1) for explaining the effect of the first embodiment. [Figure 26] FIG. 10 is a diagram (part 2) for explaining the effect of the first embodiment. [Figure 27] 10 is a flowchart showing the processing procedure of a data search process according to the second embodiment. [Figure 28] 11 is a flowchart showing the processing procedure of a Snapshot data defragmentation process according to the third embodiment. [Figure 29] 11 is a flowchart showing the processing procedure of data copy processing according to the third embodiment. DETAILED DESCRIPTION OF THE INVENTION
[0011] In the following description, an "interface unit" may refer to one or more interfaces. These one or more interfaces may be one or more homogeneous communication interface devices (for example, one or more NICs (Network Interface Cards)), or two or more heterogeneous communication interface devices (for example, an NIC and an HBA (Host Bus Adapter)).
[0012] In the following description, a "memory unit" refers to one or more memories, typically a primary storage device. At least one memory in the memory unit may be a volatile memory or a non-volatile memory.
[0013] Furthermore, in the following explanation, a "PDEV unit" refers to one or more PDEVs, and may typically be an auxiliary storage device. "PDEV" refers to a physical storage device, and is typically a non-volatile storage device, such as an HDD (Hard Disk Drive) or SSD (Solid State Drive).
[0014] In the following description, a "storage unit" refers to at least one of a memory unit and at least a part of a PDEV unit (typically at least the memory unit).
[0015] 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 single-core or multi-core.
[0016] Furthermore, the at least one processor may be a processor in the broad sense, such as a hardware circuit (for example, a field-programmable gate array (FPGA) or an application-specific integrated circuit (ASIC)) that performs part or all of the processing.
[0017] In the following explanation, information that produces an output for an input may be described using expressions such as "xxx table," but this information may be data of any structure, or may be a learning model such as a neural network that produces an output for an input. Therefore, an "xxx table" may be referred to as "xxx information."
[0018] Furthermore, in the following description, the configuration 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.
[0019] In addition, in the following explanation, processing may be described using the "program" as the subject, but since the program is executed by the processor unit to perform the specified processing while appropriately using the memory unit and / or interface unit, etc., the subject of the processing may also be the processor unit (or a device such as a controller that has that processor unit).
[0020] The program may be installed in a device such as a computer, or may be stored in, for example, a program distribution server or a computer-readable (e.g., non-transitory) recording medium. Also, in the following description, two or more programs may be realized as one program, or one program may be realized as two or more programs.
[0021] In the following description, a "computer system" refers to a system including one or more physical computers. A physical computer may be a general-purpose computer or a dedicated computer. A physical computer may function as a computer that issues I / O (Input / Output) requests (e.g., a host computer), or as a computer that performs data I / O in response to I / O requests (e.g., a storage device).
[0022] That is, the computer system may be at least one of a host system, which is one or more host computers that issue I / O requests, and a storage system, which is one or more storage devices that perform data I / O in response to the I / O requests. One or more virtual computers (e.g., VMs (Virtual Machines)) may be executed on at least one physical computer. The virtual computer may be a computer that issues I / O requests, or a computer that performs data I / O in response to the I / O requests.
[0023] Furthermore, the computer system may be a distributed system configured with one or more (typically, a plurality of) physical node devices. A physical node device is a physical computer.
[0024] Furthermore, when a physical computer (e.g., a node device) executes predetermined software, SDx (Software-Defined anything) may be constructed on the physical computer or a computer system including the physical computer. For example, SDS (Software Defined Storage) or SDDC (Software-Defined Datacenter) may be adopted as SDx.
[0025] For example, a storage system as an SDS may be constructed by running software having a storage function on a physical general-purpose computer.
[0026] Furthermore, at least one physical computer (e.g., a storage device) may run one or more virtual computers as a host system and a virtual computer as a storage controller of the storage system (typically, a device that inputs and outputs data to and from a PDEV unit in response to an I / O request).
[0027] In other words, such at least one physical computer may have both the functionality as at least part of a host system and the functionality as at least part of a storage system.
[0028] Furthermore, a computer system (typically a storage system) may have a redundant configuration group. The redundant configuration may be a configuration with multiple node devices, such as erasure coding, RAIN (Redundant Array of Independent Nodes), and inter-node mirroring, or may be a configuration with a single computer (for example, a node device), such as one or more RAID (Redundant Array of Independent (or Inexpensive) Disks) groups as at least a part of a PDEV unit.
[0029] In the following description, a "dataset" is a logical block of electronic data as seen from a program such as an application program, and may be, for example, any of a record, a file, a key-value pair, and a tuple.
[0030] Furthermore, in the following description, identification numbers are used as identification information for various objects, but other types of identification information (for example, identifiers including alphabetic characters or symbols) may also be used.
[0031] In addition, in the following description, when describing elements of the same type without distinguishing between them, reference symbols (or common symbols among the reference symbols) may be used, and when describing elements of the same type with distinction between them, the identification numbers (or reference symbols) of the elements may be used.
[0032] For example, when describing a "page," which is a unit of storage area, without making any particular distinction, it may be written as "page 312." When describing individual pages with distinction, the page number may be used to describe it as "page #0" or "page #1," or a reference number may be used to describe it as "page 312-0" or "page 312-1." [Example]
[0033] Hereinafter, a first embodiment of the present invention will be described with reference to FIGS.
[0034] 1 is a diagram showing an example of the configuration of a system including a storage system 100. The storage system 100 has a plurality of PDEVs 120 (or one PDEV) 120, and a storage controller 110 connected to the plurality of PDEVs 120.
[0035] The storage controller 110 has an SI / F 114, an 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.
[0036] 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 an FC (Fibre Channel) network 104.
[0037] The server system 102 sends an I / O request (write request or read request) to the storage controller 110, specifying the I / O destination (for example, a logical volume number such as a LUN (Logical Unit Number) or a logical address such as an LBA (Logical Block Address)).
[0038] 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.
[0039] The network 104 and the network 105 may be the same communication network. The management system 103 manages the storage system 100.
[0040] The PI / F 113 is a communication interface device that mediates the exchange of data between a plurality of PDEVs 120 and the storage controller 110. A plurality of PDEVs 120 (or one) are connected to the PI / F 113.
[0041] The memory 112 stores programs executed by the processor 111 and data used by the processor 111. The processor 111 executes the programs stored in the memory 112. In this embodiment, for example, a set of the memory 112 and the processor 111 is duplicated.
[0042] 2 is a diagram showing an example of the configuration of the memory 112 and the programs and management information stored in the memory 112. The memory 112 includes memory areas called 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 a processor 111 that belongs to the same group as the memory 112 that includes the local memory 200.
[0043] The local memory 200 stores a snapshot creation program 210, a read program 211, a front-end write program 212, a back-end write 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.
[0044] The cache memory 201 temporarily stores data sets that are written to or read from the PDEV 120 .
[0045] The shared memory 203 is used by both the processor 111 that belongs to the same group as the memory 112 that includes this shared memory 203, and the processor 111 that belongs to a different group. The shared memory 203 stores management information.
[0046] 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 translation table 224 , a page allocation management table 225 , a sub-block management table 226 , and a search data management table 227 .
[0047] These tables will be described later with reference to the figures.
[0048] 3 is a diagram showing an example of the logical configuration within the storage system 100. The storage system 100 is a storage system that uses the RoW (Redirect on Write) method when creating snapshots. The storage system 100 has a PVOL (Primary Volume) 300, a Snapshot 301, an Append Volume 303, a Pool 304, and an RG (Raid Group) 305 as its logical configuration.
[0049] PVOL300 is a logical volume provided to the host device, and stores write data or reads and transfers data to the host device based on read / write requests from the host device. Snapshot301 is a replicated volume of PVOL300 created using the RoW method and is provided to the host device. Snapshot301 can also be read and written from the host device if it is in a "SUSPEND (split)" state, meaning that data replication from PVOL300 has been completed. The write volume 303 is a logical volume for storing data written from the server system 102 by appending it to the write volume 303. One write volume 303 is associated with one PVOL 300 and one or more snapshots 301.
[0050] The Pool 304 is a logical storage area based on one or more RGs 305. The Pool 304 is made up of a plurality of pages 312-i (i=0, 1, . . . n-1). The RG 305 is a space for a RAID group made up of a plurality of PDEVs 120. An example of writing to a snapshot 301 in the SUSPEND (split) state is shown below. When the storage controller 110 receives a write request from the server system 102, it compresses the write target dataset C and appends the compressed dataset C' to page 312-1 allocated to the append volume 303 corresponding to the snapshot 301.
[0051] Pages 312 are allocated from Pool 304 to Write Volume 303, and the total capacity of the allocated pages 312 is the capacity used by the storage system 100. In other words, page 312-1 is page 312 allocated to the Write Volume 303 corresponding to Snapshot 301, in other words, page 312 indirectly allocated to Snapshot 301.
[0052] The compressed data set C' is stored in an appending manner in the page 312-1. A page allocated to the appending volume 303 (a page indirectly allocated to the snapshot 301) can be called an "append page." In the following explanation, the area of page 312-1 occupied by the compressed data set is referred to as a "subblock 313." Multiple subblocks 313 are stored within page 312. Read and write processes in response to read and write requests from the server system 102 are performed in subblock units. If all of the subblocks 313 within page 312 are unnecessary invalid data, the capacity of the storage system 100 can be secured by releasing the storage area in page units. The meta information 311 is a table that manages the storage address of the sub-block 313 in the append page that corresponds to the logical data block 310 of the PVOL 300 or the Snapshot 301. After the compressed data set C' is appended, the reference address of the meta information 311 that corresponds to the logical address of the logical data block "C" 310-2 is updated to the append address of the compressed data set C' in the append page 312-1, thereby making it possible to manage the data written to the Snapshot 301.
[0053] FIG. 4 is a diagram showing an example of a logical configuration that describes in detail meta-information that manages the relationship between the logical data blocks 310 of the PVOL 300 and the Snapshot 301 and the storage destination addresses of the sub-blocks 313 in the append page. The meta information 311 is made up of a directory table 402 and a mapping table 403. The directory table 402 and the mapping table 403 are stored in areas in the Snapshot management volume 401 and the append volume 303. The Snapshot management volume 401 is a logical volume for managing the data sharing relationship between the PVOL 300 and the Snapshot 301 .
[0054] The directory table 402-0 for PVOL is arranged in an area within the Snapshot management volume, and is a table that converts the addresses within the PVOL of the logical data blocks 310-i (i=0, 1) of the PVOL 300 into addresses within the Snapshot management volume 401 where the mapping table 403-0 is stored.
[0055] The snapshot directory table 402-1 is arranged in an area within the snapshot management volume, and is a table that converts addresses within the logical data blocks 310-i (i=0, 2) of the snapshot 301 into addresses within the snapshot management volume 401 where the mapping table 403-0 is stored. The snapshot directory table 402-1 is a copy of the PVOL directory table 402-0. It has the same table configuration as the PVOL directory table 402-0.
[0056] Furthermore, a mapping table 403-0 for the PVOL 300 and the Snapshot 301 is arranged in the Snapshot management volume 401. A mapping table 403-0 exists for each PVOL 300. The mapping table 403-0 is a table that converts addresses in the PVOL / Snapshot of logical data blocks 310-i (i=0, 2, 3) into addresses in the append area 404-0 of the Snapshot management volume. In this way, the information required to access the additional write area 404-0 from the PVOL 310 or the Snapshot 301 is managed with the directory table 402 as the first layer and the mapping table 403 as the second layer.
[0057] Furthermore, the append volume 303 is a logical volume for storing data by appending, and compressed sub-blocks 313 are appended and stored in the append area 404-1 of the append volume at addresses that differ from the storage addresses of the logical data blocks 310 in the append area 404-0 of the Snapshot management volume. For this reason, a directory table 402-2 and a mapping table 403-1 are also arranged in the append volume 303. The directory table 402-2 and mapping table 403-1 of the append volume are used to convert the addresses of the logical data blocks 310 in the append area 404-0 of the Snapshot management volume to addresses within the append area 404-1 of the append volume. In garbage collection processing, when a sub-block 313 is copied, the directory table 402 and mapping table 403 that manage the storage addresses of the sub-blocks must also be updated to the copy destination address. Since the append volume also has a directory table 402-2 and a mapping table 403-1, there is no need to update both the directory table 402-0 for the PVOL and the directory table 402-1 for the snapshot, which is efficient.
[0058] An example of the table will be described below. 5 is an explanatory diagram of the configuration of directory table 402-i (i=0, 1, 2). PVOL directory table 402-0, Snapshot directory table 402-1, and Append Volume directory table 402-2 have the same configuration. One entry in each directory table 402 corresponds to data in units of the logical data granularity (e.g., 256 KB) of PVOL 300.
[0059] The directory table 402 has an address in PVOL / Snapshot 500 and a referenced address (address in mapping area) 501. The address in PVOL / Snapshot 500 is the storage logical address of the target data in PVOL 300 in the case of directory table 402-0, the storage logical address of the target data in Snapshot 301 in the case of directory table 402-1, and the storage logical address of the target data in append area 404-0 of the Snapshot management table in the case of directory table 402-2. The referenced address (address in mapping area) 501 is pointer information to the mapping table 403.
[0060] The reference address (address within mapping area) 501 corresponds to the address within mapping area 600 of the mapping table 403 associated with the directory table 402 in question.
[0061] 6 is an explanatory diagram of the configuration of the snapshot management mapping table 403-0. The mapping table 403-0 has an address 600 in the mapping area and a reference address (address in the additional write area) 601.
[0062] The address in the mapping area 600 is the reference address (address in the mapping area) 501 of the directory table 402-i (i=0, 1) associated with the mapping table 403-0. The reference address (address in the appending area) 601 is an address in the appending area 404-0 where the target data is stored.
[0063] 7 is an explanatory diagram of the configuration of the mapping table for append volume 403-1. The mapping table 403-1 has an address in the mapping area 700, a reference address (address in the append area) 701, a capacity after compression 702, and a snapshot #703.
[0064] The address in the mapping area 700 is the reference address (address in the mapping area) 501 of the directory table 402-2 associated with the mapping table 403-1. The reference address (address in the appending area) 701 is an address in the appending area 404-1 where the target data is stored. The compressed capacity 702 is the amount of data after compression when the target data of the PVOL 300 or Snapshot 301 is stored in the appending area 404-1. Snapshot#703 is information set by the Snapshot data defragmentation program 214, and is a number for uniquely identifying the Snapshot 301 copied from the PVOL 300.
[0065] 8 is an explanatory diagram of the configuration 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 append Volume 404. The Volume management table 220 includes VOL# / Snapshot#800, attribute 801, PVOL#802, directory#803, VOL capacity 804, and Pool#805.
[0066] VOL#800 is a number that identifies a volume. Attribute 801 is the type of volume identified by VOL#800, and can be PVOL, Snapshot, append, etc. PVOL#802 is a number that identifies the PVOL that is the source of the snapshot. Directory#803 is a number that identifies the directory table assigned to the PVOL or snapshot. For example, in FIG. 8, the snapshot with Snapshot#2 has a source PVOL#0 and is assigned directory table #5. The PVOL# and directory# of the snapshot management volume 401 and append volume 303 are NULL.
[0067] The capacity 804 is the capacity of the volume identified by VOL# 800. The pool# 805 is the number of the pool from which the volume identified by VOL# 800 is extracted.
[0068] 9 is an explanatory diagram of the configuration of the directory area allocation management table 221. The directory area allocation management table 221 is a table that manages which volume or snapshot a directory #900 is allocated to by associating it with an allocation destination VOL / Snapshot #901.
[0069] Fig. 10 is an explanatory diagram of the configuration of the directory tree management table 222. The directory tree management table 222 is a table that manages the directory # of created snapshots in the order in which they were created. For example, in Fig. 10, if the directory #1000 of a certain snapshot is 2, the directory # of the snapshot that is one generation newer than that snapshot (previous directory #1001) is 1, and the directory # of the snapshot that is one generation older than that snapshot (next directory #1002) is 3.
[0070] 11 is an explanatory diagram of the configuration of the Snapshot generation management table 223. The Snapshot generation management table 223 manages the latest generation of a Snapshot for each PVOL# of PVOL 300, which is the replication source. The Snapshot generation management table 223 has PVOL# 1100, latest generation # 1101, generation # 1102, Snapshot creation time 1103, Snapshot # 1104, status 1105, and defrag flag 1106. The Snapshot generation management table 223 manages, for example, 1024 generations for each PVOL# (generation # = 0 to 1023).
[0071] In the Snapshot generation management table 223, the latest generation # is incremented each time a snapshot is created for each PVOL #, and the snapshot creation time 1103, snapshot # 1104, status 1105, and defragmentation flag 1106 corresponding to the latest generation # 1101 are updated. The status 1105 includes PAIR, in which, after a snapshot of the PVOL is created, I / O to the snapshot is disabled but the data between the PVOL and the snapshot is synchronized. The status 1105 also includes SUSPEND (split), in which the data between the PVOL and the snapshot is not synchronized but I / O to the snapshot is enabled. The defragmentation flag 1106 manages whether the Snapshot data defragmentation program 214 has been executed for the snapshot 301, and is updated to the uncompleted status after the snapshot is created.
[0072] 12 is an explanatory diagram of the configuration of the page translation table 224. The page translation table 224 is set for each Volume, such as a PVOL or an additional Volume. The page translation table 224 holds information regarding the relationship between an area in the additional Volume 303 (for example, page 312-0) and page 312-2, for example.
[0073] For example, the page translation table 224 has an entry for each area in the append volume 303. Each entry stores information such as an address in VOL 1200, an allocation flag 1201, a page # 1202, and a GC unnecessary flag 1203. The following explanation will be given taking one area (called the "target area") as an example.
[0074] The address in VOL 1200 is information about the logical address (for example, the first logical address) of the target area. The allocation flag 1201 is information about whether page 312-2 is allocated to the target area ("allocated") or not ("unassigned"). The page # 1202 is information about the number of page 312-2 allocated to the target area. The GC not required flag 1203 is information about whether the page does not require GC processing ("not required") or whether the page requires GC processing ("required").
[0075] 13 is an explanatory diagram of the configuration 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 regarding the relationship between a page 312-2 and its allocation destination. For example, the page allocation management table 225 has an entry for each page 312-2.
[0076] Each entry stores information such as a page #1300, an allocation flag 1301, an allocation destination VOL #1302, and an address within the allocation destination VOL 1303. The following explanation takes one page 312 (called the "target page") as an example. The page #1300 is information about the number of the target page. The allocation flag 1301 is information about whether the target page is allocated ("allocated") or not ("unassigned").
[0077] The allocation destination VOL# 1302 is information on the number of the allocation destination VOL (append volume 303) of the target page. The allocation destination VOL address 1303 is information on the logical address (for example, the first logical address) of the area in the allocation destination VOL of the target page.
[0078] 14 is a diagram showing an example of the sub-block management table 226. The sub-block management table 226 is set for each append volume 303. The sub-block management table 226 holds information about the sub-blocks 313. For example, the sub-block management table 226 has an entry for each sub-block 313.
[0079] Each entry stores information such as a page # 1400, an address within the page 1401, a sub-block size 1402, a referrer address 1403, and an allocation flag 1404. Below, an explanation will be given taking one sub-block 313 (referred to as a "target sub-block") as an example.
[0080] Page #1400 is information about the number of page 312-0 that includes the target sub-block. In-page address 1401 is information about the logical address of the target sub-block in page 312-0. Sub-block size 1402 is information about the size of the target sub-block (the size of the compressed data set stored in the target sub-block).
[0081] The referencing address 1403 is address information referencing the target sub-block. The referencing address of the sub-block 313 of the append volume is an address within the append area 404-0 of the Snapshot management volume. The allocation flag 1404 is information indicating whether the target sub-block is allocated ("allocated") or not allocated ("unassigned"), in other words, whether the target sub-block is in use or unused.
[0082] 15 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 processing target data searched for by the Snapshot data defragmentation program 214. It has entries for the number of processing target data searched for, and has data #1500 of the data and an address (address in the additional write area) 1501 where that data is stored.
[0083] 16 is a flowchart showing the processing steps of the snapshot creation process. The snapshot creation process is a process for copying data from PVOL300, which is the source VOL, to Snapshot301. In the RoW method, user data is not copied, but rather the directory table 402-0 for PVOL, which manages data storage destination addresses, is copied to the directory table 402-1 for snapshots, making it possible to reference data in PVOL300 from Snapshot301, and making it appear as if the data has been copied to Snapshot301. The snapshot creation process is executed by the snapshot creation program 210 in response to an instruction from the management system 103.
[0084] First, in 1600, the snapshot creation program 210 receives the VOL# of the source VOL, which is the PVOL for which the snapshot is to be created. Next, in 1601, the snapshot creation program 210 determines whether the dirty data received in 1600 that has not been destaged to the source VOL is in the cache memory 201. If there is dirty data that has not been destaged to the source VOL (1601 Yes), the snapshot creation program 210 proceeds to 1602, and if there is no dirty data (1601 No), the snapshot creation program 210 proceeds to 1603. In 1602, the snapshot creation program 210 performs an append process for the dirty data, the details of which will be described later with reference to FIG. 17.
[0085] In 1603, the Snapshot creation program 210 obtains the capacity and directory number of the 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), which is a copy of the source VOL, can be secured in the Snapshot management volume 401. If the directory area for the Snapshot (copy destination) can be secured (1605 Yes), the Snapshot creation program 210 proceeds to 1606, and if it cannot be secured (1605 No), this Snapshot creation process is terminated.
[0086] In 1606, the Snapshot creation program 210 allocates a directory # for the Snapshot by referencing the directory area allocation management table 221, and updates the allocation destination Snapshot # of the allocated directory #. Next, in 1607, the Volume management table 220 is updated by adding volume information including the PVOL#, directory #, capacity, and Pool# of the attribute=Snapshot created in this Snapshot creation process.
[0087] Next, in 1608, the snapshot creation program 210 updates the previous directory #1001 and next directory #1002 of the target directory # in the directory management table so that the directory # of the created snapshot is connected to the location located furthest to the next side of the directory tree management table 222. Also, the next directory # of the directory # of the snapshot that is one generation older and was located furthest to the next side before the update is updated to the directory # of the created snapshot.
[0088] Next, in 1609, the snapshot creation program 210 increments the latest generation #1101 of the created snapshot by +1, sets the snapshot creation time 1103, snapshot #1104 (corresponding to VOL# in the volume management table 220), status 1105 = SUSPEND, and defragmentation flag 1106 = Pending, and updates the snapshot generation management table 223.
[0089] 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 directory copy instruction of 1610 and copies the directory table 402-0 of the PVOL, which is the source VOL, to the directory area secured in 1606. The directory table 402-1 created by copying is referenced in the I / O processing of the created snapshot.
[0090] Fig. 17 is a flowchart showing the processing steps of the append process. The append process is a process in which data stored in the cache memory 201 of the storage system by the front-end write process 212 is transferred to the append volume 303, appended, and the directory table 402 and mapping table 403 are updated so that the appended data is referenced. Fig. 17 shows details of the append processes executed in 1602 of Fig. 16, 1904 of Fig. 19, and 2001 of Fig. 20. The append process executed in 1602 of Fig. 16 will be explained below, with the Snapshot creation program 210 as the processing subject.
[0091] In the example shown in FIG. 19, the front-end write program 212 is the processing subject, and in the example shown in FIG. 20, the back-end write program 213 is the processing subject.
[0092] First, in 1700, the snapshot creation program 210 identifies dirty data. Next, in 1701, the snapshot creation program 210 references the snapshot generation management table 223 and determines whether the PVOL has a snapshot in the SUSPEND state. If a snapshot in the SUSPEND state exists, another snapshot creation program 210 is running, and directory copying may be in progress, so the snapshot creation program 210 proceeds to 1702. If there are no snapshots in the SUSPEND state (1701 No), the snapshot creation program 210 proceeds to 1704, and if there are snapshots in the SUSPEND state (1701 Yes), the snapshot creation program 210 proceeds to 1702.
[0093] In 1702, the snapshot creation program 210 determines whether the directory copy corresponding to the logical address (LBA) of the dirty data to be appended has been completed. If append processing is carried out before the directory copy is completed, the directory table to be copied will be updated, making it impossible to perform the directory copy and creating a snapshot impossible. If the directory copy is completed (1702 Yes), the snapshot creation program 210 proceeds to 1704, and if the directory copy is not completed (1702 No), it performs a purge copy of the directory information of the area in question (1703). Purge copy is a process of pinpointing and copying only the directory information of the area to be appended when appending an area that has not been copied in the copy process in 1611 of Figure 16.
[0094] Next, in 1704, the Snapshot creation program 210 reserves an area in the append area 404-0 of the Snapshot management volume that corresponds to the logical address (LBA) of the dirty data to be appended. Next, in 1705, the Snapshot creation program 210 holds the storage location in the append area reserved in 1704 in an unused entry of the mapping table 403-0 of the Snapshot management volume that does not have a reference address (address in the append area) 601 set. In other words, it sets the reserved append area address to the reference address (address in the append area) 601. Next, in 1706, the Snapshot creation program 210 sets the mapping area address 600 of the mapping information created in 1705 to the reference address (address in the mapping area) 501 in an entry of the directory table 402-1 that corresponds to the logical address (LBA accessible from the host) of the data.
[0095] Next, in 1707, the Snapshot creation program 210 compresses the dirty data identified in 1700. Next, in 1708, the Snapshot creation program 210 determines whether there is free space in the append page 312-0 of the append volume, which is the transfer destination of the compressed data. If there is free space (1708 Yes), the Snapshot creation program 210 proceeds to 1710, and if there is no free space (1708 No), it allocates a new append page from the Pool 304. Next, in 1710, the Snapshot creation program 210 copies the compressed data set compressed in 1707 to the append area 404-1 of the append volume that corresponds to the source volume. Next, in 1713, the Snapshot creation program 210 destages the dirty data copied to the append area in 1710, and stores the data in the drive.
[0096] 18 is a flowchart showing the processing steps of the read process. The read process is executed by the read program 211 in response to a read request from the host device.
[0097] In 1800, the read program 211 acquires the address in the PVOL or snapshot of the data targeted by the read request from the server system 102. Next, in 1801, the read program 211 determines whether the targeted data of the read request is a cache hit. If the targeted data of the read request is a cache hit (1801 Yes), the read program 211 proceeds to S1807, and if it is not a cache hit (1801 No), proceeds to 1802.
[0098] In 1802, the read program 211 references the directory tables 402-0 and 402-1 of the Snapshot management volume, and acquires the referenced address (address in the mapping area) 501 based on the address in the PVOL / Snapshot acquired in 1800. The read program 211 references the directory table 402-0 for PVOL if the target data of the read request is data in PVOL 300, and references the directory table 402-1 for Snapshot if the target data is data in Snapshot 301.
[0099] Next, in 1803, the read program 211 refers to the Snapshot management volume mapping table 403-0 and acquires the reference address (address in the append area) 601 based on the reference address (address in the mapping area) acquired in 1802.
[0100] Next, in 1804, the read program 211 references the append Volume directory table 402-2 corresponding to the reference address (address in the mapping area of the Snapshot management Volume) acquired in 1803, and acquires the reference address (address in the mapping area) of the append Volume 501. Next, in 1805, the read program 211 references the append Volume mapping table 403-1, and acquires the reference address (address in the mapping area) 701 based on the reference address (address in the mapping area) acquired in 1804.
[0101] Next, in 1806, the read program 211 decompresses the data stored at the address in the write area of the write volume identified in 1805 and stages it in the cache memory.
[0102] Next, in 1807, the read program 211 transfers the data that was cache hit in 1801 or the data that was staged in 1806 to the host device.
[0103] Fig. 19 is a flowchart showing the processing steps of front-end write processing (common to PVOL / Snapshot). Front-end write processing is processing that writes write data to the cache memory 201 of the storage system in synchronization with a write request received from a host device. On the other hand, the back-end write processing described in Fig. 20 is processing that transfers write data (dirty data) in the cache memory 201 to the append area 404-1 of the append volume and stores it in the drive. Front-end write processing is executed by the front-end write program 212 when a write request for PVOL 300 or Snapshot 301 is received from the host device.
[0104] First, in 1900, the front-end write program 212 determines whether the target data of the write request from the host device is a cache hit. If the target data of the write request is a cache hit (1900 Yes), the front-end write program 212 proceeds to 1902, and if there is no cache hit (1900 No), the front-end write program 212 proceeds to 1901. In 1901, the front-end write program 212 reserves a cache area in the cache memory 201.
[0105] In 1902, the front-end write program 212 determines whether the target data that was a cache hit in 1900 is dirty data. If the target data that was a cache hit in 1900 is dirty data (1902 Yes), the front-end write program 212 transfers the processing to 1903, and if it is not dirty data (1902 No), the front-end write program 212 transfers the processing to 1905.
[0106] In 1903, the front-end write program 212 determines whether the WR (WRight) generation # of the dirty data determined in 1902 matches the generation # of the target data of the write request. The WR generation # is held in cache data management information (not shown). In addition, the generation # of the target data of the write request is acquired from the latest generation # 1101 in FIG. 11. 1903 prevents the target data (dirty data) of the most recently acquired snapshot from being updated with the target data of the write request before the append process has been performed, thereby overwriting the data in the snapshot. If the WR generation # and the latest generation # match (1903 Yes), the front-end write program 212 proceeds to 1905, and if the WR generation # and the latest generation # do not match (1903 No), the front-end write program 212 proceeds to 1904.
[0107] In 1904, the front-end write program 212 executes the append process described with reference to Fig. 17. In 1904, dirty data of the WR generation # that does not match the latest generation # is written to the append area and destaged from the cache memory 201.
[0108] 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 a cache area in which dirty data that requires additional writing processing has been added and dirty data can be generated again.
[0109] 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.
[0110] 20 is a flowchart showing the processing steps of backend write processing. The backend write processing is a process in which, when unreflected data (dirty data) is present in the cache memory 201 in the append area 404-1 of the append Volume 303, the unreflected data is written to the append area 106. The backend write processing is performed synchronously or asynchronously with the frontend processing. The backend write processing is executed by the backend write program 213.
[0111] First, in 2000, the backend write program 213 determines whether there is dirty data in the cache memory 201. If there is dirty data in the cache memory 201 (S2000 Yes), the backend write program 213 proceeds to 2001, and if there is no dirty data (2000 No), this backend write processing ends. In 2001, the backend write program 213 executes the append processing described in FIG. 17.
[0112] 21 is a flowchart showing the processing steps of the Snapshot data defragmentation process of Example 1. The Snapshot data defragmentation process 214-1 is started when an instruction to create a snapshot is received from the management system 103 or as periodic asynchronous processing, and executes processing to search for differential data of the snapshot and set the searched differential data as the copy target.
[0113] First, in 2100, the Snapshot defragmentation program 214-1 references the Snapshot generation management table 223 to determine whether there are any Snapshots for which the status 1105 is SUSPEND and the defrag flag 1106 is UNFINISHED that have not yet been defragmented. If there are any Snapshots for which the defragmentation process has not yet been performed (2100 Yes), the process proceeds to 2101, and if there are no Snapshots for which the defragmentation process has not yet been performed (2100 No), the Snapshot data defragmentation process is terminated. In 2101, a Snapshot for which the defragmentation process has not yet been performed is selected.
[0114] Next, in 2102, the snapshot defragmentation program 214-1 refers to the snapshot generation management table to determine whether there is a suspended snapshot in the generation one year newer than the snapshot selected in 2101. If there is a suspended snapshot (2102 Yes), the process proceeds to 2103; if there is no suspended snapshot (2102 No), the process starts again from 2100. For example, the generation #1102 of snapshot #1104 is 100 is 4, and the next newer generation snapshot is snapshot #200, whose generation #1102 is 5 and whose status 1105 is suspended, so the process in 2103 can be performed on the snapshot whose snapshot #1104 is 100. Because this determination indicates that there is a snapshot in the newer generation, the amount of differential data for the snapshot to be processed remains unchanged, and there is no need to perform the same process again.
[0115] In 2103, the Snapshot defragmentation program 214-1 acquires the directory #803 that identifies the directory table of the Snapshot to be processed from the Volume management table 220.
[0116] In the processing from 2104 onwards, the processing is looped from the beginning to the end address of the logical address of the snapshot to be processed. In 2104, the snapshot defragmentation program 214-1 determines whether the end of the logical addresses has been reached. If the end has been reached (2104 Yes), the defragmentation processing of the snapshot to be processed ends, and processing is restarted for other snapshots from 2100. If the end has not been reached (2104 No), the processing proceeds to 2105. In 2105, the snapshot defragmentation program 214-1 performs a search process for the data to be defragmented, the details of which will be described later with reference to FIG. 22.
[0117] In 2106, the Snapshot defragmentation program 214-1 determines whether the defragmentation target data found in 2105 is large enough for one page. If it is (2106 Yes), the defragmentation target data can be neatly consolidated into one page, and the process moves to 2107. If it is not large enough for one page (2106 No), the process moves to 2104, and the data search process continues.
[0118] In 2107 and 2108, by setting a Snapshot# to the data that has been confirmed as the target for defragmentation, the garbage collection process (Figure 23), which actually copies and consolidates the differential data, can determine which data should be consolidated as differential data of which snapshot. Next, in 2107, the Snapshot defragmentation program 214-1 updates the append volume mapping table 403-1 corresponding to the defragmentation target data as a preparatory process for consolidating one page of defragmentation target data. By setting the Snapshot# to be processed in Snapshot# 703 of the append volume mapping table 403-1, it becomes possible to determine which Snapshot data is the data of which defragmentation target data.
[0119] In 2108, the Snapshot defragmentation program 214-1 updates the reference address (address in the mapping area) 501 of the directory table 402-2 of the appended volume because the update of the mapping table in 2107 changes the reference address (address in the mapping area) 501. The address (address in the mapping area) of the mapping table updated in 2107 is set to the reference address (address in the mapping area) 501 of the directory table 402.
[0120] This snapshot data defragmentation process searches for data to be defragmented and sets information to enable data identification. The process of copying and consolidating data to be defragmented will be explained later in the garbage collection process (Figure 23).
[0121] Fig. 22 is a flowchart showing the processing steps of the data search process of the embodiment 1. Fig. 22 shows details of each data search process executed in 2105 of Fig. 21 and 2406 of Fig. 24. Below, the data search process executed in 2105 of Fig. 21 will be explained with the Snapshot data defragmentation program 214-1 as the processing subject.
[0122] 24, the Snapshot deletion program 216 is the processing subject. The data search program 2105-1 is a program that compares the data of the search target Snapshot with the Snapshot of a generation one newer than the search target Snapshot, and the data of the search target Snapshot with the Snapshot of a generation one older than the search target Snapshot, and records the data referenced only by the search target Snapshot in the data management table as data to be defragmented.
[0123] First, in 2200, the Snapshot data defragmentation program 214-1 selects the Next directory # corresponding to the directory # of the Snapshot of the generation one newer than the Snapshot being searched for, by referencing the Next directory #1002 in the directory tree management table 222. Similarly, it selects the Previous directory # corresponding to the directory # of the Snapshot of the generation one older than the Snapshot being searched for, by referencing the Previous directory #1001 in the directory tree management table 222.
[0124] In 2201, the Snapshot data defragmentation program 214-1 compares the reference address (address within the mapping area) 501 of the directory table 402 of the Next directory # obtained in 2200 with the reference address (address within the mapping area) 501 of the directory table 402 of the target Snapshot.
[0125] In 2202, the Snapshot data defragmentation program 214-1 determines whether the data of the snapshot to be processed is shared with a snapshot of the next newer generation. That is, if the reference address (address in the mapping area) 501 of the directory table 402 of the snapshot to be processed does not match the reference address (address in the mapping area) 501 of the directory table 402 of the Next directory # (2202 No), the process proceeds to 2203, and if they match (2202 Yes), the data search process ends.
[0126] In 2203, the Snapshot data defragmentation program 214-1 compares the reference address (address within the mapping area) 501 of the directory table 402 of the Previous directory # obtained in 2200 with the reference address (address within the mapping area) 501 of the directory table 402 of the target Snapshot.
[0127] In 2204, the Snapshot data defragmentation program 214-1 determines whether the data of the snapshot to be processed is shared with a snapshot of the generation one older than the current one. That is, if the reference address (address in the mapping area) 501 of the directory table 402 of the snapshot to be processed does not match the reference address (address in the mapping area) 501 of the directory table 402 of the previous directory # (2204 No), the process proceeds to 2205, and if they match (2204 Yes), the data search process ends.
[0128] It is found from 2202 and 2204 that the logical data granularity (for example, 256 KB) that is the management unit of the directory table has different reference addresses 501, and therefore the same data is not shared. However, for the finer logical data granularity unit of the mapping table 403-0 referenced by the directory table, there is a possibility that data is shared in the append area 404-0 of the Snapshot management volume. In the subsequent processing, it is determined whether data is shared for each reference address (address in the append area) 601 of the mapping table 403-0 for the Snapshot management volume.
[0129] In 2205, the Snapshot data defragmentation program 214-1 obtains the mapping tables 403-0 for the reference address (address within the mapping area) 501 of the directory table 402 of the snapshot to be processed, the reference address (address within the mapping area) 501 of the directory table 402 of the next directory #, and the reference address (address within the mapping area) 501 of the directory table 402 of the previous directory #.
[0130] In 2206, the Snapshot data defragmentation program 214-1 compares the reference address (address within the append area) 601 of the mapping table 403-0 referenced by the Next directory # obtained in 2205 with the reference address (address within the append area) 601 of the mapping table 403-0 referenced by the directory table of the target Snapshot.
[0131] In 2207, the Snapshot data defragmentation program 214-1 determines whether the data of the target Snapshot is shared with a newer generation Snapshot. That is, if the reference address (address in the append area) 601 of the mapping table 403-0 of the target Snapshot does not match the reference address (address in the append area) 601 of the mapping table 403-0 referenced by the Next directory # (2207 No), the process proceeds to 2208, and if they match (2207 Yes), the data search process ends.
[0132] In 2208, the Snapshot data defragmentation program 214-1 compares the reference address (address within the append area) 601 of the mapping table 403-0 referenced by the Previous directory # obtained in 2205 with the reference address (address within the append area) 601 of the mapping table 403-0 referenced by the directory table of the Snapshot to be processed.
[0133] In 2209, the Snapshot data defragmentation program 214-1 determines whether the data of the snapshot to be processed is shared with a snapshot of the generation one older than the current one. That is, if the reference address (address in the appended area) 601 of the mapping table 403-0 of the snapshot to be processed does not match the reference address (address in the appended area) 601 of the mapping table 403-0 referenced by the Previous directory # (2209 No), the process proceeds to 2210, and if they match (2209 Yes), the data search process ends.
[0134] In 2210, the Snapshot data defragmentation program 214-1 adds to the search data management table 227 the address in the append area of the Snapshot management volume 401 of the data that is referenced only by the Snapshot to be processed.
[0135] 23 is a flowchart showing the processing steps of garbage collection (GC) processing in the first embodiment. GC processing is processing in which valid data in a page, which is the capacity management unit of the storage system, is copied to another page and the page that now contains only invalid data is released, thereby freeing up the capacity of the storage system (the capacity of data stored in the drive) and securing free space. First, in 2300, the GC program 215 selects a volume to be processed from the volume management table. If there is a volume to be processed (2300 Yes), the process proceeds to 2301, and if there is no volume to be processed (2300 No), the garbage collection processing ends.
[0136] Next, in 2301, the GC program 215 refers to the page translation table 224 of the Volume selected in 2300 and determines the page to be processed. For example, page #0, whose allocation flag 1201 is "allocated" and whose GC-unnecessary flag is "needed," is selected as the page to be processed.
[0137] In the subsequent processing, the processing is repeated from the first address of the processing target page to the end. In 2302, the GC program 215 determines whether the end of the processing target page has been reached. If it has been reached (2302 Yes), the processing proceeds to 2313, and if it has not been reached (2302 No), the processing proceeds to 2303.
[0138] The processes from 2303 to 2306 determine whether the sub-block 313 in the page being processed is valid data or invalid garbage. The reference source address 1403 in the sub-block management table 226 stores the address of the append area of the SS management volume that referenced the sub-block in question. If the same sub-block in the page can be reached from the stored append area address of the SS management volume via the directory table 402-2 and the mapping table 403-1 (if the addresses match), the reference source and reference destination (sub-block) point to each other, and so the data is determined to be valid. On the other hand, if the reference destination sub-block is different due to the write process, the sub-block in question in the page is not being referenced by anyone, and so can be determined to be garbage. In step 2303, the GC program 215 refers to the sub-block management table 226 corresponding to the sub-block 313 of the page to be processed, and acquires the referrer address 1403 of the sub-block.
[0139] Next, in 2304, the GC program 215 refers to the directory table 402-2 of the append volume based on the reference source address (address in the append area of the Snapshot management volume) acquired in 2303, and acquires the reference destination address (address in the mapping area) 501.
[0140] In 2305, the GC program 215 obtains the mapping table for the write-once volume from the address in the mapping area obtained in 2304.
[0141] Next, in 2306, the GC program 215 determines whether the reference address (address in the append area) 701 of the mapping table acquired in 2305 matches the address where the sub-block of the processing target page selected in 2303 is stored (address in the page 1401 in the sub-block management table 226). If they match (2306 Yes), the target sub-block is valid data referenced from a logical address, so the process moves to 2307. If they do not match (2306 No), the target sub-block is garbage, so no data copy is performed and processing resumes from 2302.
[0142] In 2307, the GC program 215 refers to Snapshot##703 in the append volume mapping table 403-1, and if a valid value is set, selects the page # that summarizes the differential data of that Snapshot#. If Snapshot##703 is NULL, the data is not subject to defragmentation, so the data copy destination page (append page) set by the GC program 215 is selected.
[0143] In 2308, the GC program 215 copies the sub-block of valid data to the destination page selected in 2307.
[0144] Next, in 2309, since the GC program 215 copied the sub-block in 2308, it updates the target record in the append volume mapping table 403-1 that referenced the copied sub-block.
[0145] In 2310, the GC program 215 updates the reference address (address in the mapping area) 501 of the directory table 402-2 of the added volume because the update of the mapping table in 2309 changes the reference address (address in the mapping area) 501. The address (address in the mapping area) of the mapping table updated in 2309 is set to the reference address (address in the mapping area) 501 of the directory table 402.
[0146] In 2311, the GC program 215 determines whether the data copied in 2308 has a Snapshot# specified and has reached the end of the copy destination page. If a Snapshot# is specified and the end of the copy destination page has been reached (2311 Yes), the process transitions to 2312, and if the end has not been reached (2311 No), the process resumes from 2302.
[0147] In 2312, the GC program 215 designates the copy destination page as a page not requiring GC processing because the copy destination page has been covered with data referenced only by a specific snapshot in 2311. Specifically, the GC not required flag 1203 in the page translation table 224 is updated to "not required." As a result, the page will no longer be selected as a target for GC processing, and copying will no longer be necessary.
[0148] In 2313, the GC program 215 has completed copying all valid data in the page to be processed, so it is possible to release the page to be processed that contains garbage and secure the capacity of the storage system 100.
[0149] 24 is a flowchart showing the processing steps of the Snapshot deletion process, which is executed by the Snapshot deletion program 216 in response to an instruction to delete a Snapshot from the management system 103.
[0150] First, the Snapshot deletion program 216 receives the Snapshot # to be deleted in 2400. Next, in 2401, the Snapshot deletion program 216 acquires the directory # of the Snapshot to be deleted from the Volume management table 220.
[0151] In 2402 , the Snapshot deletion program 216 deletes the record of the deleted Snapshot from the Snapshot generation management table 223 .
[0152] Next, in step 2403, the Snapshot deletion program 216 deletes the record of the Volume corresponding to the deleted Snapshot from the Volume management table 220.
[0153] The processes from 2404 to 2409 are repeated from the start address of the snapshot to be deleted to the end address. In 2404, the snapshot deletion program 216 determines whether the end address of the snapshot to be deleted has been reached. If the end address has been reached (2404 Yes), the process proceeds to 2410, and if the end address has not been reached (2404 No), the process proceeds to 2405.
[0154] In 2405, the Snapshot deletion program 216 executes the data search process described in FIG. 22, and searches for data that is referenced only by the Snapshot to be deleted.
[0155] Next, in 2406, the Snapshot deletion program 216 deletes from the append volume mapping table 403-1 the records in the append volume mapping table that correspond to data referenced only by the garbage-recoverable snapshots to be deleted that were checked in 2405.
[0156] In 2407, the snapshot deletion program 216 deletes the records in the directory table 402-1 that referenced the mapping table 403-1 deleted in 2406.
[0157] Next, in 2408, the Snapshot deletion program 216 refers to the page conversion table 224 to determine whether the page at the reference address (address in the append area) 701 of the record in the mapping table 403-1 deleted in 2406 is a page with the GC not required flag ON ("not required"). If the GC not required flag is ON ("not required") (2408 Yes), the target page contains snapshots to be deleted, so GC processing is not required and the page can be released immediately, thereby securing capacity in the storage system 100 (2409). On the other hand, if the GC not required flag is OFF ("required") (2408 No), the page cannot be released immediately, so processing resumes from 2404.
[0158] In 2410, the Snapshot deletion program 216 deletes the directory # of the snapshot to be deleted from the directory tree management table because the process of garbage-generating the differential data of the snapshot to be deleted has already been completed. Accordingly, the directory # that referenced the deleted directory # as the next directory #1002 is updated to the next directory #1002 of the deleted directory #. Similarly, the directory # that referenced the deleted directory # as the previous directory #1001 is updated to the previous directory #1001 of the deleted directory #.
[0159] Next, the effects of the first embodiment will be described with reference to Fig. 25 and Fig. 26. In this embodiment, as shown in Fig. 25, for example, the differential data ("A0") referenced only by snapshot 301-0 is moved to a page that does not require GC, and since there is no need to copy the differential data of the snapshot in the GC processing, it is possible to suppress an increase in the amount of GC processing.
[0160] Furthermore, in this embodiment, as shown in FIG. 26, when a snapshot deletion command is issued for snapshot 301-0, the data ("A0") referenced only by snapshot 301-0 is garbage collected by snapshot deletion process 216, but the data referenced by the snapshot to be deleted, including the data ("A0"), is collected in a page that does not require GC. For this reason, pages that do not require GC can be released without the need for GC processing. Because GC processing does not need to be performed, there is no impact on I / O performance. Furthermore, it becomes possible to instantly secure capacity for the storage system 100. [Example]
[0161] Hereinafter, a second embodiment of the present invention will be described with reference to FIG.
[0162] In the first embodiment, the data search process 2105-1 of the snapshot data defragmentation process 214-1 searches for data that is not shared by either the next newer generation snapshot or the next older generation snapshot and is referenced only by the snapshot being processed, and then performs defragmentation. On the other hand, there is also data that is shared by multiple snapshots. Furthermore, in a backup use case, a snapshot deletion instruction is issued starting with the oldest snapshot, so the snapshot for which the snapshot deletion instruction is issued can be considered the oldest snapshot. In the second embodiment, if the data search process 2105-2 determines that the data is not shared with a snapshot of the next newer generation, the data is determined to be defragmentation target data. In other words, even if data is shared by multiple snapshots, if the snapshot being processed is the latest snapshot among the snapshots that share the data, the data is determined to be defragmentation target data.
[0163] 27 is a flowchart showing the processing steps of the data search processing of the Snapshot data defragmentation processing of embodiment 2. The only difference from embodiment 1 is that the data search processing 2105-1 of the Snapshot data defragmentation processing 214-1 is replaced by a data search processing 2105-2. Also, 2500, 2501, 2502, 2506, and 2507 in FIG. 27 are the same as 2200, 2201, 2202, 2206, and 2207 in FIG. 22, respectively.
[0164] After the processes corresponding to the Next directory #s of 2500, 2501, and 2502, in the second embodiment, the Snapshot data defragmentation program 214-1 does not perform the processes corresponding to the Previous directory #s of 2203 and 2204, but moves the process to 2505.
[0165] In 2505, the Snapshot data defragmentation program 214-1 obtains the mapping tables 403-0 for the reference address (address within the mapping area) 501 of the directory table 402 of the Snapshot to be processed and the reference address (address within the mapping area) 501 of the directory table 402 of the Next directory #.
[0166] After processing corresponding to the mapping table 403-0 referenced by the Next directory # in 2506 and 2507, in the second embodiment, the Snapshot data defragmentation program 214-1 does not perform processing corresponding to the mapping table 403-0 referenced by the Previous directory # in 2208 and 2209, and moves the processing to 2510.
[0167] In 2510, the Snapshot data defragmentation program 214-1 has successfully searched for the latest snapshot data among the snapshots that share data with the target snapshot, and so adds this data to the search data management table 227.
[0168] In the second embodiment, the data ("B0") shared by the snapshot 301-1 and snapshot 301-0 in FIG. 26 can also be collected into the GC-free page 312-1 as data to be garbage collected when the snapshot 301-1 is instructed to be deleted. [Example]
[0169] Hereinafter, a third embodiment of the present invention will be described with reference to FIGS.
[0170] In the first embodiment, in the Snapshot data defragmentation process 214-1, information is set in the append volume mapping table 403-1 so that the data to be defragmented can be identified, and the data to be defragmented is copied during the garbage collection process. In the third embodiment, the Snapshot data defragmentation process 214-2 performs a copy process of the data to be defragmented.
[0171] 28 is a flowchart showing the processing procedure for defragmenting snapshot data according to the embodiment 3. 2600, 2601, 2602, 2603, 2604, 2605, and 2606 in Fig. 28 are the same as 2100, 2101, 2102, 2103, 2104, 2105, and 2106 in Fig. 21, respectively.
[0172] Following 2606, the Snapshot Data Defragmenter 214-2 performs a copy process of the retrieved defragmented data in 2607. Details will be described later with reference to FIG.
[0173] In 2608, the Snapshot data defragmentation 214-2 designates the copy destination page as a page that does not require GC processing because the copy destination page has been covered with differential data of a specific snapshot in 2607. Specifically, the GC-unnecessary flag 1203 in the page translation table 224 is updated to unnecessary. As a result, the page will no longer be selected as a target for GC processing, and copying will no longer be necessary.
[0174] 29 is a flowchart showing the processing procedure of the data copy process of the embodiment 3. First, in 2700, the Snapshot data defragmenter 214-2 refers to the search data management table 227 to which the data copy program defragmentation target data has been added.
[0175] Next, in step 2701, the Snapshot Data Defragmenter 214-2 updates the page allocation management table 225 to allocate a new page 312 to which the defragmentation target data is to be copied.
[0176] In 2702, the Snapshot Data Defragmenter 214-2 copies the sub-block of the data to be defragmented to page 312 of the append area 404-1 of the append Volume secured in 2701. Specifically, it references the directory table 402-2 of the append Volume corresponding to the reference address (address in the append area of the Snapshot management Volume) 1501 in the search data management table, and acquires the reference address (address in the mapping area) 501. It references the reference address (address in the append area) 701 in the mapping table 403-1 for the append Volume corresponding to the acquired address in the mapping area, and identifies and copies the sub-block 313 to be copied.
[0177] In 2703, the Snapshot Data Defragmenter 214-2 adds a record corresponding to the copied data to the sub-block management table.
[0178] Next, in 2704, since the sub-blocks have been copied in 2702, the Snapshot Data Defragmenter 214-2 updates the target records in the append volume mapping table 403-1 that referenced the copied sub-blocks.
[0179] In 2705, the Snapshot Data Defragmenter 214-2 updates the reference address (address in the mapping area) 501 of the directory table 402-2 of the appended volume because the update of the mapping table in 2704 changes the reference address (address in the mapping area) 501. The address (address in the mapping area) of the mapping table updated in 2104 is set to the reference address (address in the mapping area) 501 of the directory table 402.
[0180] As described above, the disclosed storage system 100 is a storage system comprising a storage device (PDEV120) and a processor 111 that processes data input and output to and from the storage device, wherein the processor 111 forms pages capable of storing multiple pieces of data within a logical storage area configured based on the physical storage area of the storage device, provides a volume, and inputs and outputs data related to data input and output to and from the volume to pages of the logical storage area, mapping is performed from the volume to the data of the logical storage area, the storage area can be released in page units, there are multiple volumes, and the multiple volumes can share the data of the logical storage area, data that is not referenced by any of the multiple volumes is deleted as invalid data, data that is referenced by any of the volumes is moved to another page, and garbage collection is performed to release the storage area of the page from which the data has been deleted and the data has been moved, and the garbage collection stores the multiple pieces of data in the page to which it has been moved so that the multiple pieces of data stored in the same page are mapped from the same volume. This reduces the amount of GC processing, manages memory efficiently, and maintains data processing performance.
[0181] The volumes also include a primary volume to which data is input and output, and a plurality of snapshot volumes that are replicated from the primary volume, and pages of data that are mapped only from one of the snapshot volumes are excluded from the garbage collection. This allows for more efficient garbage collection related to snapshot volumes.
[0182] Furthermore, when a snapshot volume that maps to data of a page that has been excluded from the garbage collection is deleted, the disclosed system deletes the page without performing the garbage collection, thereby freeing up storage space. This allows for efficient deletion of snapshots.
[0183] As another example, the volume includes a main volume to which data is input and output, and multiple snapshot volumes that are replicated from the main volume, and the multiple snapshot volumes are snapshot volumes of multiple generations that are copied from the same main volume at different times, and the snapshot volumes of the multiple generations are deleted starting from the oldest generation, and multiple pieces of data that have the same snapshot volume of the newest generation among the one or more snapshot volumes in which each of the data is stored are stored in the same page, and set as a page that is not subject to garbage collection. This configuration allows for efficient deletion of old snapshots.
[0184] As another example, the volume includes a primary volume to which data is input and output, and multiple snapshot volumes that are replicated from the primary volume, the multiple snapshot volumes are created by copying the primary volume, and include multiple generations of snapshot volumes created from the primary volume at different times, and each of the multiple snapshot volumes has data that is shared in the logical storage area with data of the primary volume and other snapshot volumes, and data that is not shared with data of the primary volume and other snapshot volumes and is held independently, and pages that store only data that is held independently by one of the snapshot volumes are excluded from the garbage collection. This configuration allows for efficient garbage collection based on the generation of snapshot volumes.
[0185] The disclosed storage system 100 is a storage system comprising a storage device (PDEV120) and a processor 111 that processes data input and output to and from the storage device, wherein the processor 111 forms pages capable of storing a plurality of pieces of data within a logical storage area configured based on the physical storage area of the storage device, provides a volume, and inputs and outputs data related to data input and output to and from the volume to a page of the logical storage area, wherein mapping is performed from the volume to the data of the logical storage area, there are a plurality of volumes, and the plurality of volumes can share the data of the logical storage area, and deletes data that is not referenced by any of the plurality of volumes as invalid data, moves data referenced by any of the volumes to another page, and performs garbage collection processing to free up the storage area of the page from which the data has been deleted and the data has been moved, and sets pages mapped from the same volume for all of the data to be stored as excluded from the garbage collection processing, and when one of the volumes to which data of the page set as excluded from the garbage collection processing is mapped is deleted, the processor 111 deletes the data and frees up the storage area of the page. This reduces the amount of GC processing, manages memory efficiently, and maintains data processing performance.
[0186] The volume also includes a main volume where data is input and output, and multiple snapshot volumes that are replicated from the main volume, and pages where all data is mapped only from the same snapshot volume are set as excluded from the garbage collection process, while pages that store data mapped from the main volume are set as eligible for the garbage collection process. This allows for more efficient garbage collection related to snapshot volumes.
[0187] The volume also includes a main volume to which data is input and output, and multiple snapshot volumes that are replicated from the main volume, and the multiple snapshot volumes are snapshot volumes of multiple generations that are copied from the same main volume at different times, and the snapshot volumes of the multiple generations are deleted starting from the oldest generation, and multiple pieces of data that have the same snapshot volume of the newest generation among the one or more snapshot volumes in which each of the data is stored are stored in the same page, and set as a page that is not subject to garbage collection. This allows for efficient deletion of old snapshots.
[0188] The present invention is not limited to the above-described embodiment, but includes various modifications. For example, although only one storage system 100 is shown in FIG. 1, a cluster configuration consisting of multiple storage systems may be used, or a storage system may be located on a cloud. The above-described embodiment has been described in detail to clearly explain the present invention, and is not necessarily limited to a system that includes all of the described configurations. In addition, not only can the configurations be deleted, but replacement or addition of configurations is also possible.
[0189] Furthermore, the above-described configurations, functions, processing units, processing means, etc. may be partially or entirely implemented in hardware, for example, by designing them as integrated circuits. The present invention can also be realized by software program code that implements the functions of the embodiments. In this case, a recording medium on which the program code is recorded is provided to a computer, and a processor included in the computer reads the program code stored in the recording medium. In this case, the program code itself read from the recording medium implements the functions of the above-described embodiments, and the program code itself and the recording medium on which it is stored constitute the present invention. Examples of recording media for providing such program code include flexible disks, CD-ROMs, DVD-ROMs, hard disks, solid-state drives (SSDs), optical disks, magneto-optical disks, CD-Rs, magnetic tapes, non-volatile memory cards, and ROMs.
[0190] Furthermore, the program code that realizes the functions described in this embodiment can be implemented in a wide range of program or script languages, such as assembler, C / C++, perl, Shell, PHP, and Java (registered trademark).
[0191] In the above-described embodiment, the control lines and information lines are those that are considered necessary for the explanation, and not all control lines and information lines are necessarily shown in the product. All components may be interconnected. [Explanation of symbols]
[0192] 100: Storage system 102: Server system 103: Management system 110: Storage controller 111: Processor 112: Memory 120:PDEV 200: Local memory 201: Cache memory 203: Shared memory 300: Primary Volume 301:Snapshot 303:Addendum Volume 304:Pool Page 312 401:Snapshot management Volume 402: Directory Table 403: Mapping Table 404:Additional area
Claims
1. A storage device; a processor that processes data input and output to the storage device; In a storage system comprising: The processor: forming a page capable of storing a plurality of data within a logical storage area configured based on the physical storage area of the storage device; providing a volume, inputting and outputting data related to data input / output to and from the volume to a page of the logical storage area; Mapping is performed from the volume to the data in the logical storage area, The logical 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 to delete data that is not referenced from any of the plurality of volumes as invalid data, to move data that is referenced from any of the volumes to another page, and to release the logical storage area of the page from which the data has been deleted and moved; the garbage collection stores the plurality of data in the destination page so that the plurality of data stored in the same page is mapped from the same volume; The volumes include a primary volume to which data is input and output, and a plurality of snapshot volumes that are replicated from the primary volume; The data pages that are mapped only from one of the snapshot volumes are excluded from the garbage collection. A storage system comprising:
2. When a snapshot volume that is mapped to data of a page that has been excluded from the garbage collection is deleted, the page is deleted without the garbage collection, and the logical storage area is released.
2. The storage system according to claim 1.
3. A storage device; a processor that processes data input and output to the storage device; In a storage system comprising: The processor: forming a page capable of storing a plurality of data within a logical storage area configured based on the physical storage area of the storage device; providing a volume, inputting and outputting data related to data input / output to and from the volume to a page of the logical storage area; Mapping is performed from the volume to the data in the logical storage area, The logical 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 to delete data that is not referenced from any of the plurality of volumes as invalid data, to move data that is referenced from any of the volumes to another page, and to release the logical storage area of the page from which the data has been deleted and moved; the garbage collection stores the plurality of data in the destination page so that the plurality of data stored in the same page is mapped from the same volume; The volumes include a primary volume to which data is input and output, and a plurality of snapshot volumes that are replicated from the primary volume; the plurality of snapshot volumes are snapshot volumes of a plurality of generations copied from the same primary volume at different times, The snapshot volumes of the plurality of generations are deleted starting from the oldest generation, Among one or more snapshot volumes in which the respective data are stored, a plurality of data having the same latest generation snapshot volume are stored in the same page, and the page is set as an exception to the garbage collection. A storage system comprising:
4. A storage device; a processor that processes data input and output to the storage device; In a storage system comprising: The processor: forming a page capable of storing a plurality of data within a logical storage area configured based on the physical storage area of the storage device; providing a volume, inputting and outputting data related to data input / output to and from the volume to a page of the logical storage area; Mapping is performed from the volume to the data in the logical storage area, The logical 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 to delete data that is not referenced from any of the plurality of volumes as invalid data, to move data that is referenced from any of the volumes to another page, and to release the logical storage area of the page from which the data has been deleted and moved; the garbage collection stores the plurality of data in the destination page so that the plurality of data stored in the same page is mapped from the same volume; The volumes include a primary volume to which data is input and output, and a plurality of snapshot volumes that are replicated from the primary volume; the plurality of snapshot volumes are created by copying the primary volume, and include snapshot volumes of a plurality of generations created from the primary volume at different times; each of the plurality of snapshot volumes includes data that is shared in common with the data of the primary volume and other snapshot volumes on the logical storage area, and data that is not shared with the data of the primary volume and other snapshot volumes and is held independently; The pages that store only data that is held solely by one of the snapshot volumes are excluded from the garbage collection. A storage system comprising:
5. A storage device; a processor that processes data input and output to the storage device; In a storage device comprising: The processor: forming a page capable of storing a plurality of data within a logical storage area configured based on the physical storage area of the storage device; providing a volume, inputting and outputting data related to data input / output to and from the volume to a page of the logical storage area; Mapping is performed from the volume to the data in the logical storage area, There are a plurality of volumes, and the plurality of volumes can share data in the logical storage area; performing a garbage collection process that deletes data that is not referenced from any of the plurality of volumes as invalid data, moves data that is referenced from any of the volumes to another page, and releases the logical storage area of the page from which the data has been deleted and moved; For all data stored, pages mapped from the same volume are set to be excluded from the garbage collection process; When one volume to which data of a page set as an exception to the garbage collection process is mapped is deleted, the data is deleted and the logical storage area of the page is released. A storage system comprising:
6. The volumes include a primary volume to which data is input and output, and a plurality of snapshot volumes that are replicated from the primary volume; A page in which all data is mapped only from the same single snapshot volume is set as an exception to the garbage collection process, and a page in which data mapped from the primary volume is stored is set as an exception to the garbage collection process.
6. The storage system according to claim 5.
7. The volumes include a primary volume to which data is input and output, and a plurality of snapshot volumes that are replicated from the primary volume; the plurality of snapshot volumes are snapshot volumes of a plurality of generations copied from the same primary volume at different times, The snapshot volumes of the plurality of generations are deleted starting from the oldest generation, Among one or more snapshot volumes in which the respective data are stored, a plurality of data having the same latest generation snapshot volume are stored in the same page, and the page is set as an exception to the garbage collection.
6. The storage system according to claim 5.
Citation Information
Patent Citations
Computer system having data amount reduction function, and storage control method
JP2019159605A
Storage controller and storage control method
JP2020047036A
Volume management device, volume management method, and volume management program
JP2020080130A
Storage system and data duplication method in storage system
JP2022026812A
Storage system and data copying method for storage system
JP2023056222A