Storage device, method for restoring data in storage device and storage controller

A virtual volume control unit allocates, upon detection of a write request for new data in a virtual volume to be accessed, an actual storage space of a physical medium existing in the same storage group to the virtual volume in accordance with volume capacity of the new data. A storage control unit stores the new data as actual data in the actual storage space of the physical medium allocated to the virtual volume. And a restoration control unit causes, upon detection of a fallback in data redundancy in the storage group, the actual data in a stored space among the actual storage spaces in the physical medium that caused the fallback to be preferentially restored in an actual storage space in a destination physical medium with reference to the physical media other than the physical medium that caused the fallback in the storage group.

CROSS-REFERENCE TO RELATED APPLICATION

This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2010-23552, filed on Feb. 4, 2010, the entire contents of which are incorporated herein by reference.

FIELD

The present invention relates to a storage device, a method for restoring data in the storage device and a storage controller.

BACKGROUND

Disk array devices, such as for example, a RAID (Redundant Arrays of Inexpensive Disk) set, have become popular. The RAID storage unit secures data reliability as an entire system with a data redundancy configuration established among disks in a RAID group consisting of a plurality of the disks (see, for example, Japanese Laid-open Patent Publication No. 2002-222063 and No. 2009-116783).

Even if a failure occurs in some disks in the RAID group and a fallback occurs in the data redundancy of the RAID group, the RAID storage unit can cause the data content stored in the failed disk(s) to be restored in a destination disk, such as a spare disk and a replaced normal disk. A widely used restoration process is, for example, a data reconstruction process (hereinafter, referred to as a “rebuild process”).

Thus, even if a failure occurs in some disks and a fallback occurs in the data redundancy in the RAID group, the RAID storage unit can recover the redundancy through the rebuild process to cause the data content in the failed disk to be restored in the destination disk.

In particular, in the rebuild process, the data content stored in the failed disk is sequentially restored from the first block to the last block of the actual storage space with reference to the failed disk and disks other than the failed disk in the RAID group.

In the rebuild process, the data content of the failed disk can be reconstructed and restored in the destination disk by sequentially storing the restored data in the actual storage space in the destination disk.

Upon detection of a write request issued by a host for new data with respect to a virtual volume to be accessed, the RAID storage unit allocates, as the virtual volume, a logical volume corresponding to an actual storage space of the disk which exists in the same RAID group in accordance with the volume capacity of the new data.

The virtual volume is not allocated from the actual storage space during creation of the logical volume recognized by the host, but allocated sequentially from the actual storage space corresponding to a range of an I/O request upon detection of an I/O request of a write request issued by the host. The RAID storage unit causes the new data of the write request to be stored as the actual data in the actual storage space of the disk corresponding to the logical storage space allocated to the virtual volume.

FIG. 14illustrates a relationship between a logical storage space and an actual storage space of the RAID groups when a virtual volume is used.

The virtual volume randomly includes, in the actual storage space in the RAID group, stored spaces in which the actual data is stored and spaces in which no actual data is stored (i.e., a zero data space).

In a rebuild process for a virtual volume in related art RAID storage units, data in the actual storage space of the failed disk is sequentially restored from the first block to the last block and the restored data is reconstructed in the actual storage space in the destination disk. Thus, in the related art RAID storage units, since the data content stored in the actual storage space of the failed disk is caused to be restored in the actual storage space of the destination disk, the data redundancy in the RAID group can be recovered.

In such related art RAID storage units, data in the first block to the last block of the destination disk is uniformly reconstructed irrespective of the concept of the stored space in which the actual data has been stored and the space in which no data is stored in the actual storage space of the failed disk. Recently, disks with increasingly larger storage capacity are being developed.

The related art RAID storage units require significantly long time to restore data uniformly and sequentially from the first block to the last block in the disk of large capacity and reconstructs the data content in the destination disk. It therefore takes long time to recover data redundancy in the RAID group.

SUMMARY

The disclosed technique is developed in view of the aforementioned circumstances, and an object thereof is to provide a storage device capable of significantly shortening time required to recover data redundancy even if a fallback occurs in data redundancy in a storage group.

A storage device according to the present application includes, in one aspect thereof, a plurality of physical media having actual storage spaces in each of which data is stored; a group control unit which creates a plurality of storage groups using the plurality of physical media; a virtual volume control unit which, upon detection of a write request for new data in a virtual volume to be accessed, allocates an actual storage space of a physical medium existing in the storage groups to the virtual volume in accordance with volume capacity of the new data; a storage control unit which causes the new data to be stored as actual data in the actual storage space of the physical medium allocated to the virtual volume by the virtual volume control unit and secures redundancy of the actual data with respect to the physical medium in the storage groups; and a restoration control unit which performs, upon detection of a fallback of redundancy with respect to the physical medium in the storage groups, a restoration process with reference to physical media other than the physical medium that caused the fallback in the storage group to which the physical medium that caused the fallback belongs such that the actual data in a stored space is preferentially restored in the actual storage space in the destination physical medium among the actual storage spaces in the physical medium that caused the fallback.

DESCRIPTION OF EMBODIMENTS

Hereinafter, embodiments of a storage device, a method for restoring data of the storage device and a storage controller according to the present application will be described in detail with reference to the drawings. The disclosed embodiments are illustrative and not restrictive.

[a] First Embodiment

FIG. 1is a block diagram of a configuration of a storage device according to a first embodiment. A storage device1illustrated inFIG. 1includes physical media2, a group control unit14, a virtual volume control unit11, a storage control unit12and a restoration control unit13. Data is stored in the physical media2.

The virtual volume control unit11detects a write request for new data with respect to a virtual volume which is to be accessed. The group control unit14creates a plurality of storage groups2A each of which is constituted by a plurality of physical media2.

The virtual volume control unit11allocates, upon detection of a write request for new data, a certain actual storage space of a certain physical medium2existing in a certain storage group2A as a virtual volume in accordance with volume capacity of the new data among the storage groups2A, each of which is constituted by a plurality of physical media2.

The storage control unit12causes the new data to be stored as actual data in the actual storage space of the physical medium2which is allocated as the virtual volume by the virtual volume control unit11.

The storage control unit12secures redundancy of the actual data with respect to the physical medium2in the storage group2A.

The restoration control unit13determines whether there is any fallback in the data redundancy in the storage group2A.

If any fallback in the data redundancy is detected, the restoration control unit13selects another physical medium2other than the physical medium2that caused the fallback within the storage group2A to which the physical medium2that caused the fallback belongs.

The restoration control unit13also performs, with reference to the selected another physical medium2, a restoration process such that the actual data in a stored space among the actual storage spaces of the physical medium2that caused the fallback is preferentially restored in an actual storage space of the destination physical medium2that caused the fallback.

In the first embodiment, when a fallback in the data redundancy in the storage group2A is detected, the actual data in the stored space among the actual storage spaces of the physical medium2that caused the fallback is preferentially restored in an actual storage space of the destination physical medium2with reference to the another physical medium2in the storage group2A to which the physical medium2that caused the fallback belongs. With this configuration, even if any fallback in the data redundancy is detected, processing time required for the recovery of the redundancy is shortened significantly and data reliability in the storage group can be recovered in the first embodiment.

[b] Second Embodiment

Next, a RAID storage unit according to a second embodiment will be described in detail.

FIG. 2is a block diagram of a configuration of a RAID storage unit according to the second embodiment. A RAID storage unit1A illustrated inFIG. 2is connected to a host3and includes RAID controllers4and a disk group5A. The host3is connected to the RAID controller4and sends an I/O request to the RAID controllers4.

The disk group5A, constituted by a plurality of RAID groups including a plurality of the disks5, is connected to the RAID controller4.FIG. 3illustrates exemplary block addresses of disks in the disk group5A.FIG. 4illustrates exemplary block addresses of RAID groups in the disk group5A.

The disk group5A is constituted by, for example, four disks5(DISK0to DISK3). The disk5(DISK0) illustrated inFIG. 3is constituted by, for example, actual storage spaces of a first block address 0x00000000 to a last block address 0x0000027f.

The disk5(DISK0) sequentially stores, from a first block, user data D0, D4, D8, parity data P3and user data D12.

The disk5(DISK1) is constituted by actual storage spaces of the first block address 0x00000000 to the last block address 0x0000027f.

The disk5(DISK1) sequentially stores, from the first block, user data D1, D5, parity data P2and user data D9and D13.

The disk5(DISK2) is constituted by, for example, actual storage spaces of the first block address 0x00000000 to the last block address 0x0000027f.

The disk5(DISK2) sequentially stores, from the first block, user data D2, parity data P1and user data D6, D10and D14.

The disk5(DISK3) is constituted by, for example, actual storage spaces of the first block address 0x00000000 to the last block address 0x0000027f.

The disk5(DISK3) sequentially stores, from the first block, parity data P0, user data D3, D7, D11and parity data P4.

Note that the block addresses of the RAID groups are different from those of the disks.

Each of the RAID controllers4includes host side interfaces41, disk side interfaces42and a control unit43.

The host side interfaces41are communication interfaces which communicate with the host3.

The disk side interfaces42are communication interfaces which communicate with the disk group5A.

The control unit43controls the entire RAID controller4. The control unit43includes a virtual volume51, a RAID management table52, a disk management table53, a logical storage space management table54, a virtual volume control unit55and a RAID control unit56.

The RAID management table52manages content of the RAID groups. The disk management table53manages content of the disks. The logical storage space management table54manages, in a bit map format, statuses, such as an allocation status and a restoration status, of each predetermined management unit in the actual storage space of the RAID groups. The predetermined management unit represents, for example, a32megabyte process area divided from the actual storage space.

FIG. 5illustrates content of the RAID management table52.

The RAID management table52illustrated inFIG. 5manages a RAID group number52A, a group status52B, a stripe depth52C, a stripe size52D and member disks52E.

The RAID group number52A represents a group number for the identification of the RAID group. The group status52B represents the status of the RAID group and represents various statuses, such as “rebuild in fallback state,” “rebuild with only actual data recovered” and “normal.” The stripe depth52C represents the number of blocks included in a unit depth in the RAID group.

For example, in stripe #1illustrated inFIG. 4, the stripe depth52C represents the number of blocks included in D4. The stripe size52D represents the number of blocks included in each stripe.

For example, in stripe #1illustrated inFIG. 4, the stripe size52D represents the number of all the blocks of D3, D4, D5and P1. The member disks52E represent the disk numbers for the identification of the disks5which belong to the RAID group.

FIG. 6illustrates content of the disk management table53.

The disk management table53illustrated inFIG. 6manages a disk number53A, a disk status53B, a number of RAID group to which the disk belongs53C and a rebuilding progress address53D.

The disk number53A represents the number for the identification of the disk5. The disk status53B represents various statuses of the disk5, such as “failed,” “normal” and “being rebuilt.” The number of RAID group to which the disk belongs53C represents the RAID group number to which the disk5belongs. The rebuilding progress address53D represents a progress address when the disk5is being rebuilt.

The rebuilding progress address53D is herein managed by the block addresses in the actual storage space illustrated inFIG. 3.

FIG. 7illustrates content of the logical storage space management table54.

The logical storage space management table54illustrated inFIG. 7manages a RAID group number54A, a newly set flag54B, an entry unit depth54C and a plurality of elements to be rebuilt54D. The newly set flag54B is a flag representing whether there is an allocation of new data during the rebuild process.

The entry unit depth54C represents the maximum depth for each entry number.

Note that the term “entry” is data representing whether the rebuild process should be performed for each management unit of the virtual volume.

The entry numbers are applied, in the predetermined management unit, sequentially from the first address to the last address of the actual storage space of the disk5in the RAID group.

The block addresses in the actual storage space of the disk5is converted into entry numbers in the following manner: first, the block addresses in the actual storage space illustrated inFIG. 3are converted into the block addresses of the RAID groups illustrated inFIG. 4; and then, the block addresses of the RAID groups are divided into the predetermined management units to obtain the divided result as the entry numbers.

In this manner, the entry numbers can be converted from the block addresses of the actual storage space.

Conversely, the entry numbers are converted into the block addresses in the actual storage space of the disk5in the following manner: first, the entry numbers are multiplied by the predetermined management units to obtain the multiplication result as block addresses of the first stripe of the RAID group; and then, the block addresses of the RAID groups are converted into the block addresses of the actual storage space illustrated inFIG. 3.

In this manner, the entry numbers can be converted into the block address of the actual storage space.

Each of the elements to be rebuilt54D is constituted by, for example, a total of 16 successive elements corresponding to 16 entries. Each element represents the entry number for the identification of the space corresponding to the predetermined management unit in the actual storage space and the allocation status and the restoration status of the space.

Each element is constituted by 4 bytes.

Each of the elements to be rebuilt54D includes 16 elements with the entry numbers of from 0 to 15.

Each of the elements to be rebuilt54D includes 16 elements with the entry numbers of from 16xn to 16xn+15.

FIG. 8illustrates an exemplary element to be rebuilt54D.

In the element to be rebuilt54D illustrated inFIG. 8, each entry is constituted by 8 bits, among which 1 bit is allocated as an allocation status bit and 1 bit is allocated to a restoration status bit.

The allocation status bit represents whether the actual storage space storing actual data has been allocated to a virtual volume. The allocation status bit is set to on, i.e., to 1 if the allocation is completed and is set to off, i.e., to 0 if the allocation is not completed.

The restoration status bit represents whether the actual data stored in the actual storage space has been restored during a rebuild process. The restoration status bit is set to on, i.e., to 1 if the restoration is completed and is set to off, i.e., 0 if the restoration is not completed.

If RAID 5 (15+1) is constituted by 16 1-terabyte disks, for example, the logical storage space management table54allocates each 2 bits as the allocation status bit and the restoration status bit of each of the entries in the logical storage space management table54.

In this manner, the necessary size of the logical storage space management table54can be about ((1×1024×1024) (MB)/(32/15) (MB))×2/8=122880 (bytes)=120 (KB).

The virtual volume control unit55detects a write request for new data to be written in a virtual volume51to be accessed by the host3.

The virtual volume control unit55allocates, upon detection of a write request for new data, a certain logical storage space corresponding to the actual storage space of the disk5existing in the same RAID group among the RAID groups as a virtual volume51in accordance with volume capacity of the new data.

The RAID control unit56includes a storage control unit56A and a rebuild control unit56B.

The storage control unit56A stores new data for which the write request was issued as the actual data in the actual storage space of the disk5corresponding to the logical storage space allocated to the virtual volume51.

Upon detection of a fault in a disk5in the RAID group, the rebuild control unit56B causes the actual data in the stored space among the actual storage spaces of the failed disk5to be restored with reference to the content of the disks5other than the failed disk5in the RAID group to which the failed disk5belongs.

The rebuild control unit56B preferentially reconstructs, in the actual storage space in the destination disk5, the actual data in the stored space among the actual storage spaces of the restored failed disk5.

The destination disk5is, for example, a spare disk and a replaced normal disk.

Details of the process to preferentially reconstruct the actual data will be described later.

When the rebuild process for the actual data to cause the actual data in the failed disk5to be reconstructed in the actual storage space in the destination disk5is started, the RAID control unit56changes the status of the RAID group to “rebuild in fallback state.”

The RAID control unit56sets the status of the group status52B in the RAID management table52to “rebuild in fallback state.”

With this, the RAID control unit56will sequentially cause the actual data in the failed destination disk5in the actual storage space of the destination disk5.

When the rebuild process for the actual data to cause the actual data to be reconstructed in the actual storage space in the destination disk5is completed, the RAID control unit56changes the status of the RAID group to “rebuild with only actual data recovered.”

The RAID control unit56sets the status of the group status52B in the RAID management table52to “rebuild with only actual data recovered.”

With this, the RAID control unit56had preferentially restored the actual data in the failed disk5in the actual storage space of the destination disk5.

The RAID control unit56changes the status of the RAID group to “normal” after the rebuild process of the actual data is completed and a zero guarantee rebuild process to reconstruct initial data, e.g., a zero data space, in the failed disk5, in the actual storage space in the destination disk5is completed.

The RAID control unit56sets the status of the group status52B in the RAID management table52to “normal.”

With this, the RAID control unit56had caused the actual data and the zero data space in the failed destination disk5in the actual storage space of the destination disk5.

If new data is written in a space of an address subsequent to the actual storage space which is currently being restored in response to a write request for new data during the rebuild process of the actual data, the RAID control unit56keeps the status of the RAID group to “rebuild in fallback state.”

The address subsequent to the actual storage space which is currently being restored is an address subsequent to a space which is not yet restored.

Thus, the RAID control unit56will cause the actual data including the new data to be restored in the actual storage space of the destination disk5, even if new data is written during the rebuild process of the actual data.

When new data is written in a space of an address preceding the actual storage space which is currently being restored in response to the write request for new data during the rebuild process of the actual data, the RAID control unit56performs the rebuild process of the new data after the ongoing rebuild process of the actual data is completed.

The time “after the ongoing rebuild process of the actual data is completed” corresponds to time after the rebuild process from the first entry to the last entry recognized upon starting is completed.

Thus, the RAID control unit56will cause the actual data including the new data to be restored in the actual storage space of the destination disk5, even if new data is written during the rebuild process of the actual data.

When new data is written in the disk5in response to the write request for new data during the zero guarantee rebuild process, the RAID control unit56suspends the zero guarantee rebuild process and changes the status of the RAID group to “rebuild in fallback state.”

In response to the status change to “rebuild in fallback state,” the RAID control unit56suspends the zero guarantee rebuild process and starts the rebuild process of new data.

Thus, the RAID control unit56reconstructs new data in the actual storage space of the destination disk5in response to the rebuild process of new data. With this, the RAID control unit56will cause the actual data including new data to be restored in the actual storage space of the destination disk5, even if new data is written during the zero guarantee rebuild process.

After the reconstruction of the actual data to destination disk5is completed, the rebuild control unit56B causes the zero data space of the space in which no data is stored among the actual storage space of the failed disk5to be reconstructed in the actual storage space of the destination disk5.

The RAID control unit56causes the data sequentially restored from the disks5other than the failed disk5during the rebuild process to be managed in the disk management table53as a progress address53D with the block addresses of the actual storage space.

Next, an operation of the RAID storage unit1A according to the second embodiment will be described.

FIGS. 9 to 11are flowcharts of the operation of the RAID controller4relating to the rebuild process of the virtual volume.

When a fallback occurs in the data redundancy upon, for example, a disk failure in the RAID group, the rebuild process of the virtual volume is performed to recover the fallback.

The term “fallback in the data redundancy” herein refers to a state in which reliability in redundancy is reduced due to failed redundancy disk(s)5in the RAID group.

Upon detection of a failure in the disk5existing in the RAID group (step S11), the control unit43in the RAID controller4illustrated inFIG. 9determines whether a disk5to be rebuilt is available (step S12).

The disk5to be rebuilt corresponds to a destination disk, such as a spare disk which replaces the failed disk5, or a replaced normal disk.

If the determination result in step S12is YES, the control unit43determines whether the volume to be rebuilt is a virtual volume (step S13).

The control unit43makes the determination in step S13with reference to the content of an un-illustrated table which manages whether each volume in the RAID group is a virtual volume.

If the determination result in step S13is YES, the control unit43sets the status of the RAID group to “rebuild in fallback state” (step S14).

When the control unit43sets the status of the RAID group to “rebuild in fallback state, the status of the group status52B corresponding to that RAID group in the RAID management table52is set to “rebuild in fallback state.”

The control unit43calculates the weight of each entry in the logical storage space management table54in accordance with a RAID constitution of the volume to be rebuilt (step S15).

The weight of each entry corresponds to the weight which adjusts capacity of a management unit allocated to each disk in accordance with the RAID constitution, e.g., the number of disks in the RAID group.

The weight is calculated, for example, in the following manner; assuming that the number of disks in the RAID group is four and the management unit of the virtual volume is 32 MB, then capacity for each entry is 32 MB/4=8 MB.

For ease of description, parity is not considered in the above calculation; parity, of course, should be considered in the calculation regarding the RAID 5.

The RAID control unit56in the control unit43sets the entry number for which the allocation status is to be inquired to the first entry number in the logical storage space management table54(step S16), and then inquires the allocation status of the logical storage space in the management unit corresponding to the entry number for which the allocation status is to be inquired (step S17).

The RAID control unit56determines whether the logical storage space regarding the entry number for which allocation status is to be inquired has been already allocated (step S18).

If the determination result in step S18is YES, the RAID control unit56sets the allocation status bit of that entry number of the logical storage space management table54to on, which represents that allocation has been completed and sets the restoration status bit to off, which represents that allocation has not been completed yet (step S19).

The RAID control unit56then determines whether the inquiry for the allocation status with respect to all the logical storage spaces of that RAID group has been completed (step S20).

The RAID control unit56determines whether the inquiry for the allocation status with respect to all the logical storage spaces has been completed with reference to the content of an un-illustrated table which manages usage of the virtual volume.

If the determination result in step S20is YES, the RAID control unit56sets the element to be rebuilt to the first entry number (step S21). The process is then continued to M1illustrated inFIG. 10.

If the determination result in step S18is NO, the RAID control unit56sets the allocation status bit and the restoration status bit of that entry number of in the logical storage space management table54to off (step S22).

The RAID control unit56sets the allocation status bit to off, which represents that allocation has not been completed yet, and sets the restoration status bit to off which represents that restoration has not been completed yet.

The process then proceeds to step S20where the RAID control unit56determines whether the inquiry has been completed.

If the determination result in step S20is NO, the RAID control unit56sets the entry for which the allocation status is to be inquired to the next entry number (step S23) and the process proceeds to step S17.

If the determination result in step S12is NO, the control unit43changes the status of the RAID group to “fallback state” and completes the operation.

When the status of the RAID group to “fallback state,” the control unit43sets the group status52B corresponding to the RAID group in the RAID management table52to “fallback state.”

If the determination result in step S13is NO, the control unit43performs a related art rebuild process (step S25) and completes the operation.

In M1illustrated inFIG. 10, the control unit43, which set the entry to be rebuilt to the first entry number, determines whether the allocation status bit of the entry number is on and the restoration status bit is off (step S31).

If the determination result in step S31is YES, the rebuild control unit56B in the RAID control unit56sets such that one session of the rebuild process is begun from the first entry number (step S32).

The rebuild control unit56B performs one session of the rebuild process (step S33).

The rebuild process reads actual data and parity in the disks5other than the failed disk5within the RAID group to which the failed disk5belongs.

In the rebuild process, the actual data to be rebuilt is restored with reference to the read actual data and parity and the restored actual data is stored in the actual storage space of the destination disk5.

The rebuild control unit56B determines whether the rebuild process for the actual storage space relating to the logical storage space of the ongoing entry number has been completed (step S34).

If the determination result in step S34is YES, the rebuild control unit56B sets the restoration status bit of this entry number to on, which represents that the restoration has been completed (step S35).

The RAID control unit56sets the restoration status bit for the corresponding entry number in the logical storage space management table54to on.

The rebuild control unit56B determines whether the rebuild process for the actual storage spaces relating to the logical storage space to the last entry number in the logical storage space management table54has been completed (step S36).

If the determination result in step S36is YES, the rebuild control unit56B determines whether a newly set flag54B in the logical storage space management table54is on (step S37).

If the determination result in step S37is NO, the rebuild control unit56B sets the status of the RAID group to “rebuild with only actual data recovered” (step S38) and the process proceeds to M2illustrated inFIG. 11.

The RAID control unit56sets the group status52B of the corresponding RAID group in the RAID management table52to “rebuild with only actual data recovered.”

The RAID controller4recognizes that the data redundancy of the corresponding RAID group has been recovered.

If the determination result in step S31is NO, the rebuild control unit56B sets the entry to be rebuilt to the next entry number (step S39), and the process proceeds to step S31.

If the determination result in step S34is NO, the rebuild control unit56B re-sets such that a range of one session of the rebuild process is shifted to the next space by one session of the process (step S40) and the process proceeds to step S33where the one session of the rebuild process to the re-set space is performed.

If the determination result in step S36is NO, the rebuild control unit56B sets the entry to be rebuilt to the next entry number (step S41), and the process proceeds to step S31.

If the determination result in step S37is YES, the rebuild control unit56B determines that new data is stored in the disk5during the rebuild process and sets the newly set flag54B to off (step S42). The rebuild control unit56B then sets the entry to be rebuilt to the first entry number (step S43), and the process proceeds to step S31where the entry number of the logical storage space corresponding to the actual storage space in which the new data has been stored is retrieved from the logical storage space management table54.

Upon acquisition of the entry number of the new data of which the allocation status bit is on and the restoration status bit is off, the rebuild control unit56B finally reconstructs new actual data stored in the actual storage space during the rebuild process in the disk5to be rebuilt.

In M2illustrated inFIG. 11, the rebuild control unit56B, which set the status of the RAID group to “rebuild with only actual data recovered,” sets an entry to be zero guarantee rebuilt to the first entry number (step S51).

After setting the entry to be zero guarantee rebuilt to the first entry number, the rebuild control unit56B determines whether the allocation status bit of this entry number is off and the restoration status bit is off (step S52).

If the determination result in step S52is YES, the rebuild control unit56B sets such that one session of the zero guarantee rebuild process is begun from the head of the entry (step S53).

The rebuild control unit56B performs one session of the zero guarantee rebuild process (step S54).

In the zero guarantee rebuild process, zero data and parity are read from spaces in which no data is stored of the disks5other than the failed disk5in the RAID group to which the failed disk5belongs. In the zero guarantee rebuilding process, the zero data to be rebuilt is restored with reference to the read zero data and parity and the restored zero data is stored in the actual storage space of the destination disk5.

The rebuild control unit56B determines whether the status of the RAID group is “rebuild in fallback state” (step S55).

If the determination result in step S55is NO, the rebuild control unit56B determines whether the zero guarantee rebuild process with respect to the actual storage space relating to the logical storage space of the ongoing entry number has been completed (step S56).

The rebuild control unit56B sets the restoration status bit of this entry number to on, which represents that the restoration has been completed (step S57) and then determines whether the rebuild process with respect to the actual storage space relating to the logical storage space to the last entry number in the logical storage space management table54has been completed (step S58).

If the determination result in step S58is YES, the rebuild control unit56B changes the status of the RAID group to “normal” (step S59) and completes the operation.

The RAID control unit56sets the group status52B corresponding to that RAID group in the RAID management table52to “normal.”

If the determination result in step S52is NO, the rebuild control unit56B sets an entry to be zero guarantee rebuilt to the next entry number (step S60) and the process proceeds to step S52.

If the determination result in step S55is YES, the rebuild control unit56B determines that new data has been written during the zero guarantee rebuild process.

The rebuild control unit56B sets the entry to be rebuilt to the first entry number (step S61) and the process proceeds to M3illustrated inFIG. 10where the entry number corresponding to the logical storage space relating to the actual storage space in which the new data has been stored is retrieved from the logical storage space management table54.

If the determination result in step S56is NO, the rebuild control unit56B re-sets such that a range of one session of the zero guarantee rebuild process is shifted to the next space by one session of the process (step S62).

The process proceeds to step S54where the rebuild control unit56B performs one session of the zero guarantee rebuild process to the re-set space.

If the determination result in step S58is NO, the rebuild control unit56B sets the entry to be zero guarantee rebuilt to the next entry (step S63) and the process proceeds to step S52.

In the rebuild process of the virtual volume, when the actual data in the failed disk5is preferentially reconstructed in the disk5to be rebuilt, the status of the RAID group is changed to “rebuild with only actual data recovered.”

Thus, the RAID group is recovered from the fallback state of redundancy.

In the rebuild process of the virtual volume, the actual data is reconstructed in the disk5to be rebuilt and the status is changed to “rebuild with only actual data recovered,” and then the zero guarantee rebuild process to cause the zero data space in the failed disk5to be reconstructed in the disk5to be rebuilt is performed.

With this, restoration of the actual data and the zero data in the failed disk5is completed when the zero guarantee rebuild process is completed and the status of the RAID group is changed to “normal.”

In the rebuild process of the virtual volume, the status of the RAID group is changed to “rebuild in fallback state” when, for example, the new data is written during the zero guarantee rebuild process.

In the rebuild process of the virtual volume, the entry number of the logical storage space relating to the actual storage space in which the new data has been stored is retrieved from the logical storage space management table54.

With this, in the rebuild process of the virtual volume, the actual data of the new data can be reconstructed in the disk5to be rebuilt with reference to the entry number.

Next, a process to allocate new data during the rebuild process will be described.

FIG. 12is a flowchart of an operation of the RAID controller4relating to a new allocation process.

InFIG. 12, the control unit43in the RAID controller4determines whether a new allocation request in response to the write request for new data has been detected (step S71).

If the determination result in step S71is YES, the control unit43determines whether the status of the RAID group corresponding to the new data is “rebuild in fallback state” or “rebuild with only actual data recovered” (step S72).

If the determination result in step S72is YES, the control unit43determines the entry number the corresponding to the logical storage space in a range of the allocation request of new data (step S73).

The control unit43sets the allocation status bit of the corresponding entry number in the logical storage space management table54to on (step S74) and determines whether the status of the corresponding RAID group is “rebuild in fallback state” (step S75).

If the determination result in step S75is YES, the control unit43determines whether the actual storage space relating to the logical storage space of the head of the range of the allocation request of new data has been rebuilt (step S76).

If the determination result in step S76is YES, the control unit43sets the newly set flag54B in the logical storage space management table54to on (step S77) and completes the operation.

Since the newly set flag54B is on (see step S37ofFIG. 10), the rebuild control unit56B retrieves the entry number of the actual storage space in which the new data has been stored again from the logical storage space management table54after the ongoing rebuild process of the actual data is completed.

The rebuild control unit56B sets the entry number as a result of retrieval and performs the rebuild process for the new data.

If the determination result in step S71is NO, the control unit43completes the operation.

The control unit43also completes the operation when the status of the RAID group is neither “rebuild in fallback state” nor “rebuild with only actual data recovered.”

If the determination result in step S75is NO, the control unit43determines that the status of the corresponding RAID group is “rebuild with only actual data recovered” and determined that the zero guarantee is ongoing.

The control unit43then determines whether the restoration status bit of this entry number is on during the zero guarantee rebuild process (step S78).

If the determination result in step S78is YES, the control unit43completes the operation.

If the determination result in step S78is NO, the control unit43sets the status of the corresponding RAID group to “rebuild in fallback state” (step S79) and completes the operation.

When the status is set to “rebuild in fallback state” (see step S55ofFIG. 11), the rebuild control unit56B suspends the zero guarantee rebuild process and retrieves the entry number of the actual storage space in which the new data has been stored from the logical storage space management table54.

The rebuild control unit56B sets the entry number as a result of retrieval and performs the rebuild process of the new data.

If the determination result in step S76is NO, the control unit43completes the operation.

Since the status of the corresponding RAID group is “rebuild in fallback state,” the rebuild control unit56B performs the rebuild process for the new data with the ongoing rebuild process of the actual data.

In the new allocation process illustrated inFIG. 12, during the rebuild process of the actual data, if the actual storage space relating to the logical storage space of the head of the range of the allocation request of new data has been rebuilt, the rebuild process for the new data is performed again after the ongoing rebuild process for the actual data is completed.

As a result, in the new allocation process, the new data allocated during the rebuild process of the actual data can be restored in the actual storage space of the disk5to be rebuilt.

In the new allocation process, if the actual storage space relating to the logical storage space of the head of the range of the allocation request of new data has been rebuilt, the rebuild process for the new data is performed with the ongoing rebuild process for the actual data.

Thus, in the new allocation process, the new data allocated during the rebuild process of the actual data can be restored in the actual storage space of the disk5to be rebuilt.

When the new data is allocated during the zero guarantee rebuild process in the new allocation process, the ongoing zero guarantee rebuild process is suspended and the rebuild process of the new data is started.

Thus, in the new allocation process, the new data allocated during the zero guarantee rebuild process can be restored in the actual storage space of the disk5to be rebuilt.

Next, an operation of the RAID controller4corresponding to the I/O request from the host3will be described.

FIG. 13is a flowchart of an operation of the RAID controller4relating to a host I/O request process.

InFIG. 13, the control unit43in the RAID controller4determines whether an I/O request issued by the host3has been detected (step S81).

The I/O request is, for example, a write request for new data.

If the determination result in step S81is YES, the control unit43determines whether the RAID group can receive an I/O request (step S82).

If the determination result in step S82is YES, the control unit43determines whether there is a disk failure with which the RAID group has a fallback in redundancy (step S83).

If the determination result in step S83is NO, the control unit43determines the status of the RAID group to “normal.”

When the status of the RAID group is “normal,” the control unit43performs normal access to the actual storage space relating to the logical storage space of the I/O request range using all the corresponding disks5(step S84) and completes the operation.

If the determination result in step S81is NO, the control unit43completes the operation.

If the determination result in step S82is NO, the control unit43the I/O request error to the host3(step S85) and completes the operation.

If the determination result in step S83is YES, the control unit43determines whether the rebuild process for the RAID group is ongoing (step S86).

If the determination result in step S86is NO, the control unit43determines the status of the RAID group to “fallback state.”

If the determination result in step S86is NO, the control unit43excludes the failed disk5and performs fallback access to normal disks5in the corresponding RAID group with respect to the actual storage space relating to the logical storage space in the range of the I/O request (step S87).

The control unit43then completes the operation.

If the determination result in step S86is YES, the control unit43determines the status of the RAID group to “rebuild in fallback state.”

When the rebuild process is ongoing, the control unit43determines whether the data reconstruction in the disk to be rebuilt (i.e., the destination disk)5with the ongoing rebuild process of the actual data has been completed (step S88).

If the determination result in step S88is YES, the control unit43determines the status of the RAID group to “rebuild with only actual data recovered.”

The process then proceeds to step S84where the control unit43makes normal access upon completion of data reconstruction.

If the determination result in step S88is NO, the control unit43determines the status of the RAID group to “rebuild in fallback state.”

If the data reconstruction has not been completed, the control unit43calculates the block address corresponding to the logical storage space of the range of the I/O request in the disk5to be rebuilt (step S89).

The control unit43retrieves, from the logical storage space management table54, the entry number which corresponds to the block address of the range of the I/O request in the disk5to be rebuilt (step S90).

If the entry number which corresponds to the block address of the range of the I/O request is retrieved, the control unit43determines whether the range of the retrieved entry number has been restored with reference to the restoration status bit (step S91).

If the determination result in step S91is YES, the process proceeds to step S84where the control unit43makes normal access.

If the determination result in step S91is NO, the control unit43changes the status of the disk5to be rebuilt to “failed” (step S92).

When the status of the disk5to be rebuilt is changed to “failed,” the process proceeds to step S87where the control unit43makes normal access.

In the host I/O request process illustrated inFIG. 13, if an I/O request issued by the host3is detected when the status of the RAID group is “normal,” normal access can be made to the corresponding disk5in the RAID group.

In the host I/O request process, if an I/O request issued by the host3is detected when the status of the RAID group is “rebuild with only actual data recovered,” normal access can be made to the corresponding disk5in the RAID group.

In the host I/O request process, if an I/O request issued by the host3is detected when the status of the RAID group is “fallback state” or “rebuild in fallback state,” fallback access can be made to the normal disk5in the RAID group to which the failed disk5belongs.

In the second embodiment described above, upon detection of the fallback in the data redundancy in the RAID group, actual data and parity of normal disks5other than the failed disk5in the RAID group to which the failed disk5belongs are read out.

In the second embodiment described above, the actual data in the stored space among the actual storage spaces of the failed disk5is restored with reference to the actual data and parity and the restored actual data is preferentially restored in the actual storage space in the destination disk5.

Thus, in the second embodiment, even if a fallback occurs in data redundancy in the RAID group, the time required for the recovery of the data redundancy is shortened significantly and reliability in the data redundancy can be secured.

In the second embodiment described above, after the rebuild process to cause the actual data in the stored space to be restored in the destination disk5is performed, the zero data space in which the actual data has not been stored among the actual storage spaces of the failed disk5is preferentially restored in the actual storage space in the destination disk5.

Thus, in the second embodiment, the actual data and the zero data space in the failed disk5can be completely restored in the destination disk5.

In the second embodiment described above, new data can be stored in the actual storage space of an address subsequent to the stored space relating to the actual data for which the rebuild process has been performed even when the rebuild process for the actual data to destination disk5is ongoing.

In the second embodiment described above, when the new data is stored, the rebuild process is continued to cause the actual data in the stored space to be restored in the destination disk5, including the actual data in the space in which the new data has been stored with reference to the management content of the logical storage space management table54.

Thus, in the second embodiment, even if new data is written during the rebuild process of the actual data, the new data can also be restored in the actual storage space of the destination disk5.

In the second embodiment described above, new data can be stored in the actual storage space corresponding to an address preceding the stored space relating to the actual data for which the rebuild process has been performed even during the rebuild process for the actual data to destination disk5.

In the second embodiment described above, when new data is stored, the rebuild process is performed, after the ongoing rebuild process, to cause the actual data in the stored space in which the new data is stored to be restored in the destination disk5with reference to the management content of the logical storage space management table54.

Thus, in the second embodiment, even if new data is written during the rebuild process of the actual data, the new data can also be restored in the actual storage space of the destination disk5.

In the second embodiment described above, new data can be stored in the actual storage space in the disk5in the corresponding RAID group even during the zero guarantee rebuild process with respect to the destination disk5.

In the second embodiment described above, when new data is stored, the ongoing zero guarantee rebuild process is suspended with reference to the management content of the logical storage space management table54and the rebuild process to preferentially cause the actual data in the stored space in which the new data is stored to be restored in the destination disk5.

Thus, in the second embodiment, even if new data is written during the zero guarantee rebuild process, the new data can be restored in the actual storage space of the destination disk5.

In the second embodiment described above, the allocation status bit representing whether the actual data has been allocated and the restoration status bit representing whether the rebuild process has been performed are managed in the logical storage space management table54for each stored space in the actual storage space and for each logical storage space corresponding to the space in which no data has been stored.

In the second embodiment described above, the space in which data has been stored, the stored space and the space which has been restored can be specified among the actual storage spaces in the disk5with reference to the allocation status bit and the restoration status bit in the logical storage space management table54.

In the second embodiment described above, the zero guarantee rebuild process is performed when the zero data space in the failed disk5is restored in the destination disk5.

Alternatively, however, the zero data space may be restored by partially formatting the corresponding actual storage space of the destination disk5upon restoration of the zero data space in the failed disk5with respect to the destination disk5.

In the second embodiment described above, the zero guarantee area may be pooled in advance and the new data may be allocated to the pooled zero guarantee area upon detection of a write request for new data during the rebuild process.

Although the space in which no data, which is the initial data, is stored is the zero data space in the second embodiment described above, the initial data may be, for example, format data.

In the second embodiment described above, when new data is written in response to the write request for new data in the normal disks5other than the failed disk5in the corresponding RAID group during the zero guarantee rebuild process, the zero guarantee rebuild process is suspended.

The status of the corresponding RAID group is changed to “rebuild in fallback state.”

However, the new data may be written in the destination disk5in the corresponding RAID group during the zero guarantee rebuild process in response to the write request for new data.

In this case, it is not necessary to change the status of the corresponding RAID group.

Although the RAID storage unit1A with the RAID level of RAIDS is described as an example in the second embodiment, the second embodiment can also be applied to a RAID storage unit with the RAID level of RAID6.

The illustrated components of each section are not necessarily constituted physically as illustrated.

The specific form of distribution or integration of each section is not necessarily limited to those illustrated in the drawings; rather, the form may be entirely or partially distributed or integrated functionally or physically in an arbitrary unit in accordance with various loads or usage conditions.