Storage device, data relocation method, and program
The storage device and method address the inefficiency of sequential data reading by replicating data in contiguous storage areas, enhancing backup speed through continuous retrieval mechanisms.
Patent Information
- Application Number
- JP2025004638
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2045-01-14
AI Technical Summary
Existing snapshot technologies, such as the RoW method, result in data being stored in discrete locations, leading to sequential reading inefficiencies during backups, which prolong data retrieval times.
A storage device and method that replicates data in contiguous storage areas, allowing for sequential reading by comparing data arrangement orders and utilizing a second volume for continuous data retrieval, with a read mechanism that reads from the first volume if data is not present in the second.
Reduces data reading time by enabling sequential access even when data is stored in dispersed locations, improving backup efficiency.
Smart Images

Figure 0007807147000001_ABST
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to a storage device, a data relocation method, and a program. [Background technology]
[0002] Patent Document 1 discloses a technology related to snapshots of the RoW (Redirect On Write) method. A snapshot refers to recording the state of a storage device at a certain point in time. When a master volume (hereinafter referred to as MV (Master Volume)) is generated in a storage device, the RoW method references the data in the MV via a redirect table. This redirect table lists addresses indicating the location of the storage area in the storage device where each piece of data is stored, in the order of the data arrangement in the MV.
[0003] A RoW snapshot is a process of creating a redirection table for a snapshot volume (hereafter referred to as SV (Snapshot Volume)) by duplicating the redirection table of an MV at a certain point in time. This allows the state of the MV at a certain point in time to be recorded in the SV without duplicating the actual data.
[0004] When data is rewritten to an MV, the RoW method performs the rewrite by appending the data. Here, rewriting by appending the data does not mean overwriting the data before the rewrite with the rewritten data, but rather leaves the data before the rewrite in the storage as is, secures a new storage area in the storage, and writes the rewritten data in the secured storage area. After the appending is performed, the address indicating the location of the storage area storing the data before the rewrite is rewritten in the redirect table of the MV to the address indicating the location of the storage area where the rewritten data has been written.
[0005] In contrast, the redirection table of the SV is not affected by the additional writing of the MV and is maintained as is. Therefore, no matter how much data is rewritten to the MV, the data in the MV at the time the snapshot was taken can be referenced via the SV.
[0006] The technology disclosed in Patent Document 1 is a technology that makes it possible to avoid performance degradation of MVs and SVs, even if multiple snapshots are taken for an MV and the number of SVs increases, while balancing snapshot operation performance and I / O (Input / Output) performance. [Prior art documents] [Patent documents]
[0007] [Patent Document 1] Japanese Patent Application Publication No. 2024-079042 Summary of the Invention [Problem to be solved by the invention]
[0008] Snapshots can record the state of an MV at a specific point in time in an SV, and are therefore sometimes used to back up data from MVs at a specific point in time. However, with the RoW method, the location where the data is stored in storage becomes dispersed each time data is rewritten to the MV. Therefore, when performing a backup using an SV created by snapshotting an MV that has been in operation for a long period of time, the data referenced via the SV may be stored in discrete locations in the storage. In this case, reading data from the storage via the SV reads data stored in discrete locations, i.e., a random read, and data cannot be read sequentially, so the backup takes a long time.
[0009] The aforementioned Patent Document 1 discloses that data is relocated within a DSVOL (Data Store Volume) that stores replicated data in order to improve I / O performance. However, the purpose of this relocation is to prevent I / O from concentrating on a specific DSVOL, not to enable sequential data reading. In light of this background, the issue of reducing the time required to read data, which increases when data is stored in discrete locations, is raised.
[0010] An object of the present disclosure is to provide a storage device, a data relocation method, and a program that solve the above-mentioned problems. [Means for solving the problem]
[0011] A storage device according to one embodiment of the present disclosure comprises: a storage means having a plurality of contiguous storage areas and storing each of the data entities of a first volume in the storage area at any position; a replication means which compares the arrangement order of the data in the first volume with the arrangement order of the data in the storage means and replicates the data stored in the storage means in a discontinuous state to a second volume to which a plurality of contiguous storage areas are assigned in the order of the data in the first volume; and a read means which, upon receiving a read request for the second volume, reads the data in order from the first storage area of the second volume in the requested read range, and, if the data to be read is not stored in the second volume, reads the data from the storage means via the first volume.
[0012] A data relocation method according to one embodiment of the present disclosure includes a storage step of storing each data entity of a first volume in a storage area at any location of a storage means having a plurality of storage areas at contiguous locations; a replication step of comparing the arrangement order of the data in the first volume with the arrangement order of the data in the storage means, and replicating the data stored in a discontinuous state in the storage means to a second volume to which a plurality of storage areas at contiguous locations are assigned in the order of the data arrangement in the first volume; and a read step of, upon receiving a read request for the second volume, reading the data in order from the first storage area of the second volume in the requested read range, and if the data to be read is not stored in the second volume, reading the data from the storage means via the first volume.
[0013] A program according to one embodiment of the present disclosure causes a computer to function as: a storage means having a plurality of contiguous storage areas and storing each of the data entities of a first volume in the storage area at any position; a replication means that compares the order of the data in the first volume with the order of the data in the storage means and replicates the data stored in the storage means in a discontinuous state to a second volume to which a plurality of contiguous storage areas are assigned in the order of the data in the first volume; and a reading means that, upon receiving a read request for the second volume, reads the data in order from the first storage area of the second volume in the requested read range, and, if the data to be read is not stored in the second volume, reads the data from the storage means via the first volume. [Effects of the Invention]
[0014] According to the above aspect, it is possible to reduce the time required to read data, which increases when data is stored at discrete locations. [Brief explanation of the drawings]
[0015] [Figure 1] 1 is a block diagram illustrating an example of the internal configuration of a storage device according to the present disclosure and a host computer connected to the storage device. [Figure 2] 1A and 1B are diagrams illustrating an example of the formats and contents of various volumes and various tables in a storage device according to the present disclosure. [Figure 3] 10 is a flowchart illustrating an example of processing by an MV management unit according to the present disclosure. [Figure 4] 10 is a flowchart illustrating an example of processing by a writing unit according to the present disclosure. [Figure 5] 10A and 10B are diagrams illustrating an example of a change in a reference count table when processing is performed by a writing unit and a snapshot unit according to the present disclosure. [Figure 6] 10 is a flowchart illustrating an example of processing by a snapshot unit according to the present disclosure. [Figure 7] 10 is a flowchart illustrating an example of processing by a BURV management unit according to the present disclosure. [Figure 8] 10 is a flowchart illustrating an example of processing by a duplication unit according to the present disclosure. [Figure 9] 10 is a flowchart illustrating an example of processing by a reading unit according to the present disclosure. [Figure 10] 10 is a flowchart illustrating an example of a subroutine process included in an example of a process of a writing unit according to the present disclosure. [Figure 11] FIG. 10 is a diagram showing an example of a case where data is rewritten in an MV according to the present disclosure. [Figure 12] FIG. 10 is a diagram showing an example of a case where data is rewritten in an SV according to the present disclosure. [Figure 13] FIG. 10 is a diagram illustrating an example of a mechanism for reducing the storage capacity of a BURV according to the present disclosure. [Figure 14] FIG. 10 is a diagram showing an example of a case where the positions of data stored in a data pool are subsequently made consecutive by rewriting data in an SV according to the present disclosure. [Figure 15]10 is a flowchart illustrating an example of a process for changing the reference destination of data to be read when the position of data stored in a data pool according to the present disclosure subsequently becomes a consecutive position. [Figure 16] FIG. 2 is a block diagram illustrating an example of a hardware configuration of a storage device according to the present disclosure. [Figure 17] FIG. 1 is a block diagram illustrating an example of a configuration of a storage device according to the present disclosure. [Figure 18] 10 is a flowchart illustrating an example of processing by a storage device according to the present disclosure. DETAILED DESCRIPTION OF THE INVENTION
[0016] Each embodiment will be described below with reference to the drawings. In all drawings, the same or corresponding components are designated by the same reference numerals, and common descriptions will be omitted.
[0017] First Embodiment An embodiment of the present disclosure will be described below with reference to the drawings. Fig. 1 is a block diagram showing a storage device 1 and a host computer 2 connected to the storage device 1. The host computer 2 is, for example, a personal computer or a server device, and writes data to and reads data from the storage device 1 autonomously or in response to a user's operation. The storage device 1 is, for example, a disk array device or a storage device, and includes a microprocessor 10, an auxiliary storage unit 20, an interface unit 40, a RAID (Redundant Array of Inexpensive Disks) unit 31, and a plurality of physical disks 32-1 to 32-N (where N is an integer equal to or greater than 2).
[0018] Each of the physical disks 32-1 to 32-N is a non-volatile storage medium, for example, an HDD (Hard Disk Drive), but may also be a non-volatile storage medium other than an HDD, for example, an SDD (Solid State Drive), or different types of non-volatile storage media such as HDDs and SDDs may be mixed together.
[0019] The RAID unit 31 is connected to each of the physical disks 32-1 to 32-N. The RAID unit 31 is a hardware functional unit that causes the multiple physical disks 32-1 to 32-N to be recognized as a single storage medium having redundancy. Therefore, the RAID unit 31 and the physical disks 32-1 to 32-N can be considered to constitute a single functional unit called a single storage unit 30.
[0020] The storage unit 30 is capable of creating multiple logical disks, and the logical memory spaces, which are the memory spaces of each of the multiple logical disks, are associated with the physical memory spaces of each of the physical disks 32-1 to 32-N. This association is performed, for example, as follows: A predetermined small storage capacity is set as a division unit. This division unit may be set arbitrarily, and may be, for example, the storage capacity of one page in a paging system. The logical memory space of each of the multiple logical disks is divided into multiple storage areas for each division unit. The physical memory space of each of the physical disks 32-1 to 32-N is divided into multiple storage areas for each division unit. Each storage area of the logical memory space is associated with one of the multiple storage areas of the physical memory space so that the multiple storage areas of the logical memory space do not correspond to the same storage area in the physical memory space.
[0021] Unlike the above-mentioned logical disks, the storage unit 30 is capable of generating virtual logical disks in which storage areas are not directly associated with the storage areas of the physical disks 32-1 to 32-N but are associated via the above-mentioned logical disks. Here, to distinguish between the virtual logical disks and the above-mentioned logical disks, the above-mentioned logical disks are referred to as actual logical disks, and the term "logical disk" refers to both virtual logical disks and actual logical disks. Therefore, when the host computer 2 references the storage unit 30, it appears as if two types of logical disks, actual logical disks and virtual logical disks, exist in the storage unit 30.
[0022] Each of the multiple storage areas on each logical disk is assigned location information indicating its location in the logical memory space of the logical disk containing it, and which allows for identification of its order from the first storage area in the logical memory space. This location information is expressed, for example, as a hexadecimal value, and the location information corresponding to the first storage area in the logical memory space is standardized to zero for all logical disks. The location information assigned to each of the multiple storage areas included in one logical disk increases in the order of the arrangement by the size of the division unit described above. If the division unit is, for example, 0x10 bits (2 bytes), the location information of each of the multiple storage areas included in one logical disk, when expressed in order from the beginning of the arrangement on the logical disk, is expressed in increments of 0x10 bits (2 bytes), such as 0x00, 0x10, 0x20, 0x30, ...
[0023] The range of storage area of the actual logical disk corresponds to the range of storage area that can be continuously referenced on the physical disks 32-1 to 32-N. Therefore, data stored in storage areas at consecutive positions on the actual logical disk can be read sequentially by reading the data in order from the storage area at the position indicated by the first position information according to the arrangement order of the position information. The position information is generally information called an address, and hereinafter the position information will also be referred to as "address".
[0024] The interface unit 40 is a functional unit including a hardware interface module, and is connected to the host computer 2 via a communication line or a communication network, and is connected to the RAID unit 31 and the microprocessor 10 via electrical lines.
[0025] The auxiliary storage unit 20 is a non-volatile storage medium, such as an HDD (Hard Disk Drive), but may also be a non-volatile storage medium other than an HDD, such as an SDD (Solid State Drive). The auxiliary storage unit 20 stores an MV redirect table 21, an SV redirect table 22, a reference count table 23, a replication status table 24, and an LD (Logical Disk) management table 25.
[0026] The microprocessor 10 includes a CPU (Central Processing Unit), RAM (Random Access Memory), ROM (Read Only Memory), etc., and for example, the CPU deploys an application program pre-stored in the ROM into the RAM and executes it, thereby configuring the following functional units: an MV management unit 11, a writing unit 12, a snapshot unit 13, a BURV (Backup Read Volume) management unit 14, a copying unit 15, and a reading unit 16. In addition to being connected to the interface unit 40 as described above, the microprocessor 10 is also connected to the auxiliary storage unit 20 and the RAID unit 31 via electrical lines.
[0027] When the MV management unit 11 receives an MV creation request signal, it allocates a virtual logical disk to the MV and allocates a physical logical disk to the data pool. The MV management unit 11 creates an LD management table 25 in the auxiliary storage unit 20 and registers the MV and the data pool in the created LD management table 25. The MV management unit 11 creates and initializes a reference count table 23 in the auxiliary storage unit 20 that indicates the state of the data pool.
[0028] When the writing unit 12 receives a write request signal, it refers to the referenced number table 23 and selects an empty storage area in the data pool. The writing unit 12 records the data included in the write request signal in the selected empty storage area, while updating the redirect table corresponding to the volume specified in the write request signal and the referenced number table 23. When the writing unit 12 receives a write request signal to write an MV, if the MV redirect table 21 is not stored in the auxiliary storage unit 20, the writing unit 12 generates the MV redirect table 21 in the auxiliary storage unit 20.
[0029] When the snapshot unit 13 receives a snapshot execution request signal, it performs a RoW snapshot. That is, the snapshot unit 13 assigns a virtual logical disk to the SV, and creates an SV redirect table 22 that is a copy of the MV redirect table 21 in the auxiliary storage unit 20. The snapshot unit 13 registers the SV in the LD management table 25, and also registers that the MV that is the source of the SV and the created SV are paired. The snapshot unit 13 updates the referenced number table 23 in accordance with the created SV.
[0030] When the BURV management unit 14 receives a BURV creation request signal, it assigns a physical logical disk to the BURV. The BURV management unit 14 creates a replication status table 24 in the auxiliary storage unit 20 and initializes the replication status table 24. The BURV management unit 14 registers the BURV in the LD management table 25, and also registers that the volume specified in the BURV creation request signal and the BURV are paired.
[0031] The duplication unit 15 detects data that is stored discontinuously in the data pool by comparing the order of data in the volumes indicated as pairs of the BURV in the LD management table 25 with the order of data in the data pool. The duplication unit 15 replicates the detected data to the BURV in the order of data in the pair volumes of the BURV.
[0032] When the reading unit 16 receives a read request signal for the BURV, it reads data sequentially from the first storage area of the BURV in the read range indicated by the read request signal, and if the data to be read is not stored in the BURV, it reads the data from the volume that is the source of the BURV's duplication.
[0033] Figure 2 is a diagram showing an example of the format and contents of the MV redirect table 21, SV redirect table 22, reference count table 23, replication status table 24, and LD management table 25 stored in the auxiliary memory unit 20, as well as MV61, SV62, data pool 51, and BURV52.
[0034] As described above, the data pool 51 is generated by allocating physical logical disks, and has a plurality of storage areas for storing the data entities of MV 61 and SV 62. As described above, strictly speaking, the data entities are stored on the physical disks 32-1 to 32-N, but describing the data entities down to the level of the physical disks 32-1 to 32-N would complicate the explanation. Therefore, for the sake of convenience, the above and following descriptions are described assuming that the data entities are stored on a physical logical disk having a storage area directly associated with the storage area of one of the physical disks 32-1 to 32-N.
[0035] Each of the multiple storage areas in the data pool 51 is assigned an address expressed in hexadecimal, with the first address being zero and addresses increasing in size by the size of the division unit from the first. Hereinafter, an address indicating the position of a storage area in the data pool 51 will be referred to as a pool address. Note that Figure 2 shows an example in which the storage capacity of one storage area, i.e., the division unit, is, for example, 0x10 bits (2 bytes), and consecutive pool addresses increase by 0x10 bits (2 bytes).
[0036] Each of MV61 and SV62 is a volume generated by allocating a virtual logical disk as described above, and the actual data contained in each volume is stored in a storage area at an arbitrary position in data pool 51. As shown in Fig. 2, each of the storage areas of MV61 and SV62 is assigned an address expressed in hexadecimal, with the first address being zero and addresses increasing sequentially from the first by the size of the division unit.
[0037] For example, suppose MV 61 includes multiple pieces of data arranged in the order of "AA" to "II" shown in Fig. 2. In this case, MV redirect table 21 stores pool addresses indicating the location of the storage area in data pool 51 that stores each piece of data, in the order of the arrangement of the data in MV 61. That is, MV 61 is formed by reading data from the storage area in data pool 51 at the position indicated by the pool address, in order from the first pool address in MV redirect table 21, and arranging the data in the order in which it was read.
[0038] The SV redirect table 22 is a table generated by duplicating the MV redirect table 21 using a snapshot, and at the time the snapshot is taken, the contents of the MV redirect table 21 and the SV redirect table 22 are the same.
[0039] The reference count table 23 is a table having the fields "pool address" and "reference count." The "pool address" field records a pool address indicating the location of each of the multiple storage areas in the data pool 51. The "reference count" field records the number of reference sources of the data stored in the storage area of the data pool 51, in other words, a number indicating how many volumes in MV61 and SV62 reference the data. For example, in the example shown in FIG. 2, "EE" stored in the storage area at the first pool address "0x00" in the data pool 51 is referenced by MV61 and SV62. Therefore, "2" is recorded in the "reference count" field of the record in the reference count table 23 where the "pool address" field is "0x00."
[0040] BURV52 is a volume created by allocating a physical logical disk, and stores the actual data contained in the volume. As shown in Figure 2, each storage area of BURV52 is assigned a hexadecimal address, with the first address being zero and addresses increasing sequentially from the first by the size of the division unit.
[0041] The replication status table 24 is a table in which a plurality of records, each having two fields, "No." and "Flag," are arranged row-wise. In the "No." field, consecutive integer values starting from 1 are recorded in order from the first row. Each record in the replication status table 24 is associated one-to-one with each storage area of the BURV 52, and is arranged in the order of the arrangement of the storage areas of the BURV 52, in other words, in order of increasing addresses assigned to the storage areas. For example, in the example shown in FIG. 2, a record with a value of "1" in the "No." field corresponds to the storage area of the BURV 52 at address "0x00," and a record with a value of "2" in the "No." field corresponds to the storage area of the BURV 52 at address "0x10." This can be generalized to have the following relationship: (value of the "No." field - 1) × division unit (0x10 bits (2 bytes)) = address of the BURV 52. The value in the "No." field also indicates the order of the storage area corresponding to that value, from the top storage area in BURV52.
[0042] The "flag" field records either "1" indicating that the data has been replicated, or "0" indicating that the data has not been replicated. Hereinafter, "1" recorded in the "flag" field will be referred to as a flag indicating that replication has occurred, and "0" will be referred to as a flag indicating that replication has not occurred.
[0043] The LD management table 25 is a table having items of "LDN (Logical Disk Number)", "attribute", and "paired LDN". In the item of "LDN", identification information for identifying each of the logical disks to be generated in the storage unit 30 is recorded. In the item of "attribute", information for specifying each of the types of the data pool 51, MV61, SV62, and BURV52 is recorded. In FIG. 2, an example in which each type is specified by the name of each of the data pool 51, MV61, SV62, and BURV52, that is, "data pool", "MV", "SV", and "BURV", is shown. In the item of "paired LDN", the LDN of the volume to be paired is recorded.
[0044] When each functional unit of the microprocessor 10 and the host computer 2 refer to the storage areas of each of the MV61, SV62, data pool 51, and BURV52, they will specify the corresponding LDN and specify the address assigned to the storage area to be referred to for reference.
[0045] (Processing by the storage device) Hereinafter, the processing performed by each of the MV management unit 11, writing unit 12, snapshot unit 13, BURV management unit 14, replication unit 15, and reading unit 16 will be described.
[0046] <Generation processing of MV and data pool> FIG. 3 is a flowchart showing an example of the operation of the MV management unit 11. For example, the user performs an operation on the host computer 2 to output an MV generation request signal including the storage capacity of the MV61 and the storage capacity of the data pool 51. <H
[0047] Here, the storage capacity of data pool 51 is determined taking into consideration, for example, the storage capacity of MV61 and how many of the multiple SV62-1 to SV62-M (where M is an integer greater than or equal to 2, and SV62 corresponds to any one of SV62-1 to SV62-M) generated by multiple snapshots from MV61 will be stored. For example, assume that the storage capacity of MV61 is 100 GB and that it is determined that one SV62 will be stored. If rewriting the data in MV61 causes all of the data in MV61 to become different from the data in SV62, then the storage capacity of data pool 51 will require 200 GB, which is the sum of the storage capacity of MV61 and the storage capacity of SV62. However, since the probability that all of the data in MV61 will be different from the data in SV62 is low, the storage capacity of data pool 51 is appropriately determined within the range of 200 GB or less, taking into consideration the storage capacity of MV61, how many of SV62-1 to SV62-M will be stored, and the extent to which the data in MV61 and SV62 will be rewritten.
[0048] The following explanation will be based on the example shown in Figure 2, and although the storage capacities will be smaller than those actually specified, an example will be explained in which the storage capacity of MV61 is specified as, for example, 18 bytes, and the storage capacity of data pool 51 is specified as, for example, 30 bytes.
[0049] When the host computer 2 receives an operation to output an MV generation request signal, it outputs the MV generation request signal to the interface unit 40. When the interface unit 40 receives the MV generation request signal from the host computer 2, it outputs the received MV generation request signal to the microprocessor 10. When the MV management unit 11 of the microprocessor 10 receives the MV generation request signal, it reads the storage capacity of the MV 61 included in the MV generation request signal. The MV management unit 11 generates a virtual logical disk of the storage capacity of the MV 61 in the storage unit 30, and allocates the generated logical disk to the MV 61 to generate the MV 61 (Sa1).
[0050] The MV management unit 11 generates an LD management table 25 in the auxiliary storage unit 20. The MV management unit 11 generates a record in the generated LD management table 25, and also generates "#00" as the LDN. The MV management unit 11 records the generated "#00" in the "LDN" field of the generated record, associates "#00" with the logical disk assigned to the MV 61, and uses it as reference information for that logical disk. The MV management unit 11 records "MV" indicating the type of MV 61 in the "attribute" field of the generated record, and initializes the "paired LDN" field to a blank state (Sa2).
[0051] The MV management unit 11 reads the storage capacity of the data pool 51 included in the MV generation request signal. The MV management unit 11 creates a physical logical disk of the storage capacity of the data pool 51 in the storage unit 30, and allocates the created logical disk to the data pool 51 to create the data pool 51 (Sa3). The MV management unit 11 creates a referenced number table 23 in the auxiliary storage unit 20, and records pool addresses indicating the locations of the storage areas of the logical disk allocated to the data pool 51 in the "pool address" field of the created referenced number table 23. The MV management unit 11 initializes all "referenced number" fields of the referenced number table 23 to "0" (Sa4).
[0052] The MV management unit 11 creates a record in the LD management table 25 and also creates "#01" as the LDN. The MV management unit 11 records the created "#01" in the "LDN" field of the created record, associates "#01" with the logical disk assigned to the data pool 51, and uses it as reference information for that logical disk. The MV management unit 11 records "data pool" indicating the type of data pool 51 in the "attribute" field of the created record, initializes the "paired LDN" field to a blank state (Sa5), and ends the processing. As a result, the contents of the LD management table 25 become such that records exist in the first and second rows of the LD management table 25 shown in FIG. 2, the "paired LDN" field of the first row is blank, and rows 3 and after do not exist.
[0053] <Data writing process> 4 is a flowchart showing an example of the operation of the writing unit 12. For example, to write data to the MV 61, a user performs an operation on the host computer 2 to output a write request signal including "#00", which is an LDN that identifies the MV 61, and data associated with the write destination address. Upon receiving this operation, the host computer 2 outputs the write request signal to the interface unit 40. Upon receiving the write request signal from the host computer 2, the interface unit 40 outputs the received write request signal to the microprocessor 10. Upon receiving the write request signal, the writing unit 12 of the microprocessor 10 reads "#00" from the write request signal.
[0054] The writing unit 12 determines whether the type of the logical disk "#00" that has been read is the MV type or the SV type. To make this determination, the writing unit 12 detects a record in which the "LDN" item is "#00" from the LD management table 25. If "MV" is stored in the "attribute" item of the detected record, the writing unit 12 determines that it is the MV type, and if "SV" is stored, the writing unit 12 determines that it is the SV type.
[0055] Here, it is assumed that there is at least a record in the first row shown in Fig. 2 in the LD management table 25, in which the "Paired LDN" field is blank. In this case, the writing unit 12 determines that the type of logical disk "#00" is the MV type (Sb1, MV). Note that if the read LDN indicates a logical disk other than MV or SV, the writing unit 12 notifies the host computer 2 of an error via the interface unit 40 and ends the process.
[0056] The writing unit 12 determines whether or not the MV redirect table 21 is stored in the auxiliary storage unit 20 (Sb2). Here, it is assumed that the writing unit 12 determines that the MV redirect table 21 is not stored in the auxiliary storage unit 20 (Sb2, No). In this case, the writing unit 12 generates the MV redirect table 21 in the auxiliary storage unit 20, associates the MV redirect table 21 with "#00" in the "LDN" item of the LD management table 25, and sets "#00" as reference information for the logical disk assigned to MV 61 and the MV redirect table 21 (Sb3).
[0057] The writing unit 12 reads the combination of the data to be written and the address from the write request signal. The writing unit 12 arbitrarily selects a pool address in the reference count table 23 where the “reference count” field is “0”, i.e., a pool address that indicates the location of an empty storage area in the data pool 51 (Sb4).
[0058] The writing unit 12 records the data to be written in the storage area of the data pool 51 at the position indicated by the selected pool address. The writing unit 12 sets the value of the "Number of references" field of the record in the reference count table 23 in which the pool address of the storage area in which the data to be written is recorded in the "Pool data" field to 1 (Sb5).
[0059] The writing unit 12 records the pool address of the storage area in which the data to be written is recorded in the MV redirect table 21 at a position corresponding to the position in MV 61 indicated by the address associated with the data (Sb6), and ends the process. For example, if the address associated with the data is "0x10", the storage area at the position indicated by the address "0x10" in MV 61 is the second position from the top of the storage area in MV 61. In this case, the pool address is recorded in the second position from the top of the MV redirect table 21.
[0060] In addition, when the writing unit 12 reads out a combination of a plurality of data and addresses from the write request signal in the process of Sb4, the writing unit 12 performs the processes of Sb4, Sb5, and Sb6 for each of the combinations.
[0061] For example, when the writing unit 12 receives a write request signal including data from "AA" to "II" included in MV61 shown in FIG. 2 and addresses from "0x00" to "0x80" associated with each of the data, and records the data from "AA" to "II" in the data pool 51 as shown in FIG. 2. In this case, the content of the reference count table 23 becomes the content shown in FIG. 5(a), and the content of the MV redirect table 21 becomes the content shown in FIG. 2.
[0062] In the flowchart of FIG. 4, the subroutine of "data writing process when the MV redirect table exists", which is the process of Sb10 performed when the determination of "SV" is made in the process of Sb1 and when the determination process of "Yes" is made in the process of Sb2, will be described later with reference to FIG. 10.
[0063] <SV generation process> FIG. 6 is a flowchart showing an example of the operation of the snapshot unit 13. Here, the content of the MV redirect table 21 and the data pool 51 is the content shown in FIG. 2, the content of the reference count table 23 is the content shown in FIG. 5(a), and the content of the LD management table 25 is such that the records of the first and second rows of the LD management table 25 shown in FIG. 2 exist, the item of "paired LDN" in the record of the first row is blank, and there is no content after the third row. The description will be made on this premise.
[0064] For example, a user performs an operation on the host computer 2 to output a snapshot execution request signal. When the host computer 2 receives this operation, it outputs the snapshot execution request signal to the interface unit 40. When the interface unit 40 receives the snapshot execution request signal from the host computer 2, it outputs the received snapshot execution request signal to the microprocessor 10. When the snapshot unit 13 of the microprocessor 10 receives the snapshot execution request signal, it detects a record in the LD management table 25 where the "attribute" item is set to "MV".
[0065] The snapshot unit 13 reads "#00" shown in the "LDN" field of the detected record, and based on the read "#00", references the logical disk assigned to MV61, creates a virtual logical disk in the memory unit 30 with the same storage capacity as the storage capacity of the referenced logical disk, and assigns the created logical disk to SV62 to create SV62 (Sc1).
[0066] The snapshot unit 13 generates an SV redirect table 22 in the auxiliary storage unit 20, which is a copy of the MV redirect table 21 stored in the auxiliary storage unit 20 (Sc2). As a result, an SV redirect table 22 having the same contents as the MV redirect table 21 is generated in the auxiliary storage unit 20, as shown in FIG.
[0067] The snapshot unit 13 refers to the referenced count table 23, and increments by 1 the "referenced count" of each record in the referenced count table 23 whose "pool address" field indicates a pool address included in the SV redirect table 22 (Sc3). As a result, the contents of the referenced count table 23 change from the contents shown in Fig. 5(a) to the contents shown in Fig. 5(b).
[0068] The snapshot unit 13 generates a record in the LD management table 25 and generates "#02" as the LDN. The snapshot unit 13 records the generated "#02" in the "LDN" item of the generated record. The snapshot unit 13 associates the logical disk assigned with "#02" to SV62 and the SV redirect table 22 corresponding to SV62, and uses them as reference information to the logical disk and the SV redirect table 22 corresponding to SV62.
[0069] The snapshot unit 13 records "SV", which is the type of SV62, in the "attribute" item of the generated record. The snapshot unit 13 records the "#00" indicated in the "LDN" item of the record of MV61 detected from the LD management table 25 in the Sc1 process in the "paired LDN" item of the record of the generated SV62. The snapshot unit 13 records the "#02" recorded in the "LDN" item of the record of the generated SV62 in the "paired LDN" item of the record of MV61 detected from the LD management table 25 in the Sc1 process (Sc4), and ends the process.
[0070] As a result, the content of the LD management table 25 is such that the records in the first to third rows of the LD management table 25 shown in FIG. 2 exist, and the content after the fourth row does not exist. It becomes possible to specify that MV61 and SV62 are paired based on the content of the "paired LDN" item of the records of MV61 and SV62 in the LD management table 25.
[0071] <BURV Generation Process> 7 is a flowchart showing an example of the operation of the BURV management unit 14. For example, snapshots may be taken multiple times for the MV 61, and multiple SV redirect tables 22 may be stored in the auxiliary storage unit 20. In this case, a record corresponding to each of the multiple SVs 62 is generated in the LD management table 25. Since the BURV 52 is generated for the SV 62 to be backed up, the user selects one of the multiple SVs 62 to be backed up. Here, as an example, a case will be described in which, when the contents of the LD management table 25 show that records exist in the first to third rows of the LD management table 25 shown in FIG. 2, but do not exist in the fourth row and thereafter, an SV 62 corresponding to a record in which the "LDN" field is "#02" is selected.
[0072] For example, the user operates the host computer 2 to output a BURV creation request signal including "#02." When the host computer 2 receives this operation, it outputs the BURV creation request signal to the interface unit 40. When the interface unit 40 receives the BURV creation request signal from the host computer 2, it outputs the received BURV creation request signal to the microprocessor 10. When the BURV management unit 14 of the microprocessor 10 receives the BURV creation request signal, it reads out "#02" included in the received BURV creation request signal.
[0073] Based on the read "#02", the BURV management unit 14 references the logical disk assigned to SV62, creates a physical logical disk in the storage unit 30 with the same storage capacity as the referenced logical disk, and assigns the created logical disk to BURV52 to create BURV52 (Sd1).
[0074] The BURV management unit 14 calculates the number of storage areas of the BURV 52 by dividing the storage capacity of the logical disk assigned to the BURV 52 by the division unit, and generates a replication status table 24 having records of the calculated number in the auxiliary storage unit 20. The BURV management unit 14 records consecutive integer values starting from 1 in the "No." item of the generated replication status table 24 in order from the top row. The BURV management unit 14 initializes the "flag" item of the replication status table 24 with "0" indicating that the data has not been replicated (Sd2).
[0075] The BURV management unit 14 generates a record in the LD management table 25 and generates "#03" as the LDN. The BURV management unit 14 records the generated "#03" in the "LDN" item of the generated record, associates "#03" with the logical disk assigned to the BURV 52, and uses it as reference information to the logical disk. The BURV management unit 14 records "BURV", which is the type of the BURV 52, in the "attribute" item of the generated record. In the process of Sd1, the BURV management unit 14 records the "#02" read from the BURV generation request signal in the "pair LDN" item of the generated record (Sd3) and ends the process.
[0076] As a result, the content of the LD management table 25 becomes the content of the LD management table 25 shown in FIG. 2, and it can be specified that the BURV 52 has been generated for the SV 62 of "#02" from the record whose "LDN" item is "#03". When the process of FIG. 7 ends, no data is recorded in the storage area of the BURV 52, and the content of the replication status table 24 becomes the content in which all the "flag" items in the replication status table 24 shown in FIG. 2 are "0".
[0077] <Replication Process to BURV> 8 is a flowchart showing an example of the operation of the duplication unit 15. When the storage device 1 is started and the microprocessor 10 begins operation, the duplication unit 15 continues to perform the processing of FIG. 8 while the microprocessor 10 is operating. The duplication unit 15 determines whether or not a record in which the "attribute" field is "BURV", i.e., a record of BURV 52, exists in the LD management table 25 (Se1). If the duplication unit 15 determines that a record of BURV 52 does not exist in the LD management table 25 (Se1, No), it performs the processing of Se1 again. On the other hand, if the duplication unit 15 determines that a record of BURV 52 exists in the LD management table 25 (Se1, Yes), it generates a variable i in an internal storage area and sets the generated variable i to "1" (Se2).
[0078] The duplication unit 15 selects a record in the duplication status table 24 in which the value of the "No." field is the value of the variable i, that is, the record in the i-th row of the duplication status table 24. The duplication unit 15 determines whether the value of the "flag" field of the selected record is "1", that is, whether the flag indicates that duplication exists (Se3).
[0079] If the duplication unit 15 determines that the value of the "flag" field of the selected record is "1", that is, that the flag is a flag indicating that duplication exists (Se3, Yes), the process proceeds to Se4. On the other hand, the duplication unit 15 determines that the value of the "flag" field of the selected record is not "1", that is, that the flag is not a flag indicating that duplication exists but a flag with a value of "0" indicating that duplication does not exist (Se3, No).
[0080] In this case, the duplication unit 15 detects a record in which the "attribute" field is "BURV" from the LD management table 25, i.e., the record of BURV52, and detects the LDN indicated in the "paired LDN" field of the detected record. When the contents of the LD management table 25 are as shown in FIG. 2, the duplication unit 15 detects "#02" as the LDN. The duplication unit 15 refers to the SV redirect table 22 based on the detected "#02". The duplication unit 15 sets the i-th pool address stored from the top of the SV redirect table 22 as the reference pool address (Se6).
[0081] The duplication unit 15 determines whether or not the reference pool address and the pool address immediately preceding the reference pool address indicate consecutive positions in the SV redirect table 22 (Se7). Here, the immediately preceding pool address is the pool address stored at the (i-1)th position from the beginning in the SV redirect table 22. When the duplication unit 15 determines that the reference pool address and the pool address immediately preceding the reference pool address indicate consecutive positions (Se7, Yes), the process proceeds to the process of Se4.
[0082] On the other hand, the duplication unit 15 determines that the reference pool address and the pool address immediately before the reference pool address do not indicate consecutive positions (Se7, No). Note that when the variable i is "1", the reference pool address is the first from the beginning in the SV redirect table 22, and there is no immediately preceding pool address, so the duplication unit 15 determines No in the processing of Se7.
[0083] If the determination in step Se7 is "No," the duplication unit 15 determines whether the reference pool address and the pool address immediately following the reference pool address indicate consecutive positions in the SV redirect table 22 (Se8). Here, the immediately following pool address is the pool address stored in the SV redirect table 22 at the (i+1)th position from the beginning.
[0084] In the processes of Se7 and Se8, indicating consecutive positions means that the positions are consecutive in the arrangement order of the pool addresses in the data pool 51. Therefore, in the process of Se7, if the value obtained by adding the division unit to the value of the immediately preceding pool address is the value of the reference pool address, it indicates consecutive positions. In contrast, in the process of Se8, if the value obtained by adding the division unit to the value of the reference pool address is the value of the immediately following pool address, it indicates consecutive positions.
[0085] If the duplication unit 15 determines that the reference pool address and the pool address immediately following the reference pool address indicate consecutive positions (Se8, Yes), the process proceeds to the process of Se4. On the other hand, it is assumed that the duplication unit 15 determines that the reference pool address and the pool address immediately following the reference pool address do not indicate consecutive positions (Se8, No). Note that if the value of the variable i is a value indicating the tail position of the SV redirect table 22, there is no pool address immediately following the reference pool address, and therefore the duplication unit 15 determines No in the process of Se8.
[0086] A "No" determination is made in the processing of Se8 when the reference pool address does not indicate a consecutive position in relation to both the immediately preceding and succeeding pool addresses. In this case, the reference pool address indicates a discontinuous position in relation to the preceding and succeeding pool addresses in the SV redirection table 22, and the data stored in the storage area at the position indicated by the reference pool address in the data pool 51 is stored discontinuously in the data pool 51. Therefore, when reading the data stored in the storage area at the position indicated by the reference pool address from the data pool 51, it cannot be read sequentially.
[0087] Therefore, if the duplication unit 15 determines "No" in the processing of Se8, it reads out the data stored in the storage area at the position of the reference pool address in the data pool 51. The duplication unit 15 records the read out data in the ith storage area from the beginning of BURV 52, that is, in the storage area of BURV 52 at the position indicated by the address whose value is "(i-1) × division unit" (Se9). As a result, the data stored in the data pool 51 is duplicated in BURV 52. The duplication unit 15 changes the value of the "flag" field of the record in the duplication status table 24 whose "No." field has a value of i to "1", that is, a flag indicating duplication (Se10), and proceeds to the processing of Se4.
[0088] The duplication unit 15 adds 1 to the value of the variable i and sets the new value of the variable i (Se4). The duplication unit 15 determines whether the variable i exceeds the total number of records stored in the duplication status table 24 (Se5). If the duplication unit 15 determines that the value of the variable i exceeds the total number of records (Se5, Yes), it performs the process of Se1 again. On the other hand, if the duplication unit 15 determines that the value of the variable i does not exceed the total number of records (Se5, No), it performs the process of Se3 again.
[0089] As a result, in the LD management table 25, data corresponding to pool addresses indicating discontinuous positions among the pool addresses shown in the SV redirect table 22 of the SV62 paired with the BURV52 is replicated to the BURV52 in the order of the pool addresses shown in the SV redirect table 22.
[0090] For example, in the SV62 data shown in Figure 2, the pool address of "AA" is "0x40." The pool address of "BB," the data next to "AA," is "0x30." "0x40" and "0x30" indicate consecutive positions in the data pool 51, but in the order of the data in the data pool 51, the pool address consecutive to "0x40" is "0x50," and "0x30" is a consecutive position in the opposite direction.
[0091] Therefore, when the reference pool address is "AA" and the corresponding data is "0x40", in the processing of Se7 and Se8, the determination is "No" in both cases, and the data of "AA" is copied to the storage area at the position indicated by the head address "0x00" of BURV52. For "BB" as well, similar to "AA", the determination is "No" in the processing of Se7 and Se8, and the data of "BB" is copied to the storage area at the position indicated by the second address "0x10" of BURV52.
[0092] In contrast, for "CC" and "DD", they will indicate consecutive positions in the data pool 51. Also, for "EE" and "FF", they will indicate consecutive positions in the data pool 51. Therefore, for "CC" and "EE", the determination is "Yes" in the processing of Se8, and for "DD" and "FF", the determination is "Yes" in the processing of Se7. As a result, "CC", "DD", "EE", "FF" are not copied to BURV52, and the storage areas of "0x20", "0x30", "0x40", "0x50" where "CC", "DD", "EE", "FF" of SV62 are stored will be blank in BURV52.
[0093] For each of "GG", "HH", "II", in the relationship between each pool address and the pool addresses immediately before and after it, they do not indicate consecutive positions in the data pool 51. Therefore, similar to "AA" and "BB", the determination is "No" in the processing of Se7 and Se8, and they will be copied to the storage areas at the positions indicated by the addresses "0x60", "0x70", "0x80" in BURV52 respectively. As a result, the content of BURV52 will be the content shown in Figure 2, and the content of the replication status table 24 will be the content shown in Figure 2.
[0094] <Reading Process from BURV> 9 is a flowchart showing an example of the operation of the reading unit 16. With BURV 52 and the contents of the replication status table 24 as shown in FIG. 2, for example, a user performs an operation on the host computer 2 to output a read request signal including "#03", which is the LDN of BURV 52, and information indicating the range of the storage area from which the backup is to be obtained, in order to obtain a backup of SV62. Upon receiving this operation, the host computer 2 outputs the read request signal to the interface unit 40. Upon receiving the read request signal from the host computer 2, the interface unit 40 outputs the received read request signal to the microprocessor 10.
[0095] When the reading unit 16 of the microprocessor 10 receives the read request signal, it reads "#03" from the read request signal. Based on the "BURV" indicated in the "Attribute" field of the record in the LD management table 25 in which "#03" is stored in the "LDN" field, the reading unit 16 determines that the read request is for the BURV 52. Therefore, the reading unit 16 starts the process of FIG. 9. The reading unit 16 reads information included in the read request signal that indicates the range of the storage area from which a backup is to be acquired. The information indicating the range of the storage area from which a backup is to be acquired is, for example, information indicated by the start address of the range and the end address of the range. The reading unit 16 detects the order, from the beginning, of the positions of the BURV 52 indicated by the start address and the order, from the beginning, of the positions of the BURV 52 indicated by the end address. The reading unit 16 generates a variable i in an internal storage area and sets the initial value of the generated variable i to a value indicating the order, from the beginning, of the positions of the BURV 52 indicated by the start address. The reading unit 16 records, in an internal storage area, a value indicating the rank from the beginning of the position of the BURV 52 indicated by the end address as the maximum value of the variable i (Sf1). Here, it is assumed that the read request signal contains information indicating the range of the storage area from which backup is to be acquired, with the start address being "0x00" and the end address being "0x80". Therefore, an example will be described in which the reading unit 16 detects "1" as the rank from the beginning of the position of the BURV 52 indicated by the start address, and "9" as the rank from the beginning of the position of the BURV 52 indicated by the start address.
[0096] The reading unit 16 refers to the replication status table 24. The reading unit 16 selects a record in the referenced replication status table 24 where the value of the "No." field is the value of the variable i, that is, the record in the i-th row of the replication status table 24. The reading unit 16 determines whether the value of the "Flag" field of the selected record is "1", that is, whether the flag indicates that replication exists (Sf2).
[0097] Assume that the reading unit 16 determines that the value of the "flag" field of the selected record is "1," i.e., that the flag indicates that replication exists (Sf2, Yes). In this case, starting from the record in the i-th row of the replication status table 24, the reading unit 16 counts how many consecutive records in the replication status table 24 have a "1" in the "flag" field among the subsequent records (Sf3). For example, when i is "1," the record in the first row is the starting point. The records subsequent to the record in the first row that have a "1" in the "flag" field are the records in the second, seventh, eighth, and ninth rows. Of these, the record in the second row is the one consecutive record to the record in the first row, so the reading unit 16 counts one of the records in the second row and obtains a count of "1" as a result of the count.
[0098] The reading unit 16 reads data from the BURV52 in a range starting from the ith storage area from the beginning of the BURV52 and including the counted number of consecutive storage areas (Sf4). Here, the address value of the ith storage area from the beginning of the BURV52 is "(i-1) x division unit", and the address value of the last storage area of the counted number of consecutive storage areas is "(i + count number - 1) x division unit". For example, when i is "1", the address of the starting BURV52 is "0x00", and the count number is "1", so the address of the last BURV52 is "0x10". Therefore, the reading unit 16 sequentially reads data in the range from "0x00" to "0x10" from the BURV52, thereby obtaining the data "AA" and "BB".
[0099] After reading the data, the reading unit 16 adds the value of "count number + 1" to the value of variable i, and sets the new value of variable i (Sf5). The reading unit 16 determines whether the value of variable i exceeds the maximum value of variable i stored in an internal storage area (Sf6). If the reading unit 16 determines that the value of variable i does not exceed the maximum value of variable i (Sf6, No), it performs the process of Sf2 again. On the other hand, if the reading unit 16 determines that the value of variable i exceeds the maximum value of variable i (Sf6, Yes), it ends the process.
[0100] In the process of Sf2, the reading unit 16 determines that the value of the "flag" field of the selected record is not "1," i.e., the flag is not a flag indicating the presence of duplication but a flag with a value of "0" indicating the absence of duplication (Sf2, No). If the reading unit 16 reads out "AA" and "BB" in the process of Sf4, the new value of variable i in the process of Sf5 becomes "3" by calculating the value of variable i "1" + the count number "1" + 1. In this case, the reading unit 16 determines "No" in Sf6 and performs the process of Sf2 again with variable i in the state of "3." Because the "flag" field of the record in the third row of the replication status table 24 is "0," the reading unit 16 determines "No" in the process of Sf3.
[0101] If the determination in the process of Sf3 is "No", the reading unit 16 detects the LDN stored in the "Paired LDN" field of the record of the LD management table 25 in which "#03" read from the read request signal is stored in the "LDN" field. The reading unit 16 detects the redirect table of the paired volume of BURV 52 from the auxiliary storage unit 20 based on the detected LDN (Sf7). If the contents of the LD management table 25 are as shown in FIG. 2, the reading unit 16 detects "#02" as the LDN in the process of Sf7. The reading unit 16 detects the SV redirect table 22 from the auxiliary storage unit 20 based on the detected "#02".
[0102] The reading unit 16 counts the number of pool addresses whose positions indicated by the pool addresses are consecutive in the redirect table arrangement, starting from the i-th pool address from the beginning of the redirect table of the paired volume of the detected BURV 52 (Sf8). If the redirect table of the paired volume of the BURV 52 is the SV redirect table 22 and i is "3", the pool address "0xc0" is indicated as the third from the beginning of the SV redirect table 22. If the pool address "0xc0" is used as the starting point, the fourth pool address is "0xd0" and the fifth pool address is "0x00". In this case, the fourth "0xd0" is consecutive in position to the third "0xc0", but the fifth "0x00" is not consecutive in position to the fourth "0xd0". Therefore, the reading unit 16 counts one fourth "0xd0" and obtains a count value of "1" as a result of the counting.
[0103] The reading unit 16 reads data from the data pool 51 in the range of the counted number of consecutive storage areas, which is the range starting from the storage area at the position indicated by the pool address that was used as the starting point in the processing of Sf8 (Sf9). If the redirect table for the paired volume of BURV 52 is the SV redirect table 22 and i is "3", the starting pool address will be "0xc0", which is the third address from the top of the SV redirect table 22. Because the counted number is "1", the last pool address of the counted number of consecutive storage areas will be "0xd0", which is the fourth address from the top of the SV redirect table 22. Therefore, the reading unit 16 sequentially reads data in the range from "0xc0" to "0xd0" from the data pool 51, thereby obtaining the data "CC" and "DD".
[0104] In the process of Sf9, after the reading unit 16 reads the data, it proceeds with the process of Sf5. As a result, after the reading unit 16 sequentially reads "AA" and "BB" from BURV52 through the processes of Sf3 and Sf4, it sequentially reads "CC" and "DD" from the data pool 51 through the processes of Sf7, Sf8, and Sf9, sequentially reads "EE" and "FF" from the data pool 51 through the processes of Sf7, Sf8, and Sf9, and sequentially reads "GG", "HH", and "II" from BURV52 through the processes of Sf3 and Sf4.
[0105] The reading unit 16 transmits the read "AA" to "II" to the host computer 2 via the interface unit 40 as described above.
[0106] <Writing Process When There is an MV Redirection Table> FIG. 10 is a flowchart showing an example of a subroutine of "Data Writing Process When There is an MV Redirection Table" in Sb10 in a flowchart showing an example of the operation of the writing unit 12 shown in FIG. 4. Here, different from the example described with reference to FIG. 4, an example of writing data to SV62 will be described. For example, the user performs an operation on the host computer 2 to output a write request signal including " #02", which is the LDN specifying SV62, and data associated with the write destination address. In this case, the writing unit 12 makes a determination of "SV" in the process of Sb1 in FIG. 4, and the process of the subroutine of Sb10 is started.
[0107] Note that the scenario of writing data to SV62 assumes, for example, the following scenarios. When you want to perform development or evaluation based on the volume used in actual business, there is a risk of breaking the volume due to development or evaluation. Therefore, instead of MV61, which is the volume used in actual business, as a volume that can be broken, a snapshot is used to generate SV62, which is a copy of MV61, and a scenario where development or evaluation is performed using the generated SV62 is assumed.
[0108] The writing unit 12 reads "#02" and the combination of the data and address to be written from the write request signal. The writing unit 12 arbitrarily selects a pool address in the reference count table 23 where the "reference count" item is "0", that is, a pool address that indicates the location of an empty storage area in the data pool 51 (Sg1).
[0109] Based on the read "#02", the writing unit 12 detects the SV redirect table 22 from the auxiliary storage unit 20 (Sg2). The writing unit 12 determines whether the data is to be "added" or "rewritten" based on whether pool data is stored in the SV redirect table 22 at a position corresponding to the position of the SV62 indicated by the address associated with the data to be written (Sg3).
[0110] If pool data is not stored in the position of the SV redirect table 22 that is the target of the determination in the process of Sg3, the writing unit 12 determines that data is to be "added" (Sg3, add). In this case, the writing unit 12 records the data that is the target of the determination in the process of Sg3 in the storage area of the data pool 51 at the position indicated by the pool address selected in the process of Sg1. The writing unit 12 sets the value of the "number of references" item of the record in the referenced number table 23 that stores the pool address of the storage area that recorded the data that is the target of the determination in the process of Sg3 to 1 (Sg4). The writing unit 12 records the pool address of the storage area that recorded the data that is the target of the determination in the process of Sg3 in the position of the SV redirect table 22 that corresponds to the position of the SV62 indicated by the address associated with that data (Sg5), and proceeds to the process of Sg11.
[0111] If pool data is stored at the position in the SV redirect table 22 that is the determination target of the process in Sg3, the writing unit 12 determines that the data is to be "rewritten" (Sg3, rewrite). In this case, the writing unit 12 reads out the pool data that is stored at the position in the SV redirect table 22 that is the determination target of the process in Sg3. The writing unit 12 sets the read pool data as the pre-rewrite address (Sg6).
[0112] The writing unit 12 decrements by 1 the value of the "number of references" field of the record in the reference count table 23 in which the pre-rewrite address is stored in the "pool data" field (Sg7). The writing unit 12 records the data to be written in the storage area of the data pool 51 at the position indicated by the pool address selected in the process of Sg1. The writing unit 12 sets the pool address indicating the position of the storage area in which the data is recorded as the post-rewrite address (Sg8).
[0113] The writing unit 12 increments the value of the "number of references" field of the record in the reference count table 23 in which the rewritten address is stored in the "pool address" field by 1 (Sg9). The writing unit 12 rewrites the pre-rewrite address stored in the SV redirect table 22 to the rewritten address (Sg10).
[0114] The writing unit 12 determines whether the SV62 corresponding to "#02" read in the processing of Sg1 is paired with the BURV52 (Sg11). The writing unit 12 makes this determination as follows: The writing unit 12 detects a record in the LD management table 25 in which "BURV" is stored in the "attribute" field, and determines whether the volume corresponding to "#02" is paired with the BURV52 based on whether "#02" is stored in the "paired LDN" field of the detected record. If "#02" is stored in the "paired LDN" field of the detected record, the writing unit 12 determines that the volume corresponding to "#02" is paired with the BURV52 (Sg11, Yes). On the other hand, if "#02" is not stored in the "paired LDN" field of the detected record, the writing unit 12 determines that the volume corresponding to "#02" is not paired with the BURV52 (Sg11, No), and ends the processing.
[0115] 2, the SV62 corresponding to "#02" is paired with the BURV52, and therefore the writing unit 12 determines "Yes" in the processing of Sg11. In this case, the writing unit 12 detects the order from the beginning of the position where the pool address was rewritten in the SV redirect table 22, and changes the value of the "flag" item of the record in the replication status table where the value indicating the detected order is indicated in the "No." item to "0", that is, a flag indicating no replication (Sg12), and ends the processing.
[0116] If the write request signal contains multiple pieces of data, the writing unit 12 arbitrarily selects pool addresses whose "reference count" field is "0" for the number of pieces of data in the processing of Sg1. Since the processing of Sg3 must be performed for each piece of data, the processing from Sg3 onwards is performed for each piece of data. When the processing for one piece of data is completed, the writing unit 12 performs the processing from Sg3 onwards for the next piece of data, and when the processing from Sg3 onwards for all pieces of data is completed, the processing ends.
[0117] A specific example of the process described with reference to FIG. 10 will be described with reference to FIGS. 11 and 12. FIG. 11 shows an example in which the writing unit 12 receives a write request signal to write data "JJ" to address "0x60" of MV 61 when the contents of MV 61, MV redirect table 21, data pool 51, referenced number table 23, and LD management table 25 are as shown in FIG. 2. The writing unit 12 determines "MV" in the process of Sb1 in FIG. 4, determines "Yes" in the process of Sb2, and starts the processing of the subroutine of Sb10. For example, suppose that the writing unit 12 selects "0x50" as the pool address indicating the location of an empty storage area in the data pool 51 in the process of Sg1. The writing unit 12 detects the MV redirect table 21 based on "#00" read from the write request signal in the process of Sg2. The writing unit 12 determines to "rewrite" in the processing of Sg3 because the pool address "0x70" is stored in the seventh position from the beginning of the MV redirect table 21, which corresponds to the position indicated by the address "0x60" of the detected MV 61.
[0118] In processing Sg6, the writing unit 12 sets "0x70" in the MV redirect table 21 as the pre-rewrite address, and in processing Sg7, decrements the value of the "Number of References" field of the record in the referenced count table 23 in which "0x70" is stored in the "Pool Address" field by 1, changing it from "2" to "1." In processing Sg8, the writing unit 12 records the data to be written, "JJ," in the storage area of "0x50" in the data pool 51, and sets "0x50" as the post-rewrite address. In processing Sg9, the writing unit 12 increments the value of the "Number of References" field of the record in the referenced count table 23 in which the post-rewrite address "0x50" is stored in the "Pool Address" field by 1, changing it from "0" to "1."
[0119] In the process of Sg10, the writing unit 12 rewrites the pre-rewrite address "0x70" to the post-rewrite address "0x50" in the MV redirect table 21. Since MV 61 is not paired with BURV 52, the writing unit 12 determines "No" in Sg11 and ends the process.
[0120] As a result, the data "GG" at address "0x60" in MV61 is changed to "JJ," but the "GG" data remains stored without being deleted from data pool 51. Therefore, when address "0x60" is specified to reference SV62, "GG" is referenced. Therefore, via SV62, it is possible to reference the data in MV61 when SV62 was generated from MV61 by a snapshot.
[0121] FIG. 12 shows an example in which, after the processing of FIG. 11 has been performed, the writing unit 12 receives a write request signal to write data "KK" to address "0x80" of SV62. The writing unit 12 determines "SV" in the processing of Sb1 of FIG. 4 and starts the processing of the subroutine of Sb10. For example, in the processing of Sg1, the writing unit 12 selects "0xb0" as the pool address indicating the location of an empty storage area in the data pool 51. In the processing of Sg2, the writing unit 12 detects the SV redirect table 22 based on "#02" read from the write request signal. Because the pool address "0xe0" is stored in the position corresponding to the address "0x80" in the detected SV redirect table 22, the writing unit 12 determines "rewrite" in the processing of Sg3.
[0122] 11 is performed, and in the referenced count table 23, the value of the "referenced count" field of the record whose "pool address" field is "0xe0" changes from "2" to "1", and the value of the "referenced count" field of the record whose "pool address" field is "0xb0" changes from "0" to "1". The data to be written, "KK", is recorded in the storage area of "0xb0" in the data pool 51. "0xe0" in the SV redirect table 22 is rewritten to "0xb0".
[0123] Because SV62 is paired with BURV52, the writing unit 12 determines "Yes" in Sg11 and performs processing in Sg12. In processing Sg12, the writing unit 12 detects the record in the replication status table 24 that corresponds to the ninth position from the beginning in the SV redirect table 22 where "0xe0" has been rewritten to "0xb0", i.e., the record in which "9" is indicated in the "No." field. The writing unit 12 changes the content of the "flag" field of the detected record from "1" to "0".
[0124] 8 is performed by the duplication unit 15. During this process, when the variable i becomes "9," the duplication unit 15 sets the pool address "0xb0" in the SV redirection table 22 as the reference pool address in the process of Se6. In the SV redirection table 22, the reference pool address "0xb0" does not indicate a position that is continuous with the immediately preceding and succeeding pool addresses. Therefore, the duplication unit 15 determines "No" in the processes of Se7 and Se8. The duplication unit 15 duplicates "KK" stored in the storage area of the data pool 51 at the position indicated by the pool address "0xb0" to the storage area of "0x80," which is the ninth from the beginning of BURV 52. As a result, the data stored in the storage area of "0x80" in BURV 52 is changed from "II" to "KK." In the process of Se10, the duplication unit 15 changes the "flag" field of the record in the duplication status table 24 in which "9" is indicated in the "No." field from "0" to "1." Therefore, the "flag" item for the "No." item 9 in the replication status table 24 changes from "1" to "0", and then changes back to "1".
[0125] (Actions and effects of storage devices) In the storage device 1, the data pool 51, to which a physical logical disk is assigned, has a plurality of contiguous storage areas, and stores each of the data entities in SV62 in a storage area at an arbitrary position. The duplication unit 15 compares the order of data in SV62 with the order of data in the data pool 51, and duplicates each of the data stored discontinuously in the data pool 51 to the physical logical disk, i.e., the BURV 52 to which a contiguous storage area is assigned, in the order of data in SV62. When the reading unit 16 receives a read request for BURV 52, it reads data sequentially from the first storage area of BURV 52 in the requested read range, and if the data to be read is not stored in BURV 52, it reads the data from the data pool 51 via SV62.
[0126] In other words, the duplication unit 15 rearranges data stored discontinuously in the data pool 51 to the BURV 52 to which a physical logical disk is assigned, so that the data is located contiguously, and therefore the reading unit 16 can read the data sequentially when reading data from the BURV 52. Furthermore, since the duplication unit 15 does not duplicate data stored in contiguous positions in the data pool 51 to the BURV 52, when the reading unit 16 reads data from the data pool 51 that cannot be read from the BURV 52, the reading is sequential. Therefore, by using the storage device 1, it is possible to shorten the time required to read data, which increases when data is stored in discrete positions.
[0127] For example, assume that SV62, SV redirect table 22, replication status table 24, data pool 51, and BURV52 are in the state shown in Fig. 2. In this case, when the reading unit 16 reads data from SV62, if it reads "AA" to "II" individually, the data will be read in nine separate steps. Even if the reading unit 16 sequentially reads "CC" and "DD" and "EE" and "FF," which are located consecutively in the data pool 51, the data will be read in seven separate steps.
[0128] In contrast, when the reading unit 16 reads data from BURV 52, as described above, it sequentially reads "AA" and "BB" from BURV 52, sequentially reads "CC" and "DD" from data pool 51, sequentially reads "EE" and "FF" from data pool 51, and sequentially reads "GG", "HH", and "II" from BURV 52, thereby dividing the data reading into four parts, thereby reducing the number of times the data is read, in other words, the time required to read the data. The more discrete the positions of the data stored in data pool 51, the longer the time required to read data from SV62. However, by reading data from BURV 52, this increase in time can be suppressed, thereby shortening the time required to read the data.
[0129] (Regarding the reduction in BURV's memory capacity) As described with reference to FIG. 8 , the duplication unit 15 does not duplicate data stored in consecutive locations in the data pool 51 to the BURV 52, thereby suppressing an increase in the storage capacity required for data storage. However, because the BURV 52 is created by allocating a physical logical disk, the free storage area of the BURV 52 cannot be used for other purposes. The logical disk of the volume paired with the BURV 52 is a virtual logical disk, and if the storage capacity of this virtual logical disk is large, a large portion of the physical storage area of the storage unit 30 will be allocated to the BURV 52. Data is stored in the storage area of the BURV 52 in a number of storage areas that matches the number of data items stored discontinuously in the data pool 51. In some cases, much of the storage area of the BURV 52 may become free and unavailable for other purposes.
[0130] In this case, for example, by applying a technology called thin provisioning to the storage unit 30, when data is stored in the storage area of the BURV 52, it is possible to dynamically allocate a storage area of one of the physical disks 32-1 to 32-N to that storage area. For example, as shown in Fig. 2, when data is stored in the BURV 52, it is possible to allocate a storage area of one of the physical disks 32-1 to 32-N to "0x00", "0x10", "0x60", "0x70", and "0x80" of the BURV 52, but not allocate a storage area of the physical disks 32-1 to 32-N to "0x20" to "0x50". In this way, it is possible to reduce the effective storage capacity of the BURV 52.
[0131] Even when thin provisioning is applied, the ranges of consecutive positions "0x00", "0x10", and "0x60" to "0x80" are each assigned ranges from which data can be read sequentially within the storage areas of physical disks 32-1 to 32-N. Furthermore, when thin provisioning is applied, if the "flag" item in replication status table 24 is changed from "1" to "0", it is further desirable to delete the data in the storage area of BURV 52 corresponding to the position of the record in replication status table 24 where the change was made, and free up the storage area.
[0132] 2, the storage area from "0x20" to "0x50" is left free because it is assumed that data will be rewritten in SV62. Therefore, if SV62 in which data will not be rewritten is to be generated, a configuration such as that shown in FIG. 13 may be employed. For example, if the volume from which BURV52 is replicated is SV62, a dummy volume 63 that is referenced by the host computer 2 is generated in place of BURV52. A virtual logical disk is assigned to volume 63. In the LD management table 25, SV62 and volume 63 are paired, and the attribute item for volume 63 is set to "BURV".
[0133] On the other hand, BURV52 is not paired with SV62 in the LD management table 25, and the "attribute" item is set to, for example, "data pool for BURV." A redirect table 26 for volume 63 is created in the auxiliary storage unit 20, and the reference destination of references via the redirect table 26 is set to BURV52. In other words, the address stored in the redirect table 26 is the address of BURV52. When backing up SV62, the LDN of volume 63 is specified instead of the LDN of BURV52, and BURV52 is referenced via the redirect table 26.
[0134] By adopting such a configuration, when copying data from data pool 51 to BURV 52, data can be written to consecutive locations in BURV 52 without gaps, as shown in Figure 13, so the storage capacity of BURV 52 can be reduced.
[0135] (When writing data to a data pool makes the data position continuous) 11, and furthermore, suppose that the writing unit 12 receives a write request signal to write data "KK" to address "0x60" of SV62. In this case, suppose that the writing unit 12 selects "0x80" as the pool address indicating the location of an empty storage area in the data pool 51 in the processing of Sg1 in FIG. 10. In the processing of Sg8, the writing unit 12 writes the data "KK" to the storage area in the data pool 51 at the location indicated by the selected pool address "0x80". In the processing of Sg10, the writing unit 12 rewrites the seventh pool address from the top in the SV redirect table 22, "0x70," to the pool address "0x80."
[0136] Because SV62 is paired with BURV52, in processing Sg11, the writing unit 12 changes the value of the "Flag" field of the record in the replication status table 24 in which "7" is indicated in the "No." field corresponding to address "0x60" from "1" to "0." By recording "KK" at "0x80" in the data pool 51, the data "KK" and "HH" stored in the storage areas at consecutive addresses "0x60" and "0x70" in SV62 are now stored in the storage areas at consecutive pool addresses "0x80" and "0x90" in the data pool 51, as shown in FIG.
[0137] 8 is performed by the duplication unit 15, the following state occurs. When the variable i becomes "7", the duplication unit 15 sets the pool address "0x80" in the SV redirect table 22 as the reference pool address in the process of Se6. In the SV redirect table 22, the reference pool address "0x80" indicates a position that is continuous with the immediately following pool address "0x90", so the duplication unit 15 determines "Yes" in the process of Se8. Therefore, "KK" stored in the pool address "0x80" in the data pool 51 is not duplicated in the storage area at the position indicated by the seventh address "0x60" from the beginning of the BURV 52, and the value of the "Flag" field of the record in which "7" is indicated in the "No." field of the duplication status table 24 also remains "0".
[0138] 9, when the reading unit 16 reads data from BURV 52, the data "KK" is read from the data pool 51 because the flag in the replication status table 24 is "0", and the data "HH" is read from BURV 52 because the flag in the replication status table 24 is "1". In other words, even though reading the data "KK" and "HH" from the data pool 51 would allow for sequential reading, the reading unit 16 ends up performing a random read.
[0139] In this way, when data is written to the data pool 51 and the data stored in the data pool 51 subsequently becomes contiguous, the time required for backup can be further reduced by adding a process to change the read destination to the data pool 51. For example, in the process of Fig. 8, by adding the processes Se11 and Se12 shown in Fig. 15, the read destination can be changed to the data pool 51.
[0140] If the replication unit 15 determines "Yes" in the process of Se7, the reference pool address and the immediately preceding pool address indicate consecutive positions in the data pool 51. Therefore, in the process of Se11, if the "flag" item of the record in the replication status table 24 corresponding to the immediately preceding pool address, in other words, the record in the (i-1)th row, is set to "1", it is changed to "0". This makes it possible to set the data pool 51 as the read destination for data corresponding to the immediately preceding pool address.
[0141] Similarly, if the replication unit 15 determines "Yes" in the process of Se8, the reference pool address and the immediately succeeding pool address indicate consecutive positions in the data pool 51. Therefore, in the process of Se12, if the "flag" item of the record in the replication status table 24 corresponding to the immediately succeeding pool address, in other words, the record in the (i+1)th row, is set to "1", it is changed to "0". This makes it possible to set the data pool 51 as the read destination for data corresponding to the immediately succeeding pool address.
[0142] (When limiting the number of SVs to be stored) 6, the snapshot unit 13 generates a virtual logical disk with the same storage capacity as the logical disk allocated to MV 61, and allocates the generated logical disk to SV 62. When this processing is performed, a logical disk is generated each time a snapshot is taken. As described above, when determining the storage capacity of the data pool 51, the number of SV62-1 to SV62-M to be stored is also taken into consideration, and therefore a mechanism is required to limit the number of SV62 to be generated, i.e., the value of M.
[0143] In order to limit the number of SV62 to be stored, an SV logical disk of the same number is generated in advance. Note that the SV logical disk is a virtual logical disk. For example, when the number of SV62 to be stored is limited to one, for example, in the processing of Sa3 or Sa5 in FIG. 3, the MV management unit 11 generates one SV logical disk with the same storage capacity as the logical disk assigned to MV61, and registers the generated SV logical disk in the LDN management table 25. When the snapshot unit 13 processes Sc1, instead of generating a logical disk, it assigns an SV logical disk that has already been registered in the LDN management table 25 as the logical disk for the SV62.
[0144] If the SV logical disk has already been assigned to a volume, the SV logical disk is initialized before being assigned to a newly created SV 62. Here, the initialization process refers to the process described below. The snapshot unit 13 initializes the "Paired LDN" field of the record for the SV logical disk in the LD management table 25 to blank, and also initializes the "Paired LDN" field of the record in which the LDN of the SV logical disk is stored in the "Paired LDN" field to blank. The snapshot unit 13 decrements by 1 the value of the "Number of References" field of the record in the Referenced Number Table 23 in which the pool address indicated in the SV redirect table 22 corresponding to the SV logical disk is stored in the "Pool Address" field. The snapshot unit 13 deletes the SV redirect table 22 corresponding to the SV logical disk from the auxiliary storage unit 20, and releases the association between the LDN indicated in the "LDN" field of the record for the SV logical disk in the LD management table 25 and the SV redirect table 22. By employing such a mechanism, it is possible to limit the number of SV 62s to be stored.
[0145] (Other configuration examples) As explained with reference to Fig. 3, when the MV management unit 11 receives an MV generation request signal, it performs the processes Sa1 to Sa5 in Fig. 3 to generate an MV 61 and a data pool 51. On the other hand, when the MV management unit 11 receives an MV generation request signal including the storage capacity of the MV 61, it performs the processes Sa1 and Sa2, and when it receives a separately determined data pool generation request signal including the storage capacity of the data pool 51, it may perform the processes Sa3 to Sa5.
[0146] 2, the replication status table 24 is a table having records each having a "No." field and a "Flag" field. Alternatively, the records of the replication status table 24 may be records that do not include a "No." field column. In this case, the process of identifying the position of the "Flag" field using the value of the "No." field in the above embodiment is replaced with a process of identifying the order of the "Flag" field from the beginning.
[0147] As shown in FIG. 8, if the duplication unit 15 determines "No" in the process of Se3, it sets the i-th pool address from the top of the redirect table paired with BURV 52 as the reference pool address in Se6, and determines in processes Se7 and Se8 whether the reference pool address indicates a consecutive position in relation to the immediately preceding and succeeding pool addresses. Instead of the processes of Se7 and Se8, the duplication unit 15 may perform a process of detecting all pool addresses that are consecutively positioned in the redirect table paired with BURV 52, starting from the reference pool address. In this case, the duplication unit 15 performs processes Se9 and Se10, i.e., a process of replicating data from data pool 51 to BURV 52 and a process of updating the duplication status table 24, using the reference pool address and a numerical value indicating the order from the top of the redirect table as the value of variable i for each of the reference pool address and all detected pool addresses. In other words, instead of performing the process by incrementing the value of variable i by one as shown in Fig. 8, the process from Se9 to Se10 may be performed collectively for the consecutive positions in the sequence of the redirect table that forms a pair with BURV 52. In this case, after Se10, instead of performing the process of Se4, the value of variable i is set to a new value obtained by adding the value of "the number of detected pool addresses + 1" to the value of variable i, and the process proceeds to Se5. Note that if the duplication unit 15 cannot detect even one pool address with consecutive positions, it skips the processes of Se9 and Se10 and proceeds to the process of Se4. Even with this process, the result of the process will be the same as the result of the process shown in Fig. 8.
[0148] In the example described with reference to FIG. 7, SV62 and BURV52 are paired, but MV61 and BURV52 may also be paired.
[0149] In the processing of Fig. 8, the order of the processing of Se7 and the processing of Se8 may be reversed. In the processing of Fig. 10, the processing of Sg6 and Sg7 may be performed after the processing of Sg8 and Sg9. Furthermore, at the timing of the processing of Sg1, the writing unit 12 may perform the selection processing of arbitrarily selecting a pool address indicating the location of an empty storage area in the data pool 51, as is performed in the processing of Sg1, but may perform the selection processing between the processing of Sg3 and the processing of Sg4, and between the processing of Sg3 and the processing of Sg8.
[0150] A physical logical disk created in the storage unit 30 is assigned to BURV52, but it is also possible to create a physical logical disk in the auxiliary storage unit 20 or a non-volatile storage medium provided separately from the storage device 1, and assign the created logical disk to BURV52.
[0151] The storage device 1 may be configured such that N=1, i.e., one physical disk 32-1 is provided, and the RAID unit 31 is not provided. In this case, the storage unit 30 becomes the physical disk 32-1. The RAID unit 31 may also be configured as software rather than hardware.
[0152] In the storage device 1, the application programs constituting the MV management unit 11, writing unit 12, snapshot unit 13, BURV management unit 14, copying unit 15, and reading unit 16 are said to be stored in advance in the ROM provided in the microprocessor 10, but may also be stored in other storage media such as an auxiliary storage unit 20 connected to the microprocessor 10.
[0153] <Hardware configuration> 16 is a diagram illustrating an example of a hardware configuration of the storage device 1 shown in FIG. 1 according to the present disclosure. The storage device 1 according to the present disclosure is, for example, a computer 100 including a CPU 101, a RAM 102, a ROM 103, an auxiliary storage device 104, and an interface module 105. The CPU 101, the RAM 102, the ROM 103, the auxiliary storage device 104, and the interface module 105 are connected to one another via a bus 107. The CPU, RAM, and ROM included in the microprocessor 10 correspond to the CPU 101, the RAM 102, and the ROM 103 of the computer 100, respectively; the storage unit 30, which is configured by the RAID unit 31 and a plurality of physical disks 32-1 to 32-N, and the auxiliary storage unit 20 correspond to the auxiliary storage device 104; and the interface unit 40 corresponds to the interface module 105.
[0154] As described above, when the CPU 101 executes an application program pre-stored in the ROM 103 or the auxiliary storage device 104, the functional units of the MV management unit 11, the writing unit 12, the snapshot unit 13, the BURV management unit 14, the copying unit 15, and the reading unit 16 are configured, and the software portion of the interface unit 40 is configured.
[0155] Second Embodiment An embodiment of the present disclosure will be described below with reference to the drawings. As shown in Fig. 17, a storage device 200 includes a storage unit 201 having a plurality of contiguous storage areas and storing each of the data entities of a first volume in a storage area at an arbitrary position, a replication unit 202 that compares the arrangement order of the data in the first volume with the arrangement order of the data in the storage unit 201 and replicates the data stored in the storage unit 201 in a discontinuous state to a second volume to which a plurality of contiguous storage areas are allocated in the order of the data in the first volume, and a read unit 203 that, upon receiving a read request for the second volume, reads data from the second volume in the requested read range in order from the first storage area, and, if the data to be read is not stored in the second volume, reads the data from the storage unit 201 via the first volume.
[0156] 18, the storage device 200 stores each of the data entities of the first volume in a storage area at an arbitrary position of the storage means 201 having a plurality of storage areas at contiguous positions (S201). The replication means 202 compares the arrangement order of the data in the first volume with the arrangement order of the data in the storage means 201, and replicates the data stored discontinuously in the storage means 201 to a second volume to which a plurality of storage areas at contiguous positions are allocated, in the order of the data arrangement in the first volume (S202). When the read means 203 receives a read request for the second volume, it reads data sequentially from the first storage area of the second volume in the requested read range. If the data to be read is not stored in the second volume, it reads the data from the storage means 201 via the first volume (S203), and ends the process.
[0157] Although the present disclosure has been described above with reference to the embodiments, the present disclosure is not limited to the above-described embodiments. Various modifications that can be understood by those skilled in the art can be made to the configuration and details of the present disclosure within the scope of the present disclosure. Furthermore, each embodiment can be combined with other embodiments as appropriate.
[0158] A part or all of the above-described embodiments can be described as, but not limited to, the following supplementary notes.
[0159] (Supplementary Note 1) A storage device comprising: a storage means (e.g., a storage unit 30, or a data pool 51 generated in the storage unit 30) having a plurality of contiguous storage areas and storing each of the data entities of a first volume (e.g., SV62) in the storage area at an arbitrary position; a duplication means (e.g., duplication unit 15) that compares the arrangement order of the data in the first volume with the arrangement order of the data in the storage means, and duplicates the data stored in the storage means in a discontinuous state to a second volume (e.g., BURV52) to which a plurality of contiguous storage areas are assigned in the arrangement order of the data in the first volume; and a reading means (e.g., reading unit 16) that, upon receiving a read request for the second volume, reads the data in order from the first storage area of the second volume in the requested read range, and, if the data to be read is not stored in the second volume, reads the data from the storage means via the first volume.
[0160] (Supplementary Note 2) The storage device according to (Supplementary Note 1), wherein each of the storage areas of the storage means is assigned location information that identifies its location and is capable of identifying an order from the first storage area of the storage means, and the replication means detects data that is stored in a discontinuous state in the storage means based on whether the arrangement of the location information in a redirect table (e.g., SV redirect table 22) that stores the location information of the storage areas that store the data is an arrangement that indicates consecutive positions in the order of the arrangement of the data in the first volume, and replicates each of the detected data to the second volume in the order of the arrangement of the corresponding location information in the redirect table.
[0161] (Appendix 3) The storage device described in (Appendix 1) or (Appendix 2), wherein when the second volume is assigned as a replication destination of the first volume, the replication means records a flag indicating no replication in all of a replication status table (e.g., replication status table 24) having a plurality of records that are associated one-to-one with each of a plurality of storage areas assigned to the second volume, and each of the records is arranged in the order of the corresponding storage area in the second volume, and when replicating data to the storage area of the second volume, the replication means changes the flag indicating no replication in the record corresponding to the storage area to a flag indicating replication.
[0162] (Note 4) When the reading unit receives a read request for the second volume, it first selects the first record in the range of the replication status table that corresponds to the requested read range, and if the flag indicating that replication exists is recorded in the selected record, it counts, starting from the selected record, how many consecutive records in the replication status table have the flag indicating that replication exists recorded in them, and reads the data from the second volume within the range of the counted number of consecutive storage areas that starts from the storage area of the second volume that corresponds to the starting record, and then it writes the flag indicating that replication does not exist in the selected record. a flag indicating that a record currently being selected has been recorded, the storage device according to (Appendix 3) further comprises: a storage device that counts how many pieces of position information indicating consecutive positions exist in the order of arrangement in the redirect table, starting from the position information indicated at a position that matches the position from the beginning of the record currently being selected in the redirect table; reads the data from the storage means within a range of consecutive storage areas of the counted number, starting from the storage area of the position indicated by the starting position information; and, upon reading the data, selects the record whose rank in the replication status table is obtained by adding 1 to the counted number, and sets it as the currently selected record.
[0163] (Appendix 5) A storage device according to (Appendix 3) or (Appendix 4), comprising a writing means (e.g., a writing unit 12) that, upon receiving a request to rewrite any of the data in the first volume with new data, reserves the free storage area in the storage means for the new data, records the new data in the reserved storage area, rewrites location information indicated in the redirect table of the storage area in the storage means in which the data before rewriting is stored, to location information of the storage area in the storage means in which the new data is stored, and, if a flag indicating that replication exists is recorded in a record in the replication status table that is positioned in a position that matches the position from the beginning of the position in the redirect table where the rewritten location information was performed, rewrites the flag indicating that replication exists to a flag indicating that replication does not exist.
[0164] (Supplementary Note 6) The storage device described in (Supplementary Note 5), wherein the writing means selects any location information from among the location information for which the reference count is 0 in a reference count table (e.g., reference count table 23), which stores, in association with each piece of location information assigned to a storage area of the storage means, a reference count indicating the number of reference sources of data stored in the corresponding storage area, and reserves the storage area of the position indicated by the selected location information as the free storage area, and when recording the new data in the reserved storage area, sets the reference count in the reference count table associated with the location information of the storage area to 1, and decrements by 1 the reference count in the reference count table associated with the location information of the storage area of the storage means in which the data before the rewrite is stored.
[0165] (Appendix 7) A storage device as described in (Appendix 6), comprising a third volume (e.g., MV61) that stores data entities in the storage area at any position of the storage means, and a snapshot means that generates the redirect table by replicating a table (e.g., MV redirect table 21) that stores location information of the storage area that stores the data in the order of the data arrangement in the third volume, and that increments by one the reference count in the reference count table associated with the storage area of the storage means that stores the data entities of the third volume.
[0166] (Appendix 8) A storage device described in any one of (Appendix 1) to (Appendix 7), wherein the storage area of the second volume is allocated in a range different from the range of the storage area in the storage means that stores the entity of the first volume.
[0167] (Appendix 9) A data relocation method including: a storage step of storing each of data entities of a first volume in a storage area at any position of a storage means having a plurality of storage areas at contiguous positions; a replication step of comparing the arrangement order of the data in the first volume with the arrangement order of the data in the storage means, and replicating the data stored in a discontinuous state in the storage means to a second volume to which a plurality of storage areas at contiguous positions are assigned in the arrangement order of the data in the first volume; and a read step of, upon receiving a read request for the second volume, reading the data in order from the first storage area of the second volume in the requested read range, and if the data to be read is not stored in the second volume, reading the data from the storage means via the first volume.
[0168] (Appendix 10) A data rearrangement method according to (Appendix 9), wherein each storage area of the storage means is assigned location information that identifies its location and is capable of identifying an order from the first storage area of the storage means, and the replication step detects data that is stored in a discontinuous state in the storage means based on whether the arrangement of the location information in a redirect table that stores the location information of the storage areas that store the data is an arrangement that indicates consecutive positions in the order of the arrangement of the data in the first volume, and replicates each of the detected data to the second volume in the order of the arrangement of the location information corresponding to each of the data in the redirect table.
[0169] (Appendix 11) The data relocation method according to (Appendix 9) or (Appendix 10), wherein the replication step, when the second volume is allocated as a replication destination of the first volume, records a flag indicating no replication in all of the records of a replication status table having a plurality of records that correspond one-to-one to each of a plurality of storage areas allocated to the second volume, and each of the records is arranged in the order of the corresponding storage area in the second volume, and when replicating data to the storage area of the second volume, changes the flag indicating no replication in the record corresponding to the storage area to a flag indicating replication.
[0170] (Supplementary Note 12) When a read request for the second volume is received, the read step first selects the first record in the range of the replication status table corresponding to the requested read range, and if the flag indicating that replication is present is recorded in the selected record, counts, starting from the selected record, how many consecutive records in the replication status table have the flag indicating that replication is present among the subsequent records, and reads the data from the second volume within the range of the counted number of consecutive storage areas starting from the storage area of the second volume corresponding to the starting record, and sets the flag indicating that replication is not present in the selected record. a flag indicating that a record currently being selected has been recorded in the redirect table, the method counts how many pieces of location information indicating consecutive positions exist in the order of the redirect table, starting from the location information indicated at the order that matches the order from the beginning of the record currently being selected in the redirect table; reads the data from the storage means within a range of consecutive storage areas of the counted number, starting from the storage area of the position indicated by the starting location information; and upon reading the data, selects the record whose order in the replication status table is obtained by adding 1 to the counted number, and sets this record as the currently selected record.
[0171] (Appendix 13) A data relocation method according to (Appendix 11) or (Appendix 12), comprising a writing step of, upon receiving a request to rewrite any of the data in the first volume with new data, allocating an empty storage area in the storage means for the new data, recording the new data in the allocated storage area, rewriting location information indicated in the redirect table of the storage area in the storage means in which the data before rewriting is stored, to location information of the storage area in the storage means in which the new data is stored, and if a flag indicating that replication exists is recorded in a record in the replication status table that is positioned in a position that matches the position from the beginning of the position in the redirect table where the position information was rewritten, rewriting the flag indicating that replication exists to a flag indicating that replication does not exist.
[0172] (Supplementary Note 14) The data rearrangement method according to (Supplementary Note 13), wherein the writing step selects any location information from among the location information for which the reference count is 0 in a reference count table that stores, in association with each piece of location information assigned to a storage area of the storage means, a reference count indicating the number of reference sources of data stored in the corresponding storage area, reserves the storage area of the position indicated by the selected location information as the free storage area, and when recording the new data in the reserved storage area, sets the reference count in the reference count table associated with the location information of the storage area to 1, and decrements by 1 the reference count in the reference count table associated with the location information of the storage area of the storage means in which the data before the rewrite is stored.
[0173] (Appendix 15) A data relocation method as described in (Appendix 14), wherein there is a third volume that stores data entities in the storage area at any position of the storage means, and the method includes a snapshot step of generating the redirect table by duplicating a table that stores location information of the storage area that stores the data in the order of the arrangement of the data in the third volume, and increasing by one the reference count in the reference count table associated with the storage area of the storage means that stores the data entities of the third volume.
[0174] (Appendix 16) A data relocation method according to any one of (Appendix 9) to (Appendix 15), wherein the storage area of the second volume is allocated in a range different from the range of the storage area in the storage means that stores the entity of the first volume.
[0175] (Appendix 17) A program for causing a computer to function as: a storage means having a plurality of contiguous storage areas and storing each of the data entities of a first volume in the storage area at any position; a duplication means which compares the arrangement order of the data in the first volume with the arrangement order of the data in the storage means and duplicates the data stored in the storage means in a discontinuous state to a second volume to which a plurality of contiguous storage areas are assigned in the order of the data arrangement in the first volume; and a reading means which, upon receiving a read request for the second volume, reads the data in the requested read range from the first storage area of the second volume in order, and, if the data to be read is not stored in the second volume, reads the data from the storage means via the first volume.
[0176] (Appendix 18) The program described in (Appendix 17), wherein each storage area of the storage means is assigned location information that identifies its location and is capable of identifying an order from the first storage area of the storage means, and the replication means detects data stored in the storage means in a discontinuous state based on whether the arrangement of the location information in a redirect table that stores the location information of the storage areas that store the data is an arrangement that indicates consecutive positions in the order of the arrangement of the data in the first volume, and replicates each of the detected data to the second volume in the order of the arrangement of the corresponding location information in the redirect table.
[0177] (Appendix 19) The program described in (Appendix 17) or (Appendix 18), wherein, when the second volume is assigned as a replication destination for the first volume, the replication means records a flag indicating no replication in all of the records of a replication status table, the record having a one-to-one correspondence with each of a plurality of storage areas assigned to the second volume, and each of the records being arranged in the order of the corresponding storage area in the second volume, and when replicating data to the storage area of the second volume, changes the flag indicating no replication in the record corresponding to the storage area to a flag indicating replication.
[0178] (Supplementary Note 20) When the reading means receives a read request for the second volume, it first selects the first record in the range of the replication status table corresponding to the requested read range, and if the flag indicating the presence of replication is recorded in the selected record, it counts, starting from the selected record, how many consecutive records in the replication status table have the flag indicating the presence of replication recorded therein, and reads the data from the second volume within the range of the counted number of consecutive storage areas starting from the storage area of the second volume corresponding to the starting record, and then it writes the flag indicating the absence of replication to the selected record. a flag indicating that a record currently being selected has been recorded, the program counts how many pieces of location information indicating consecutive positions exist in the order of arrangement in the redirect table, starting from the location information indicated at a position that matches the position from the beginning of the record currently being selected in the redirect table, reads the data from the storage means within a range of consecutive storage areas of the counted number, starting from the storage area of the position indicated by the starting location information, and upon reading the data, selects the record whose rank in the replication status table is obtained by adding 1 to the counted number, and sets this as the currently selected record.
[0179] (Appendix 21) A program as described in (Appendix 19) or (Appendix 20) for functioning as a writing means that, upon receiving a request to rewrite any of the data in the first volume with new data, reserves an empty storage area in the storage means for the new data, records the new data in the reserved storage area, rewrites location information shown in the redirect table of the storage area in the storage means in which the data before rewriting is stored to location information of the storage area in the storage means in which the new data is stored, and, if a flag indicating that replication exists is recorded in a record in the replication status table that is located at a position that matches the position from the beginning of the position in the redirect table where the position information was rewritten, rewrites the flag indicating that replication exists to a flag indicating that replication does not exist.
[0180] (Supplementary Note 22) The program described in (Supplementary Note 21), wherein the writing means selects any location information from among the location information for which the reference count is 0 in a reference count table that stores, in association with each piece of location information assigned to a storage area of the storage means, a reference count indicating the number of reference sources for data stored in the corresponding storage area, reserves the storage area of the position indicated by the selected location information as the free storage area, and when recording the new data in the reserved storage area, sets the reference count in the reference count table associated with the location information of the storage area to 1, and decrements by 1 the reference count in the reference count table associated with the location information of the storage area of the storage means in which the data before the rewrite is stored.
[0181] (Appendix 23) A program as described in (Appendix 22) for functioning as a snapshot means for increasing by one the reference count in the reference count table associated with the storage area of the storage means that stores the data entity, wherein there is a third volume that stores the data entity in the storage area at any position of the storage means, and the redirect table is generated by duplicating a table that stores the location information of the storage area that stores the data in the order of the arrangement of the data in the third volume.
[0182] (Appendix 24) A program described in any one of (Appendix 17) to (Appendix 23), wherein the storage area of the second volume is allocated in a range different from the range of the storage area in the storage means that stores the entity of the first volume. [Explanation of symbols]
[0183] 1 Storage device 2. Host Computer 10 Microprocessors 11 MV Management Department 12 Writing section 13 Snapshot section 14 BURV Management Department 15 Reproduction Department 16 Reading part 20 Auxiliary storage 21 MV Redirection Table 22 SV Redirection Table 23 Reference Count Table 24 Replication Status Table 25 LD Management Table 30 Storage section 31 RAID section 32-1~32-N Physical Disks 40 Interface section 51 Data Pool 52 BURV 61 MV 62 SV
Claims
1. a storage means having a plurality of storage areas at consecutive positions, and storing each of the data entities of the first volume in the storage areas at any position; a replicating means for comparing the arrangement order of the data in the first volume with the arrangement order of the data in the storage means, and replicating the data stored in the storage means in a discontinuous state to a second volume to which a plurality of storage areas having consecutive positions are allocated in the order of the arrangement of the data in the first volume; a reading means for reading the data in the requested read range from the first storage area of the second volume in sequence upon receiving a read request for the second volume, and for reading the data from the storage means via the first volume if the data to be read is not stored in the second volume; Each of the storage areas of the storage means is assigned with location information that identifies the location of each storage area and that can identify the order from the top storage area of the storage means, The copying means comprises: detects data stored in the storage means in a discontinuous state based on whether or not the arrangement of the position information in a redirect table that stores the position information of storage areas that store the data is an arrangement that indicates consecutive positions in the order in which the data is arranged in the first volume, and replicates each of the detected data to the second volume in the order in which the corresponding position information is arranged in the redirect table; storage device.
2. The copying means comprises: When the second volume is allocated as a replication destination of the first volume, a flag indicating no replication is recorded in all of a replication status table having a plurality of records each corresponding to a plurality of storage areas allocated to the second volume on a one-to-one basis, the records being arranged in the order in which the corresponding storage areas are arranged in the second volume, and when replicating data to the storage area of the second volume, the flag indicating no replication in the record corresponding to the storage area is changed to a flag indicating replication. The storage device according to claim 1 .
3. The reading means When a read request for the second volume is received, the first record in the range of the replication status table corresponding to the requested read range is first selected, and if the flag indicating the presence of replication is recorded in the selected record, the number of consecutive records in which the flag indicating the presence of replication is recorded is counted in the order of arrangement in the replication status table, starting from the selected record, and the data is read from the second volume within the range of the counted number of consecutive storage areas that starts from the storage area of the second volume corresponding to the starting record, and the replication is recorded in the selected record. If a flag indicating absence is recorded, count how many pieces of position information indicating consecutive positions exist in the order of arrangement in the redirect table, starting from the position information indicated at the order that matches the order from the beginning of the selected record in the redirect table, read the data from the storage means within a range of consecutive storage areas of the counted number that starts from the storage area of the position indicated by the starting position information, and when the data is read, select the record whose order is obtained by adding 1 to the number counted for the order of the selected record in the replication status table, and set this as the selected record. The storage device according to claim 2 .
4. a writing means for, when receiving a request to rewrite any of the data in the first volume with new data, allocating an empty storage area in the storage means for the new data, recording the new data in the allocated storage area, rewriting location information indicated in the redirect table as location information of the storage area of the storage means in which the data before rewriting is stored, to location information of the storage area of the storage means in which the new data is stored, and rewriting, when a flag indicating the presence of replication is recorded in a record of the replication status table which is positioned in an order that matches the order from the beginning of the position in the redirect table where the rewritten location information was performed, the flag indicating the presence of replication to a flag indicating the absence of replication 4. The storage device according to claim 2, further comprising:
5. The writing means a reference count table that stores a reference count indicating the number of reference sources of data stored in the corresponding storage area, in association with each piece of location information assigned to the storage area of the storage means, and selects any piece of location information from among the pieces of location information for which the reference count is 0, and reserves the storage area of the position indicated by the selected location information as the free storage area, and when recording the new data in the reserved storage area, sets the reference count in the reference count table associated with the location information of the storage area to 1, and decrements by 1 the reference count in the reference count table associated with the location information of the storage area of the storage means in which the data before the rewrite is stored; The storage device according to claim 4 .
6. a third volume exists in the storage area at an arbitrary position of the storage means, and the third volume stores the entity of the data; a snapshot means for generating the redirect table by duplicating a table that stores location information of storage areas that store the data in the order of arrangement of the data in the third volume, and for incrementing by one the number of references in the number of references table that is associated with the storage area of the storage means that stores the entity of the data of the third volume; The storage device according to claim 5 , comprising:
7. the storage area of the second volume is allocated in a range different from the range of the storage area in the storage means for storing the entity of the first volume; The storage device according to claim 1 .
8. a storage step of storing each of the data entities of the first volume in a storage area at any position of a storage means having a plurality of storage areas at consecutive positions; a replication step of comparing the arrangement order of the data in the first volume with the arrangement order of the data in the storage means, and replicating the data stored in the storage means in a discontinuous state to a second volume to which a plurality of storage areas having consecutive positions are allocated in the arrangement order of the data in the first volume; a reading step of, upon receiving a read request for the second volume, reading the data in the requested read range in order from the first storage area of the second volume, and if the data to be read is not stored in the second volume, reading the data from the storage means via the first volume; Each of the storage areas of the storage means is assigned with location information that identifies the location of each storage area and that can identify the order from the top storage area of the storage means, In the replication step, detects data stored in the storage means in a discontinuous state based on whether or not the arrangement of the position information in a redirect table that stores the position information of storage areas that store the data is an arrangement that indicates consecutive positions in the order in which the data is arranged in the first volume, and replicates each of the detected data to the second volume in the order in which the corresponding position information is arranged in the redirect table; How data is rearranged.
9. Computer, a storage means having a plurality of storage areas located consecutively, for storing each of the data entities of the first volume in the storage areas at any position; a replication means for comparing the arrangement order of the data in the first volume with the arrangement order of the data in the storage means, and replicating the data stored in the storage means in a discontinuous state to a second volume to which a plurality of storage areas having consecutive positions are allocated, in the order in which the data is arranged in the first volume; when receiving a read request for the second volume, the data is read in order from the first storage area of the second volume in the requested read range, and if the data to be read is not stored in the second volume, the data is read from the storage means via the first volume; Each of the storage areas of the storage means is assigned with location information that identifies the location of each storage area and that can identify the order from the top storage area of the storage means, The copying means comprises: detects data stored in the storage means in a discontinuous state based on whether or not the arrangement of the position information in a redirect table that stores the position information of storage areas that store the data is an arrangement that indicates consecutive positions in the order in which the data is arranged in the first volume, and replicates each of the detected data to the second volume in the order in which the corresponding position information is arranged in the redirect table; program.
Citation Information
Patent Citations
Replicated data storage system, method and program of storage device
JP2005208950A
Backup acquisition method and disk array device
JP2005332067A
Storage system, copy control method and copy control unit
JP2010009290A
Storage system and storage control method
JP2024079042A