Patent Document

TECHNICAL FIELD 
     The present invention relates to a storage apparatus and its control method and is suited for use in, for example, a storage apparatus equipped with a snapshot function and a method for controlling such a storage apparatus. 
     BACKGROUND ART 
     Conventionally, a technology called “snapshots” is known as a method for extracting image data from a logical volume in operation at a certain point in time (hereinafter referred to as the “operation volume”). By means of this snapshot technology for example, when receiving a write request from a host system, the storage apparatus updates data in accordance with this write request after saving only pre-update data from the operation volume to another logical volume (hereinafter referred to as the “snapshot volume”). Subsequently, the storage apparatus updates the data in the operation volume based on the write request. 
     Therefore, the snapshot technology can achieve access to data at a plurality of certain points in time and further achieve such access by using small capacity. 
     Now, Patent Literature 1 discloses a storage apparatus and its control method for performing control so that if an access request is made to a snapshot volume to which data is saved by a snapshot, data which is not saved is obtained from a duplicate of the operation volume (hereinafter also referred to as the “duplicated volume”). Subsequently, Patent Literature 1 indicates that the acquisition of data from the operation volume as much data as obtained from the duplicated volume can be inhibited and the access load on the operation volume can be reduced. 
     CITATION LIST 
     Patent Literature 
     PTL 1: Japanese Patent Application Laid-Open (Kokai) Publication No. 2007-199920 
     SUMMARY OF INVENTION 
     Technical Problem 
     However, the page size of a page to be allocated to the duplicated volume is not considered at all for the storage apparatus and the control method disclosed in Patent Literature 1. 
     If the page size of a page to be allocated to the duplicated volume is not appropriate, inconvenience occurs in such cases where, for example, a sequential read access request is made to a snapshot volume and data is obtained from the duplicated volume. Specifically speaking, if data stored in a target page of sequential reading is scattered in a plurality of storage devices which are associated with the duplicated volume, it becomes necessary to make each of the plurality of storage devices operate appropriately and perform data reading by sequential reading. Therefore, the efficiency of the operation of the storage devices decreases and, as a result, a problem of degradation of the sequential performance is caused. 
     Therefore, the present invention was devised in consideration of the above-mentioned problem and aims at suggesting a storage apparatus and its control method capable of improving a read speed for snapshot volumes by setting a page size of pages to be allocated to the duplicated volume to an appropriate size and then allocating such pages. 
     Solution to Problem 
     In order to solve such problem, a storage apparatus according to the present invention includes a controller connected to a host system and a storage device connected to the controller, wherein the storage device provides pages, which are actual storage areas, to a logical volume created in the controller, a duplicated volume which is created in the controller and is a duplicate of the logical volume, and a snapshot volume created in the controller for storing data to be saved by a snapshot; wherein the controller provides the logical volume, the duplicated volume, and the snapshot volume to the host system; and wherein when allocating the pages provided by the storage device to the duplicated volume, the controller allocates the pages in a stripe unit of a data size that can be read by one read command, to the storage device. 
     Furthermore, the present invention provides a method for controlling a storage apparatus including a controller connected to a host system and a storage device connected to the controller, wherein the storage apparatus control method includes: a first step executed by the storage device providing pages, which are actual storage areas, to a logical volume created in the controller, a duplicated volume which is created in the controller and is a duplicate of the logical volume, and a snapshot volume created in the controller for storing data to be saved by a snapshot; a second step executed by the controller providing the logical volume, the duplicated volume, and the snapshot volume to the host system; and a third step executed, when allocating the pages provided by the storage device to the duplicated volume, by the controller allocating the pages in a stripe unit of a data size that can be read by one read command, to the storage device. 
     Advantageous Effects of Invention 
     According to the present invention, the read speed for the snapshot volume can be improved by setting the page size of pages to be allocated to the duplicated volume to an appropriate size and allocating such pages. 
    
    
     
       BRIEF DESCRIPTION OF DRAWINGS 
         FIG. 1  is a conceptual diagram showing a hardware configuration of a storage system. 
         FIG. 2  is a conceptual diagram showing a logical configuration of the storage system. 
         FIG. 3  is a conceptual diagram showing a data flow of new data writing to an operation volume. 
         FIG. 4  is a conceptual diagram showing a data flow of update data writing to the operation volume. 
         FIG. 5  is a conceptual diagram showing a data flow of data reading to a snapshot. 
         FIG. 6  is a conceptual diagram showing a data flow of data writing to a snapshot. 
         FIG. 7  is a conceptual diagram showing the overview and setting items of association performed from an external terminal. 
         FIG. 8  is a conceptual diagram showing mapping between an address space and a data space. 
         FIG. 9  is a conceptual diagram showing background copying to a duplicated volume. 
         FIG. 10  is a conceptual diagram showing page allocation processing at the time of sequential data reading. 
         FIG. 11  is a conceptual diagram showing page allocation processing at the time of sequential data reading. 
         FIG. 12  is a configuration diagram showing a page size specification screen. 
         FIG. 13  is a conceptual diagram showing an access management table. 
         FIG. 14  is a configuration diagram showing a setting screen of page release target time. 
         FIG. 15  is a conceptual diagram for explaining page release processing. 
         FIG. 16  is a conceptual diagram showing a free queue management table. 
         FIG. 17  is a conceptual diagram showing a data area vacancy management table. 
         FIG. 18  is a flowchart showing write processing on the operation volume. 
         FIG. 19  is a flowchart showing write processing on the duplicated volume. 
         FIG. 20  is a flowchart showing read processing on a snapshot. 
         FIG. 21  is a flowchart showing write processing on a snapshot. 
         FIG. 22  is a flowchart showing duplicated volume association processing. 
         FIG. 23A  is a flowchart showing pool volume addition processing. 
         FIG. 23B  is a flowchart showing the pool volume addition processing. 
         FIG. 24  is a flowchart showing page allocation processing. 
         FIG. 25  is a flowchart showing background copy processing. 
         FIG. 26  is a flowchart showing background copy processing. 
         FIG. 27  is a flowchart showing sequential read processing. 
         FIG. 28  is a flowchart showing sequential read processing. 
         FIG. 29  is a flowchart showing a processing procedure of access frequency management. 
         FIG. 30  is a flowchart showing a processing procedure of monitor processing executed by the controller  10  for the storage apparatus  4  by starting a monitor job. 
         FIG. 31  is a flowchart showing page release processing. 
         FIG. 32  is a flowchart showing secured page size specification processing from the external terminal. 
     
    
    
     DESCRIPTION OF EMBODIMENTS 
     An embodiment of the present invention will be explained below in detail with reference to the attached drawings. 
     (1) Hardware Configuration of Storage System  1   
       FIG. 1  shows a hardware configuration of a storage system  1 . This storage system  1  includes a plurality of host systems  2 , a network  3 , and a storage apparatus  4 . Subsequently, the plurality of host systems  2  and the storage apparatus  4  are connected via the network  3 . 
     The host system  2  are computer apparatuses equipped with information processing resources such as CPUs (Central Processing Units) and memories, information input resources such as keyboards and pointing devices, and information output resources such as monitor displays and speakers; and are, for example, personal computers, work stations, or mainframe computers. It should be noted that the host system  2  assumes a role as a higher-level device. 
     The network  3  is composed of, for example, a SAN (Storage Area Network), a LAN (Local Area Network), the Internet, a public line, or a private line. For example, if this network  3  is a SAN, communication between the host systems  2  and the storage apparatus  4  is performed in accordance with a Fibre Channel protocol. Meanwhile, if the network  3  is a LAN, communication between the host systems  2  and the storage apparatus  4  is performed in accordance with a TCP/IP protocol (Transmission Control Protocol/Internet Protocol). 
     The storage apparatus  4  includes a controller  10  and a storage device  20  and controls data input/output processing and storage processing. 
     The controller  10  includes a plurality of channel adapters  11 , a connection unit  12 , a shared memory  13 , a cache memory  14 , a plurality of disk adapters  15 , a management terminal  16 , and an external terminal  17 . 
     The channel adapter  11  includes, for example, a microprocessor, a memory, and a communication interface and is configured as a microcomputer system. Furthermore, the channel adapter  11  is equipped with ports for connection to, for example, the network  3  and other storage systems, interprets various types of commands transmitted from the host system  2  via the network  3 , and executes corresponding processing. The port of each channel adapter  11  is assigned a network address (e.g. an IP address or a WWN) for identifying that port, by which each channel adapter  11  can operate individually as a NAS (Network Attached Storage). 
     The connection unit  12  is connected to the channel adapter s 11 , the shared memory  13 , the cache memory  14 , and the disk adapters  15 . The channel adapters  11 , the shared memory  13 , the cache memory  14 , and the disk adapters  15  send/receive data and commands between them via this connection unit  12 . The connection unit  12  is composed of, for example, a switch or a bus, such as a very high-speed cross bus switch for transmitting data by means of high-speed switching. 
     The shared memory  13  and the cache memory  14  are storage memories shared by the channel adapters  11  and the disk adapters  15 . The shared memory  13  is mainly used to store system configuration information related to the entire storage apparatus  4 , various types of programs, various types of tables, and commands such as write requests and read requests. Furthermore, the cache memory  14  is mainly used to temporarily store write target data and read target data to be input to and/or output from the storage apparatus  4 . 
     The disk adapter  15  includes, for example, a microprocessor and a memory and is configured as a microcomputer system. Furthermore, the disk adapter  15  functions as an interface performing protocol control when communicating with the disk devices  21  in the storage device  20 . The disk adapter  15  is connected to a corresponding disk device  21  in the storage device  20 , for example, via a Fibre Channel cable and sends/receives data to/from the disk devices  21  in accordance with the Fibre Channel protocol. 
     The management terminal  16  is a terminal device for controlling the operation of the entire storage apparatus  4  and is composed of, for example, a notebook personal computer. The management terminal  16  is connected to the respective channel adapters  11  via the LAN  17  respectively, and is connected to the respective disk adapters  15 A via the LAN  18  respectively. The management terminal  16  can define the system configuration information as operated by an operator and can also store this defined system configuration information in the shared memory  13  via the channel adapters  11  or the disk adapters  15 , and the connection unit  12 . 
     The external terminal  17  is connected to the storage apparatus  4  via, for example, a LAN. The external terminal  17  is a terminal device for controlling the operation of the entire storage apparatus  4  and is composed of, for example, a notebook personal computer. Furthermore, the external terminal  17  can view and set the system configuration information in the same manner as the management terminal  16 . 
     The storage device  20  is composed of a plurality of disk devices  21 . For example, expensive disks such as SCSI (Small Computer System Interface) disks or inexpensive disks such as SATA (Serial AT Attachment) disks and optical disks can be used as the plurality of disk devices  21 . 
     (2) Logical Configuration of Storage System  1   
       FIG. 2  shows a logical configuration of the storage system. The storage system  1  includes an operation volume  30 , a duplicated volume  40 , a snapshot volume  50 , and a snapshot pool  60  in the controller  10 . 
     The operation volume  30  is a logical volume which stores data transmitted from the host system  2  in response to write requests from the host system  2 . 
     It should be noted that a logical volume is assigned a unique identifier (an LUN: Logical Unit Number). Furthermore, the inside of the logical volume is composed of logical blocks partitioned by a specified size of blocks. Also, each logical block is assigned a unique number (an LBA: Logical Block Address). The host system  2  can make a read request or write request to a desired logical volume by using a combination of these LUN and LBA as an address. 
     The attributes of logical volumes include a virtual volume which accepts an access request from the host system  2 , and a real volume associated with this virtual volume. A storage area of the real volume is associated with an actual storage area of the disk devices  21 . The real volume is composed of a plurality of pool areas, and each of the pool areas is composed of a plurality of pool volumes. For example, the  FIG. 3  explained later shows that four pool volumes PVOLs (disk devices  21 ) constitute one pool area ECC 1 . The operation volume  30 , which accepts access requests from the host system  2 , is a virtual volume among the logical volumes. 
     Furthermore, storage areas in volumes which are virtual volumes and real volumes are partitioned into storage areas called “slots.” Furthermore, the virtual volumes and the real volumes are associated with each other in slot units. A slot is a minimum storage area for storing data and corresponds to the aforementioned logical block. 
     The duplicated volume  40  is a logical volume, which is a duplicate of the operation volume  30 , and is a virtual volume. Furthermore, the duplicated volume  40  is associated with the operation volume  30  in slot units. 
     The snapshot volume  50  is a logical volume which stores only pre-update data when data in the operation volume  30  is updated; and the snapshot volume  50  is a virtual volume. Furthermore, the snapshot volume  50  is associated with the operation volume  30  and the duplicated volume  40  in slot units. 
     It should be noted that the technology of saving only the pre-update data to the snapshot volume  50  before updating the data when the data is updated in the operation volume  30  as explained above is called a snapshot technology. 
     The capacity efficiency can be enhanced by saving data by this snapshot technology. Specifically, for example, when the operation volume  30  is updated at a plurality of points in time, a snapshot volume  50  is created at each of such points in time, and the pre-update data is saved to each of the snapshot volumes  50 , the capacity efficiency can be improved. 
     The snapshot pool  60  is a logical volume, which stores data stored in one or more snapshot volumes  50 , and is a real volume. The pair setting of the snapshot pool  60  is set to one or more snapshot volumes  50  and the snapshot pool  60  is associated with actual storage areas provided by the plurality of disk devices  21 . 
     (3) Data Flow Between Respective Logical Volumes 
       FIG. 3  is a conceptual diagram showing a data flow between the respective logical volumes when a new write request is made to the operation volume  30 . 
       FIG. 3  shows that data “a” is stored in a storage area of the operation volume  30  in accordance with the new write request from the host system  2 . Furthermore,  FIG. 3  shows that the data “a” is also stored at the same position in the duplicated volume  40  which is a duplicate of the operation volume  30 . 
     When the data “a” is stored in the duplicated volume  40 , a storage area called a “page” is allocated from one pool volume PVOL (disk device  21 ) in one pool area ECC 1  to the duplicated volume  40 . 
     A “page” is a data read/write unit for logical volumes. 
     In this embodiment, the page size of a “page” which is then allocated is not set by the “slot” size which is the minimum size as the data read/write unit for logical volumes, but is set by a size called a “stripe.” 
     A “stripe” represents a data read/write unit for the disk devices  21 . 
     Specifically speaking, in this embodiment, the page size which is allocated to the duplicated volume  40  is supposed to be the stripe size which is the data read/write unit for the disk devices  21 . It should be noted that the relationship between the stripe size and the slot size is that one stripe is equal to two slots. Therefore, in this embodiment, the page size allocated to the duplicated volume  40  is larger than the page size of the conventional slot size. 
     Data can be read by a small number of read commands and the operation efficiency of the disk devices  21  can be improved as explained above by using the stripe size, which is a data size read by one read command, instead of the slot size, as the page size to be allocated to the duplicated volume  40 . Furthermore, for example, if the access request from the host system  2  is for sequential data reading by which sequential data is handled, sequential performance can be improved. Specifically speaking, if sequential data reading is performed, sequentially allocated slots are read in the operation volume  30  or the snapshot volume  50 . Therefore, with the duplicated volume  40 , sequential slots can be secured with more certainty and the number of read commands can be reduced by allocation in stripe units, by which it is highly possible that all the slots might be sequentially allocated, rather than by allocation in slot units by which all the slots might be allocated in a scattered manner. As a result, the sequential performance can be improved. 
     It should be noted that reference is made to a table called a “mapping table”  131  with respect to association between the position of a storage area (address space) in the duplicated volume  40  and the position of a storage area (data space) in the disk devices  21 . This mapping table  131  is one of various types of tables stored in the shared memory  13  and its details will be explained later. 
       FIG. 4  is a conceptual diagram showing a data flow between the respective logical volumes when an update write request is made to the operation volume  30 . 
       FIG. 4  shows that data “a” is stored in a storage area of the operation volume  30  before an update write request is made. Furthermore,  FIG. 4  shows that the data “a” is also stored at the same position in the duplicated volume  40  which is a duplicate of the operation volume  30 . Furthermore,  FIG. 4  shows that the update write request to write data “b” to a storage area at the same position as the storage area, where the data “a” is stored, is made to the operation volume  30  from the host system  2 . 
     In this case, according to this embodiment, the data “a” which is data before update writing is saved from the duplicated volume  40  to the snapshot pool  60  as triggered by the update write request to the operation volume  30 . Therefore, the data “a” which is the data before the update write request will be stored in the snapshot pool  60 . Subsequently, the data “b” is supposed to be stored in the operation volume  30  and in the duplicated volume  40  in accordance with the update write request from the host system  2  and the data will be updated. 
       FIG. 5  is a conceptual diagram showing a data flow between the respective logical volumes when a read request is made to the snapshot volume  50 . 
       FIG. 5  shows that the data “a” and “b” are stored in the storage area of the operation volume  30  before a read request is made. Furthermore,  FIG. 5  shows that the data “a” is also stored at the same position in the duplicated volume  40  which is a duplicate of the operation volume  30 . Furthermore,  FIG. 5  shows that the read request is made from the host system  2  to the snapshot volume  50  to read these pieces of data “a” and “b.” 
     In this case, according to this embodiment, whether or not the data “a” and “b” which are targets of the read request are stored in the duplicated volume  40  which is the duplicate of the operation volume  30  or not is firstly checked. Reference is made to the mapping table  131  in order to perform the check. Incidentally, the mapping table  131  will be explained later. 
     It is found as a result of the check that the data “a” is stored in the duplicated volume  40  in this example, so that the data “a” will be read from the duplicated volume  40 . Meanwhile, since the data “b” is not stored in the duplicated volume  40 , it will be read from the operation volume  30 . 
       FIG. 6  is a conceptual diagram showing a data flow between the respective logical volumes when an update write request is made to the snapshot volume  50 . 
       FIG. 6  shows that the data “a” and “b” are stored in the storage area of the operation volume  30  before an update write request is made. Furthermore,  FIG. 6  shows that the data “a” is also stored at the same position in the duplicated volume  40  which is a duplicate of the operation volume  30 . Furthermore,  FIG. 6  shows that an update write request is made from the host system  2  to the snapshot volume  50  to write data “c” to the storage area at the same position as the storage area where the data “a” and “b” are stored. 
     In this case, according to this embodiment, whether or not the data before the update writing is stored or not in the storage area at the same position as the position to which the data “c”, that is, the target of the update write request, is written is firstly checked. Reference is made to the mapping table  131  in order to perform the check. Incidentally, this mapping table  131  will be explained later. 
     It is found as a result of the check that the data “a” which is the data before the update write is stored in the duplicated volume  40 , so that the data “a” will be saved from the duplicated volume  40  to the snapshot pool  60 . Furthermore, since the data “b” which is the data before the update writing is not stored in the duplicated volume  40 , it will be saved from the operation volume  30  to the snapshot pool  60 . 
     (4) Association between Respective Logical Volumes 
       FIG. 7  shows a setting screen  171  on the external terminal  17  and items of a volume management table  131 A, which will be set on this setting screen  171 . 
     The volume management table  131 A for managing the respective logical volumes of the operation volume  30 , the snapshot volume  50 , and the duplicated volume  40  is displayed on the setting screen  171  of the external terminal  17 . A user can set the setting of the volume management table  131 A and associate the logical volumes with each other in the volume management table  131 A by operating the external terminal  17 . 
     With the volume management table  131 A, only an “LUN of Duplicated Volume” can be set with respect to an area where the operation volume  30  and the snapshot volume  50  are managed. Furthermore, with the volume management table  131 A, items other than the “LUN of Duplicated Volume,” that is, an “Address of Volume Area Management table,” an “Address of Copy Bitmap,” an “Address of Sequential Read Counter,” and an “Address of Access Management Table,” can be set with respect to an area where the duplicated volume  40  is managed. 
     (5) Configuration of Mapping Table 
       FIG. 8  is a conceptual diagram showing a flow of mapping between an address space and a data space and shows the mapping table  131 . 
     Reference is made to the mapping table  131  when associating the position of a storage area (address space) in the duplicated volume  40  with the position of a storage area (data space) in the disk devices  21 . 
     Furthermore, the mapping table  131  is constituted from a volume management table  131 A, a volume area management table  131 B, and a data area management table  131 C. 
     The volume management table  131 A is used to manage each logical volume provided by the storage apparatus  4 . Incidentally,  FIG. 8  shows that the volume management table  131 A in this example manages three logical volumes, that is, the operation volume  30 , the duplicated volume  40 , and the snapshot volume  50 ; however, the configuration of this table is not limited to this example, and the volume management table  131 A may be configured so that it can manage a plurality of logical volumes, but only within the range of 64 kilobytes. 
     Furthermore, the address of the volume area management table  131 B, the address of the copy bitmap, the address of the sequential read counter, the address of the access management table, and the identifier (LUN) of the duplicated volume are stored in the volume management table  131 A as information for managing the respective logical volumes. 
     Furthermore, the volume area management table  131 B from among those listed above is used to manage storage areas in the duplicated volume  40  in slot units and is actually used to manage the addresses of the data area management table  131 C in slot units. Therefore, the address of the data area management table  131 C is stored in the volume area management table  131 B in slot units. 
     Furthermore, the data area management table  131 C is used to manage the storage areas in the duplicated volume  40  in stripe units, and is actually used to manage the position of a storage area of two slots in the disk devices  21 . Therefore, information of a one-stripe data space is stored in the data area management table  131 C. 
     Furthermore, a “42-MB boundary flag” is stored in the data area management table  131 C. This 42-MB boundary flag is used to store data in a scattered manner in the storage device  20 ; and, in fact, if 42-MB data is stored in the first pool area ECC 1 , another 42-MB data will then be stored in the second pool area ECC 2  which is different from the first pool area ECC 1 . As explained above, the operation efficiency of the storage device  20  can be improved by storing data in units of 42 MB in a scattered manner in the storage device  20 . 
     (6) Data Copy from Operation Volume  30  to Duplicated Volume  40   
       FIG. 9  shows the overview of background data copying to the duplicated volume  40  when a write request is made to the operation volume  30 . 
     The copy bitmap  132  is used to determine whether data copying from the operation volume  30  to the duplicated volume  40  is necessary or not; and if data copying to the duplicated volume  40  is necessary, the copy bitmap  132  is also used to determine copying of data stored in which slot is necessary from among data in the operation volume  30 . 
     Furthermore, the copy bitmap  132  constituted from a first copy necessity flag field  132 A and a second copy necessity flag field  132 B. 
     The first copy necessity flag field  132 A stores a copy necessity flag indicating whether data copying from the operation volume  30  to the duplicated volume  40  is necessary or not. If copying is necessary, a copy necessity flag “1” is set (ON); and if copying is not necessary, a copy necessity flag “0” is set (OFF). Furthermore, the copy necessity flag “1” is set as triggered by a write request made to the operation volume  30 . 
     Furthermore, the second copy necessity flag field  132 B stores a copy necessity flag indicating whether data copying from the operation volume  30  to the duplicated volume  40  in slot units in the duplicated volume  40  is necessary or not. Furthermore, either of the copy necessity flags “1” and “0” is set at the time of page allocation to the duplicated volume  40 . 
     Therefore, as “1” is set to the first copy necessity flag field  132 A in the case of  FIG. 9 , it shows that data copying from the operation volume  30  to the duplicated volume  40  is necessary. Furthermore, “0,” “0,” “1,” “1” and so on and then “1,” “0,” “0” are set to the second copy necessity flag field  132 B, it shows that copying is not necessary for the first two slots in the operation volume  30 , copying is necessary for the following five slots, and copying is not necessary for the following two slots. 
     This copy bitmap  132  is regularly monitored by a “copy monitor job” which is one of the programs stored in the shared memory  13 , and the “copy job” which is one of the programs stored in the shared memory  13  is started by the copy monitor job if the flag “1” is set to the first copy necessity flag field  132 A. 
     Subsequently, the started copy job refers to the second copy necessity flag field  132 B of the copy bitmap  132 , judges the necessity of copying in slot units, and then copies data corresponding to the slots of the copy necessity flag “1” in the second copy necessity flag field  132 B from the operation volume  30  to the duplicated volume  40 . 
     (7) Sequential Reading for Snapshot Volume  50   
       FIG. 10  shows the overview of the setting for a sequential read counter  133  when sequential data reading is performed for the snapshot volume  50 . It should be noted that a read request from the host system  2  includes a sequential read attribute indicating whether the request is for sequential data reading or not; and the controller  10  can judge whether the request is for sequential data reading or not based on the presence/absence of this sequential read attribute included in the read request from the host system  2 . 
     The sequential read counter  133  is used to determine in what range of slots data copying from the operation volume  30  to the duplicated volume  40  should be performed. Specifically speaking, the sequential read counter  133  is used to determine in what range of slots the flags of the above-mentioned copy bitmap  132  should be set to “1.” 
     Furthermore, the sequential read counter  133  is constituted from a read counter field in slot units, and the number of times of sequential data reading performed until now is stored in this read counter field. 
     Therefore, as “0,” “0,” “1,” “1” and so on are set to the read counter field in the case of  FIG. 10 , it shows that no sequential read request has been made for the first two slots in the snapshot volume  50  until now and only one sequential read request has been made for the following two slots. 
       FIG. 11  shows the overview of data copying to the duplicated volume  40  when a write request is made to the operation volume  30 . It should be noted that the overview of data copying shown in this example is different from the overview of data copying shown in  FIG. 9  because the data copying in this example is based on the frequency of sequential data reading. 
     It should be noted that the overview of data copy shown in this example is the same as the overview of data copy explained with reference to  FIG. 9  in that the copy monitor job regularly monitors the copy bitmap  132  and starts the copy job if the flag “1” is set to the first copy necessity flag field  132 A and that the started copy job refers to the copy bitmap  132 , judges the necessity of copying in slot units, and copies data corresponding to the slots, to which the copy necessity flag “1” is set, from the operation volume  30  to the duplicated volume  40 . 
     The copy job in this example further refers to the corresponding slots in the sequential read counter  133  and also copies data in a sequential slot range, for which sequential data reading was performed around the slots to which the copy necessity flag “1” is set, from the operation volume  30  to the duplicated volume  40 . Specifically speaking, in this example, as reference is made to the sequential read counter  133 , the page range to be allocated to the duplicated volume  40  is automatically determined and the data in the determined page range is stored in the duplicated volume  40 . 
       FIG. 12  shows a setting screen  171  of the external terminal  17  and an allocated page range which is set on this setting screen  171 . 
     The setting screen  171  of the external terminal  17  displays the setting screen for setting which range of pages should be allocated to the duplicated volume  40  in data copying to the duplicated volume  40  when a write request is made to the operation volume  30 . The user can set the page range to be allocated to the duplicated volume  40  in advance by operating the external terminal  17 . It should be noted that the page range which is set by the user on this screen may be prioritized and applied over the automatically determined page range which was explained with reference to  FIG. 11 . 
     (8) Page Release Operation Based on Access Frequency 
       FIG. 13  shows the overview of the setting of the access management table  134  when a read request or a write request is made to the snapshot volume  50 . 
     The access management table  134  is used to determine whether or not to release the pages allocated to the duplicated volume  40 . 
     Furthermore, the access management table  134  is constituted from a check necessity flag field  134 A and an access management filed  134 B. 
     The check necessity flag field  134 A stores a check necessity flag indicating whether an access check for the snapshot volume  50  is necessary or not. If the access check is necessary, a check necessity flag “1” is set (ON); and if the access check is not necessary, a check necessity flag “0” is set (OFF). Furthermore, the check necessity flag “1” is set as triggered by the read request or the write request made to the snapshot volume  50 . 
     Furthermore, the access management filed  134 B stores an access date and time of the latest access in slot units in the snapshot volume  50 . 
     Therefore, as “1” is set to the check necessity flag field  134 A in the case of  FIG. 13 , it is shows that the access check by using the access management table  134  is necessary. Furthermore, as “2011/1/1 10:00” is set to a first slot of the access management filed  134 B, it shows that the access request, either a read request or a write request, for the first slot in the snapshot volume  50  was made at 10:00 on Jan. 1, 2011. 
       FIG. 14  shows the setting screen  171  of the external terminal  17  and page release target time which is set on this setting screen  171 . 
     The setting screen  171  of the external terminal  17  displays the setting screen for setting at which timing the pages allocated to the duplicated volume  40  should be released. The user can set a release period of the pages allocated to the duplicated volume  40  by operating the external terminal  17 . 
       FIG. 15  shows the overview of the operation to release the pages allocated to the duplicated volume  40  based on the access frequency. 
     The monitor job starts the page management job. The started page management job regularly checks the access date and time and the page release target time stored in the access management table  135  and checks whether any slot which has not been accessed for a period of time beyond the page release target time exists or not from among the slots in the duplicated volume  40 . 
     If it is determined as a result of the check that a slot which has not been accessed for a period of time beyond the page release target time exists from among the slots in the duplicated volume  40 , the page management job starts a page release job. The started page release job will release the pages in a page unit (=in one-stripe unit or two-slot unit). It should be noted that if either one of the slots has been accessed before the expiration of the page release target time, the page including that slot will not be released. 
       FIG. 16  shows a free queue management table  136  and an allocated free queue management table  137 . 
     The free queue management table  136  is used to manage free queue addresses for each of a plurality of unused pool areas (free queues) provided by the disk devices  21 . 
     Furthermore, the free queue management table  136  is constituted from a free queue address management field  136 A, and free queue addresses are stored in the free queue address management field  136 A. 
     Furthermore, the allocated free queue management table  137  is used to manage which free queue is currently being used among a plurality of free queues provided by the disk devices  21 . 
     Furthermore, the allocated free queue management table  137  is constituted from an allocated free queue field  137 A, and the number of a free queue in use (e.g. an identifier of the pool area ECC 1 ) is stored in the allocated free queue field  137 A. 
       FIG. 17  shows a data area vacancy management table  138 . 
     The data area vacancy management table  138  is used to manage the positions of storage areas in the disk devices  21  in stripe units for each pool area so that if data is stored in the storage areas of the disk devices  21 , the data may be sequentially stored. Specifically speaking, a plurality of data area management tables  131 C are connected and managed in the data area vacancy management table  138 . Therefore, information of a data space for two slots which are the stripe unit, a 42-MB boundary flag, and a next table address are stored in the data area vacancy management table  138 . It should be noted that the size to be allocated sequentially in one pool area is set to be 42 MB in order to make the disk devices  21  operate efficiently in any RAID type. 
     (9) Processing Procedure of Various Types of Processing 
     The processing procedures of various types of processing executed by the storage apparatus  4  will be explained below. It should be noted that the various types of processing are executed on the channel adapter  11  or the storage device  20 , which accepts a read request or a write request from the host system  2 , by a disk adapter which actually executes the read processing or the write processing; however, the following explanation will be given by recognizing the controller  10  as the subject of the various types of processing. 
       FIG. 18  shows a processing procedure of write processing on the operation volume  30  as executed by the controller  10  for the storage apparatus  4 . After receiving a write request for the operation volume  30  from the host system  2 , the controller  10  starts the write processing on the operation volume  30  as shown in this  FIG. 18 . 
     After receiving a write request for the operation volume  30  from the host system  2 , before executing the write processing on the operation volume  30 , the controller  10  performs save copy necessity judgment to judge whether data which should be saved to the duplicated volume  40  exists or not (S 1 ). 
     If it is determined as a result of this judgment that copying is not necessary, the controller  10  determines that no data that should be saved exists for some reason, for example, that the data has already been saved; and then executes the write processing on the operation volume  30  (S 2 ). 
     After executing the write processing on the operation volume  30 , the controller  10  also executes the write processing on the duplicated volume  40  in the same manner (S 3 ) and then terminates this processing. 
     On the other hand, if it is determined as a result of the judgment in step S 1  that copying is necessary, the controller  10  refers to the volume management table  131 A and searches for the identifier (LUN) of the operation volume  30  included in the write request (S 4 ). 
     Subsequently, the controller  10  judges whether or not the duplicated volume  40  is associated with the operation volume  30  of the found identifier (S 5 ). 
     Specifically speaking, the controller  10  refers to the volume management table  131 A to check whether the “LUN of Duplicated Volume” is stored or not in the area where the operation volume  30  is managed in the volume management table  131 A. If the “LUN of Duplicated Volume” is stored, the controller  10  determines that the duplicated volume is associated; and if the “LUN of Duplicated Volume” is not stored, the controller  10  determines that the duplicated volume is not associated. 
     If a judgment result is obtained that the duplicated volume is not associated, the controller  10  starts the copy job to save data from the operation volume  30  to the snapshot volume  50  as conventionally performed, and then saves the data from the operation volume  30  to the snapshot volume  50  (S 6 ). 
     After saving the data to the snapshot volume  50 , the controller  10  executes the write processing on the operation volume  30  (S 7 ) and then terminates this processing. 
     On the other hand, if it is determined as a result of the judgment in step S 5  that the duplicated volume is associated, the controller  10  refers to the volume area management table  131 B and checks the page allocation status of the duplicated volume  40  (S 8 ). 
     Subsequently, the controller  10  judges whether the page has already been allocated to the duplicated volume  40  or not (S 9 ). 
     If a judgment result is obtained that no page has been allocated, the controller  10  proceeds to step S 6  and saves the data from the operation volume  30  to the snapshot volume  50  as explained above (S 6 ). 
     On the other hand, if it is determined as a result of the judgment in step S 9  that a page has been allocated, the controller  10  refers to the copy bitmap  132  and checks the copy status of the duplicated volume  40  (S 10 ). 
     Subsequently, the controller  10  refers to the copy bitmap  132  and judges whether the copy necessity flag of the first copy necessity flag field  132 A is set to “0” or not (S 11 ). 
     If it is determined as a result of the judgment that the copy necessity flag is “1,” the controller  10  starts the copy job and saves the data from the operation volume  30  to the snapshot volume  50  (S 6 ). After saving the data to the snapshot volume  50 , the controller  10  executes the write processing on the operation volume  30  (S 7 ) and then terminates this processing. 
     Meanwhile, if it is determined as a result of the judgment in step S 11  that the copy necessity flag is “0,” the controller  10  starts the copy job and saves the data from the duplicated volume  40  to the snapshot volume  50  (S 12 ). 
     After executing the write processing on the operation volume  30  (S 13 ) and then executing the write processing on the duplicated volume  40  (S 14 ), the controller  10  terminates this processing. 
       FIG. 19  shows a processing procedure of write processing on the duplicated volume  40  as executed by the controller  10  for the storage apparatus  4 . After receiving a write request for the operation volume  30  from the host system  2 , the controller  10  executes the write processing on the operation volume  30  as shown in  FIG. 18  and, at the same time as this write processing, also starts the write processing on the duplicated volume  40  as shown in this  FIG. 19 . 
     The controller  10  refers to the volume area management table  131 B and judges the page allocation status of the duplicated volume  40  (S 21 ). 
     If it is determined as a result of the judgment that no page has been allocated, the controller  10  determines that it is necessary to allocate a page to the duplicated volume  40 ; refers to the volume area management table  131 B; and determines a stripe position including a write position (S 22 ). 
     Subsequently, the controller  10  determines a page size of the page to be allocated (S 23 ). It should be noted that a default page size is set as 42 MB. 
     Then, the controller  10  refers to the data area vacancy management table  138  and obtains as many tables as the page size of the allocated page (S 24 ). 
     Next, the controller  10  connects the data area management tables  131 C to the volume area management table  131 B and executes the write processing on the duplicated volume  40  (S 25 ). 
     Then, the controller  10  sets the flag of the slot position, to which a page is allocated, to “1” in the second copy necessity flag field  132 B of the copy bitmap  132  (S 26 ). 
     Subsequently, the controller  10  sets the flag of the first copy necessity flag field  132 A of the copy bitmap  132  to “1” (S 27 ), executes the write processing (S 28 ), and terminates this processing. 
     On the other hand, if it is determined as a result of the judgment in step S 21  that a page has already been allocated, the controller  10  determines that a page has already been allocated to the duplicated volume  40 . Then, the controller  10  executes the write processing on the already allocated page (S 28 ) and terminates this processing. 
       FIG. 20  shows a processing procedure of processing for reading data from the snapshot volume  50  as executed by the controller  10  for the storage apparatus  4 . The controller  10  starts the read processing as shown in this  FIG. 20  after receiving a read request for the snapshot volume  50  from the host system  2 . 
     The controller  10  refers to the volume management table  131 A and searches for the identifier (LUN) of the snapshot volume  50  included in the read request (S 31 ). 
     Subsequently, the controller  10  judges whether or not the duplicated volume  40  is associated with the snapshot volume  50  of the found identifier (S 32 ). 
     Specifically speaking, the controller  10  refers to the volume management table  131 A to check whether the “LUN of Duplicated Volume” is stored or not in the area where the snapshot volume  50  is managed in the volume management table  131 A. If the “LUN of Duplicated Volume” is stored, it is determined that the duplicated volume is associated; and if the “LUN of Duplicated Volume” is not stored, it is determined that the duplicated volume is not associated. 
     If it is determined as a result of the judgment that the duplicated volume is not associated, the controller  10  executes the read processing for reading the data from the operation volume  30  to the snapshot volume  50  (S 33 ) as conventionally performed, and then terminates this processing. 
     On the other hand, if it is determined as a result of the judgment in step S 32  that the duplicated volume is associated, the controller  10  refers to the volume area management table  131 B and checks the page allocation status of the duplicated volume  40  (S 34 ). 
     Then, the controller  10  judges whether a page has already been allocated to the duplicated volume  40  or not (S 35 ). 
     If it is determined as a result of the judgment that no page has been allocated, the controller  10  proceeds to step S 33 , executes the read processing for reading the data from the operation volume  30  to the snapshot volume  50  as explained above (S 33 ), and terminates this processing. 
     On the other hand, if it is determined as a result of the judgment in step S 35  that a page has been allocated, the controller  10  refers to the copy bitmap  132  and checks the copy status of the duplicated volume  40  (S 36 ). 
     Furthermore, the controller  10  refers to the copy bitmap  132  and judges whether the copy necessity flag of the first copy necessity flag field  132 A is set to “0” or not (S 37 ). 
     If it is determined as a result of the judgment that the copy necessity flag is “1,” the controller  10  executes the read processing for reading the data from the operation volume  30  to the snapshot volume  50  as explained above (S 33 ) and then terminates this processing. 
     On the other hand, if it is determined as a result of the judgment in step S 37  that the copy necessity flag is “0,” the controller  10  executes the read processing for reading the data from the duplicated volume  40  to the snapshot volume  50  (S 38 ) and then terminates this processing. 
       FIG. 21  shows a processing procedure of write processing on the snapshot volume  50  as executed by the controller  10  for the storage apparatus  4 . After receiving a write request for the snapshot volume  50  from the host system  2 , the controller  10  starts the write processing on the snapshot volume  50  as shown in  FIG. 21 . 
     The controller  10  refers to the volume management table  131 A and searches for the identifier (LUN) of the snapshot volume  50  included in the write request (S 41 ). 
     Then, the controller  10  judges whether or not the duplicated volume  40  is associated with the snapshot volume  50  of the found identifier (S 42 ). 
     Specifically speaking, the controller  10  refers to the volume management table  131 A to check whether the “LUN of Duplicated Volume” is stored or not in the area where the snapshot volume  50  is managed in the volume management table  131 A. If the “LUN of Duplicated Volume” is stored, it is determined that the duplicated volume is associated; and if the “LUN of Duplicated Volume” is not stored, it is determined that the duplicated volume is not associated. If it is determined as a result of the judgment that the duplicated volume is not associated, the controller  10  saves the data from the operation volume  30  to the snapshot pool  60  as conventionally performed (S 43 ), then executes the write processing on the snapshot volume  50  (S 44 ), and terminates this processing. 
     On the other hand, if it is determined as a result of the judgment in step S 42  that the duplicated volume is associated, the controller  10  refers to the volume area management table  131 B and checks the page allocation status of the duplicated volume  40  (S 45 ). 
     Then, the controller  10  judges whether a page has already been allocated to the duplicated volume  40  or not (S 46 ). 
     If it is determined as a result of the judgment that no page has been allocated, the controller  10  proceeds to step S 43  and saves the data from the operation volume  30  to the snapshot volume  50  as explained above (S 43 ), then executes the write processing on the snapshot volume  50  (S 44 ), and terminates this processing. 
     On the other hand, if it is determined as a result of the judgment in step S 46  that a page has been allocated, the controller  10  refers to the copy bitmap  132  and checks the copy status of the duplicated volume  40  (S 47 ). 
     Subsequently, the controller  10  refers to the copy bitmap  132  and judges whether the copy necessity flag of the first copy necessity flag field  132 A is set to “0” or not (S 48 ). 
     If it is determined as a result of the judgment that the copy necessity flag is “1,” the controller  10  saves the data from the operation volume  30  to the snapshot volume  50  as explained above (S 43 ), then executes the write processing on the snapshot volume  50  (S 44 ), and terminates this processing. 
     On the other hand, if it is determined as a result of the judgment in step S 48  that the copy necessity flag is “0,” the controller  10  saves the data from the duplicated volume  40  to the snapshot volume  50  (S 49 ), then executes the write processing on the snapshot volume  50  (S 44 ), and terminates this processing. 
       FIG. 22  shows a processing procedure of association processing on the duplicated volume  40  as executed by the controller  10  for the storage apparatus  4 . It should be noted that, as a premise, the controller  10  accepts the identifier of the duplicated volume  40  to be associated and the identifier of the operation volume  30  specified as a target to be associated with the duplicated volume  40  as input values from the external terminal  17 . 
     The controller  10  refers to the identifier of the operation volume  30  among the accepted input values and judges whether the operation volume  30  is set to constitute a pair with the snapshot volume  50  or not (S 51 ). 
     Next, if a negative judgment result is obtained, the controller  10  determines that the pair setting is not set to the operation volume  30  specified as the target of association and the snapshot volume  50 ; reports an error response to the external terminal  17  (S 52 ), and terminates this processing. 
     On the other hand, if an affirmative judgment result is obtained in step S 51 , the controller  10  judges whether the duplicated volume  40  has already been associated with the operation volume  30  specified as the target of association or not (S 53 ). 
     If an affirmative judgment result is obtained in this step, the controller  10  determines that the duplicated volume  40  has already been associated with the operation volume  30  specified as the target of association, reports an error response to the external terminal  17  as explained above (S 52 ), and terminates this processing. 
     On the other hand, if a negative judgment result is obtained in step S 53 , the controller  10  judges whether the duplicated volume specified as the target of association is currently in a usable state or not (S 54 ). Incidentally, if the specified duplicated volume  40  is not associated with, for example, a real volume and a page cannot be allocated, the duplicated volume cannot be recognized as being in the usable state. 
     If a negative judgment result is obtained in this step, the controller  10  determines that the specified duplicated volume  40  is currently not in the usable state, reports an error response to the external terminal  17  as explained above (S 52 ), and terminates this processing. 
     On the other hand, if an affirmative judgment result is obtained in step S 54 , the controller  10  determines that the specified duplicated volume  40  is currently in the usable state, and sets the identifier of the specified duplicated volume to the “LUN of Duplicated Volume” of the area for managing the operation volume  30  in the volume management table  131 A (S 55 ). 
     Then, the controller  10  sets the identifier of the specified duplicated volume to the “LUN of Duplicated Volume” of the area for managing the snapshot volume  50  in the volume management table  131 A (S 56 ). 
     Subsequently, the controller  10  secures the volume area management table  131 B, the copy bitmap  132 , the sequential read counter  133 , and the access management table  134 , which are used to manage the duplicated volume  40 , in the shared memory  13  (S 57 ). 
     Then, the controller  10  sets the “Address of Volume Area Management Table,” “Address of Copy Bitmap,” “Address of Sequential Read Counter,” and “Address of Access Management Table” of the area for managing the duplicated volume  40  in the volume management table  131 A (S 58 ). 
     Subsequently, the controller  10  notifies the external terminal  17  of the termination of the association processing (S 59 ) and then terminates this processing. 
       FIG. 23A  and  FIG. 23B  show a processing procedure of addition processing executed by the controller  10  for the storage apparatus  4  when adding a pool volume to be associated with the duplicated volume  40 . This processing manages the positions of the storage areas of pool volumes by free queues (see  FIG. 17 ) and sets how to connect those free queues. 
     Among the plurality of data area management tables  131 C (free queues) managed by the data area vacancy management table  138 , the controller  10  clears variable A for retaining the address of the data area management table  131 C at the top of the relevant queue and variable C for retaining the address of the data area management table  131 C at the end of the queue by setting a NULL character (S 61 ). 
     It should be noted that “clearing by setting the NULL character” means to achieve the state where no address of the data area management table  131 C is retained. Therefore, as a result of the processing in this example, the state where the variable A and the variable C do not indicate any of the free queues is achieved. 
     Next, the controller  10  judges whether a value obtained by dividing the slot number of the target slot, from among the plurality of slots in the four pool volumes to be associated with the duplicated volume  40 , by four is an even number or not (S 62 ). 
     In this embodiment, pages are allocated in two-slot units, each of which is one stripe unit. So, if the value obtained by dividing the slot number of the target slot by four is an even number, a page will be allocated from the next slot; and the value obtained by dividing the slot number of the target slot by four is an odd number, the same page as allocated to the target slot will be also allocated to the next slot. 
     If a negative judgment result is obtained in this step, the controller  10  determines that the value obtained by dividing the slot number of the target slot by four is an odd number and increments the slot number of the target slot by one (S 63 ). 
     Furthermore, the controller  10  judges whether or not the slot number of the next slot, which is obtained by incrementing the slot number of the target slot by one, is equal to or larger than the last slot number of the free queue (S 64 ). 
     If a negative judgment result is obtained in this step, the controller  10  determines that the incremented slot number of the next slot is not the last number; and proceeds to step S 62 . 
     On the other hand, if an affirmative judgment result is obtained in step S 64 , the controller  10  determines that the incremented slot number of the next slot is the last number; and sets the “ 42 -MB boundary flag” ON of the data area management table  131 C for managing the slot of this slot number (S 65 ). 
     Next, based on the identifier of a pool volume to be associated with the duplicated volume  40 , the controller  10  calculates the identifier of a pool area including that pool volume (S 66 ). 
     Then, the controller  10  refers to the data area vacancy management table  138  for managing each of the pool areas and obtains a free queue from the pool area calculated at step S 66  (S 67 ). 
     Subsequently, the controller  10  tracks the data area management tables  131 C from the top of the free queue obtained in step S 67  and searches for variable D indicating the address of a data area management table  131 C immediately before a data area management table  131 C retaining the slot number 1 larger than the slot number 1 of the variable A (S 68 ). 
     Then, the controller  10  sets the variable A to the “next table address” of the data area management table  131 C indicated by the variable D (S 69 ) and terminates this processing. 
     On the other hand, if an affirmative judgment result is obtained in step S 62 , the controller  10  determines that the value obtained by dividing the slot number of the target slot by four is an even number and obtains variable B indicating an unused data area management table  131 C from the shared memory  13  (S 70 ). 
     Then, the controller  10  judges whether the variable A indicating the top data area management table  131 C is NULL or not (S 71 ). 
     If an affirmative judgment result is obtained in this step, the controller  10  sets the address of the variable B to the variable A which is NULL (S 71 ) and proceeds to step S 73 . On the other hand if a negative judgment result is obtained in this step, the controller  10  proceeds to step S 73 . 
     Subsequently, the controller  10  judges whether the variable C is NULL or not (S 73 ). 
     If a negative judgment result is obtained in this step, the controller  10  sets the address of the variable B to the “next table address” stored in the last data area management table  131 C of the queue (S 74 ) and proceeds to step S 75 . On the other hand, if an affirmative judgment result is obtained in this step, the controller  10  proceeds to step S 75 . 
     Then, the controller  10  sets the variable C to the address of the data area management table  131 C indicated by the variable B (S 75 ). 
     Next, the controller  10  calculates positional information of the plurality of slots in the pool volumes to be associated with the duplicated volume  40  based on the slot number of the target slot (S 76 ). 
     Subsequently, the controller  10  sets the positional information of the calculated slot to the “slot number 1” in the data area management table  131 C indicated by the variable B (S 77 ). 
     Furthermore, the controller  10  sets the positional information obtained by incrementing the positional information of the calculated slot by four, to the “slot number 2” of the data area management table  131 C indicated by the variable B (S 78 ). 
     Then, the controller  10  clears the “next table address” of the data area management table  131 C indicated by the variable B by setting the NULL character (S 79 ). 
     Next, the controller  10  judges whether the “42-MB boundary flag” of the data area management table  131 C indicated by the variable B is ON or not (S 80 ). 
     If an affirmative judgment result is obtained in this step, the controller  10  sets the 42-MB boundary flag ON (S 81 ) and proceeds to step S 82 . On the other hand, if a negative judgment result is obtained in this step, the controller  10  proceeds to step S 82 . 
     The controller  10  increments the slot number by one (S 82 ) and proceeds to step S 62 . Subsequently, the controller  10  executes the same processing as the processing explained earlier (from S 63  to S 69  or from S 70  to S 82 ) and terminates the processing. 
       FIG. 24  shows a processing procedure of page allocation processing executed by the controller  10  for the storage apparatus  4  when actually allocating pages to the duplicated volume  40 . 
     The controller  10  refers to the allocated free queue management table  137  and obtains a free queue (an identifier of the pool area) (S 91 ). 
     Next, the controller  10  calculates the required number of data area management tables  131 C based on the page size of pages to be allocated (S 92 ). 
     Next, the controller  10  refers to the free queue obtained in step S 91  and tracks the data area management tables  131 C sequentially from the top of the free queue (S 93 ). 
     Furthermore, the controller  10  judges whether the “42-MB boundary flag” of the data area management table  131 C is ON or not (S 94 ). 
     If an affirmative judgment result is obtained in this step, the controller  10  determines that the “42-MB boundary flag” is ON, refers to the free queue management table  136 , and searches for a next free queue (next pool area) (S 95 ). 
     Then, the controller  10  sets the found free queue to the allocated free queue management table  137  (S 96 ). 
     On the other hand, if a negative judgment result is obtained in step S 94 , the controller  10  determines that the “42-MB boundary flag” is not ON; and counts up the number of tables in the same pool area (S 97 ). 
     Then, the controller  10  judges whether the counted up number of tables has reached the required number or not (S 98 ). 
     If a negative judgment result is obtained in this step, the controller  10  determines that the counted up number of tables has not reached the required number yet; and proceeds to step S 94 . On the other hand, if an affirmative judgment result is obtained in this step, the controller  10  determines that the counted up number of tables has reached the required number; and proceeds to step S 99 . 
     The controller  10  sets the next data area management table  131 C of the fetched data area management tables  131 C to the top of the free queue (S 99 ). 
     Then, the controller  10  returns the starting address of the data area management table  131 C and the number of tables (S 100 ) and terminates this processing. 
       FIG. 25  shows a processing procedure of copy processing executed by the controller  10  for the storage apparatus  4  by starting a copy monitor job when performing background copying to pages secured as triggered by the write processing on the operation volume  30 . 
     The controller  10  starts the copy monitor job and regularly monitors the first copy necessity flag field  132 A of the copy bitmap  132  by the started copy monitor job (S 111 ). 
     If it is determined as a result of this regular monitoring that copying is necessary, the controller  10  starts the copy job (S 112 ) and terminates the processing by the copy monitor job. On the other hand, if it is determined as a result of the monitoring in step S 111  that copying is not necessary, the controller  10  terminates the processing by the copy monitor job. 
       FIG. 26  shows a processing procedure of copy processing executed by the controller  10  for the storage apparatus  4  by starting a copy job when performing background copying to pages secured as triggered by the write processing on the operation volume  30 . 
     The controller  10  starts the copy job, refers to the second copy necessity flag field  132 B of the copy bitmap  132  by the started copy job, and judges the necessity of copying in slot units (S 113 ). 
     If it is determined as a result of this judgment that copying is necessary, the controller  10  extracts the slot position in the operation volume  30  which is a copy source (S 114 ). 
     Next, the controller  10  searches the volume management table  131 A for the data area management table  131 C and calculates a slot position in the duplicated volume  40  which is a copy destination (S 115 ). 
     Then, the controller  10  copies data stored in the slot position extracted in step S 114  to the slot position calculated in step S 115  (S 116 ). 
     Subsequently, the controller  10  judges whether the slot on which the copy processing was executed is the last slot or not (S 117 ). 
     If a negative judgment result is obtained in this step, the controller  10  determines that other slots on which the copy processing should be executed exist; and processes the next slot (S 118 ). On the other hand, if an affirmative judgment result is obtained in this step, the controller  10  terminates this processing. 
     On the other hand, if it is determined as a result of the judgment in step S 113  that copying is not necessary, the controller  10  judges whether the target slot is the last slot or not (S 117 ). Then, as explained above, if a negative judgment result is obtained in this step, the controller  10  proceeds to step S 118  and executes the processing on the next slot; and if an affirmative judgment result is obtained in this step, the controller  10  terminates this processing. 
       FIG. 27  shows a processing procedure of update processing on the sequential read counter as executed by the controller  10  for the storage apparatus  4 . The controller  10  starts the update processing as shown in this  FIG. 27  after receiving a read request from the host system  2 . 
     After receiving a read request from the host system  2 , the controller  10  judges whether the sequential read attribute included in a read command of the read request is ON or not (S 121 ). 
     If it is determined as a result of this judgment that the sequential read attribute is OFF, the controller  10  determines that this read request is not for sequential data reading, executes normal read processing (S 123 ), and terminates this processing. 
     On the other hand, if it is determined as a result of the judgment in step S 121  that the sequential read attribute is ON, the controller  10  determines that this read request is for sequential data reading; and increments the counter of the slot position, which is a read target of the sequential read counter  133 , by one (S 122 ). 
     Then, the controller  10  executes sequential data reading (S 123 ) and terminates this processing. 
       FIG. 28  shows a processing procedure of page size determination processing executed by the controller  10  for the storage apparatus  4  when determining the page size of pages secured as triggered by the write processing on the operation volume  30 . 
     The controller  10  judges whether the page size of pages to be allocated is specified by the user via the external terminal  17  or not (S 124 ). 
     If it is determined as a result of this judgment that the page size is specified by the user, the controller  10  determines the user-specified size to be the page size of the allocated pages (S 125 ) and terminates this processing. 
     On the other hand, if it is determined as a result of the judgment in step S 124  that the page size is not specified by the user, the controller  10  refers to the sequential read counter  133  and judges whether the counter of the read target slot is other than “0” or not (S 126 ). 
     If it is determined as a result of this judgment that the counter is “0,” the controller  10  determines that sequential data reading has not been performed for the read target slot so far; determines the allocated size to be 42 MB which is a default value (S 127 ); and terminates this processing. 
     On the other hand, if it is determined as a result of the judgment in step S 126  that the counter is other than “0,” the controller  10  determines that sequential data reading has been performed for the read target slot at least once; and searches for a position within the top 42-MB range of this read target slot at which the counter is “0” in the sequential read counter  133  (S 128 ). 
     Meanwhile, the controller  10  searches for a position within the bottom 42-MB range of this read target slot at which the counter is “0” in the sequential read counter  133  (S 129 ). 
     Then, the controller  10  calculates the page size of the pages to be allocated from the number of slots from the top position found by the search in step S 128  to the end position found by the search in step S 129  (S 130 ), and terminates this processing. 
       FIG. 29  shows a processing procedure of access frequency management processing executed by the controller  10  for the storage apparatus  4  when a read request or a write request for the snapshot volume  50  is made. 
     The controller  10  refers to the “LUN of Duplicated Volume” in the area for managing the snapshot volume  50  in the volume management table  131 A (S 131 ). 
     Next, the controller  10  refers to the “LUN of Duplicated Volume” and judges whether or not the snapshot volume  50  and the duplicated volume  40  are associated with each other or not, based on whether the identifier of the duplicated volume is stored or not (S 132 ). 
     If a negative judgment result is obtained in this step, the controller  10  determines that the snapshot volume  50  and the duplicated volume  40  are not associated with each other; and terminates this processing. 
     On the other hand, if an affirmative judgment result is obtained in step S 132 , the controller  10  determines that the snapshot volume  50  and the duplicated volume  40  are associated with each other; and obtains the “LUN of Duplicated Volume” (S 133 ). 
     Then, the controller  10  refers to the area for managing the duplicated volume  40  in the volume management table  131 A based on the identifier of the duplicated volume  40  (S 134 ). 
     Furthermore, the controller  10  obtains the access management table  134  from the area for managing the duplicated volume  40  (S 135 ). 
     Furthermore, with the access management table  134 , the controller  10  sets a current time stamp at a slot position corresponding to the read target slot or the write target slot (S 136 ) and terminates this processing. 
       FIG. 30  shows a processing procedure of monitor processing executed by the controller  10  for the storage apparatus  4  by starting a monitor job. 
     The controller  10  regularly starts the monitor job and judges whether an hour has elapsed or not since the activation of the last page management job by the started monitor job (S 141 ). 
     If an affirmative judgment result is obtained in this step, the controller  10  starts the page management job, using the identifier of the duplicated volume  40  as an input value (S 142 ) and terminates this processing. On the other hand, if a negative judgment result is obtained in this step, the controller  10  terminates this processing. 
       FIG. 31  shows a processing procedure of the page release processing executed by the controller  10  for the storage apparatus  4  by starting a page management job when releasing pages based on the access frequency after securing the pages. 
     The controller  10  starts the page management job and refers to the area for managing the duplicated volume  40  in the volume management table  131 A based on the identifier of the duplicated volume  40  (S 151 ). 
     Next, the controller  10  obtains an address of the access management table  134  from the area for managing the duplicated volume  40  in the volume management table  131 A (S 152 ). 
     Then, the controller  10  obtains page release time which is input via the external terminal  17  (S 153 ). 
     Next, the controller  10  obtains the current date and time in the storage system  1  (S 154 ). 
     Next, the controller  10  clears the index for the access management table  134  by setting zero (S 155 ). 
     Furthermore, the controller  10  judges whether the access date and time of the target slot is set in the access management table  134  or not (S 156 ). 
     If an affirmative judgment result is obtained in this step, the controller  10  calculates the difference between the date and time, which is set, and the current date and time (S 157 ). 
     Furthermore, the controller  10  judges whether the calculated time difference is larger than the page release target time or not (S 158 ). 
     If an affirmative judgment result is obtained in this step, the controller  10  determines that the target slot has been secured without being accessed for a longer period of time than the page release target time; and starts a page release job, using the identifier of the duplicated volume  40  and the slot number as input values (S 159 ). 
     Then, the controller  10  increments the index for the access management table  134  by one (S 160 ). 
     Subsequently, the controller  10  judges whether the incremented index is at the end of the access management table  134  or not (S 161 ). 
     If an affirmative judgment result is obtained in this step, the controller  10  terminates this processing. On the other hand, if a negative judgment result is obtained in this step, the controller  10  proceeds to step S 156  and executes the above-described processing (from S 156  to S 161 ) in order to judge whether other target slots for which pages should be released exist or not, based on the access frequency. 
     If a negative judgment result is obtained in step S 156 , the controller  10  determines that the access date and time of the target slot is not set in the access management table  134 ; and proceeds to step S 160 . Then, the controller  10  executes the above-described processing (S 160 ). If the incremented index is at the end of the access management table the controller  10  terminates this processing (S 161 ). 
     If a negative judgment result is obtained in step S 158 , the controller  10  determines that the difference between the date and time set in the access management table  134  and the current date and time is smaller than the page release target time; and proceeds to step S 160 . Then, the controller  10  executes the above-described processing (S 160 ); and if the incremented index is at the end of the access management table, the controller  10  terminates this processing (S 161 ). 
       FIG. 32  shows a processing procedure of processing for determining the page size of the secured pages as executed by the controller  10  for the storage apparatus  4  when the page size of the secured pages is specified by the user via the external terminal  17 . 
     After receiving whatever request from the user via the external terminal  17 , the controller  10  judges whether the accepted request is for size specification or not (S 171 ). 
     If a negative judgment result is obtained in this step, the controller  10  further judges whether the request accepted from the user is for size deletion or not (S 172 ). 
     Then, if an affirmative judgment result is obtained in this step, the controller  10  determines that the accepted request is for size deletion; and clears the secured page size management table for managing the secured page size by setting zero (S 173 ). 
     On the other hand, if a negative judgment result is obtained in step S 172 , the controller  10  reports an error to the external terminal  17  (S 174 ) and terminates this processing. 
     Furthermore, if an affirmative judgment result is obtained in step S 171 , the controller  10  determines that the request accepted from the user is for size specification; and judges whether or not the specified size is not less than 512 KB, which is equivalent to two slots, and not more than 42 MB (S 175 ). 
     If a negative judgment result is obtained in this step, the controller  10  proceeds to step S 174 , reports an error to the external terminal  17  as explained above (S 174 ), and terminates this processing. 
     On the other hand, if an affirmative judgment result is obtained in step S 175 , the controller  10  judges whether the specified size is a 512-KB boundary or not (S 176 ). 
     If a negative judgment result is obtained in this step, the controller  10  corrects the specified size to the 512-KB boundary (S 177 ) and proceeds to step S 178 . On the other hand, if an affirmative judgment result is obtained in this step, the controller  10  proceeds to step S 178 . 
     Then, the controller  10  sets the specified size to the secured page size management table (S 178 ). 
     Subsequently, the controller  10  reports the completion of the processing to the external terminal  17  (S 179 ) and terminates this processing. 
     (10) Effects of This Embodiment 
     According to this embodiment as explained above, when allocating pages to the duplicated volume  40 , pages can be allocated in stripe units, each of which is of a data size that can be read by one read command, to the storage device  20 . Therefore, data can be read from the storage device  20  by a small number of read commands and the sequential performance can be improved. 
     INDUSTRIAL APPLICABILITY 
     The present invention can be applied to a wide variety of storage apparatuses equipped with the snapshot function. 
     REFERENCE SIGN LIST 
     
         
           1  Storage system 
           2  Host apparatus 
           3  Network 
           4  Storage apparatus 
           10  Controller 
           11  Channel adapter 
           12  Connection unit 
           13  Shared memory 
           14  Cache memory 
           15  Disk adapter 
           16  Management terminal 
           17  External terminal 
           20  Storage device 
           21  Disk device 
           30  Operation volume 
           40  Duplicated volume 
           50  Snapshot volume

Technology Category: g