This patent application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2012-204851 filed on Sep. 18, 2012, the entire contents of which are incorporated herein by reference.
The embodiment discussed herein is related to a storage apparatus and a control method of the storage apparatus.
A storage apparatus including a backup function has been known. Related to the storage apparatus, a data storage management system, which includes a second cumulatively storing part for cumulatively storing data files transferred from multiple file servers, and a part for automatically managing transmission of the data files between the multiple file servers and the second cumulatively storing part. In the data storage management system, when the data file is transferred from the storage server to store, the data file is enclosed in a large data block which is called a “transmission unit”. The transmission unit is backed up to another backup medium such as a high density electromagnetic tape through a backup drive apparatus.
Japanese Laid-open Patent Publication No. 09-510806
According to one aspect of the embodiment, there is provided a storage apparatus, including a first storage area; a second storage area; and a controller configured to write data to the first storage area based on a write request, sequentially write the data to the second storage area from a beginning of a physical address thereof when the data are written in the first storage area, and output the data to a backup apparatus by sequentially reading out the data being written in the second storage area from the beginning of the physical address.
The object and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the appended claims. It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention as claimed.
In the following, embodiments of the present invention will be described with reference to the accompanying drawings.
In a storage apparatus, a sequential write is performed when writing data with respect to a state immediately after an operation start. Write and delete operations are repeated, and an area becomes segmented. Thus, a random access is mainly conducted.
Also, as a storage device in the storage apparatus, a HDD (Hard Disk Drive) or the like is mainly used. Especially, if the backup is attempted in the storage apparatus using the storage device such as the HDD or the like, positioning in the storage device, or positioning in a backup device such as a LTO (Linear Tape-Open) or the like is performed. Especially, in a case of handling data having relatively small size consisting of dozens to hundreds of kilobytes, meta information is frequently accessed with respect to a disk, and reading out of data occurs with a shorter I/O (Input/Output) length, when an I/O request is occurred. Hence, a throughput performance of reading data is reduced. In the environment, it is difficult to utilize performance of the backup device in a case in which the file is backed up to a sequential access device such as the LTO or the like. As a result, even if the storage apparatus is provided with a RAID (Redundant Arrays of Inexpensive Disks) mechanism, the LTO, and the like each having sufficient performance, wheres performance as a whole may not be sufficiently demonstrated.
Regarding this point, in the backup drive apparatus, re-arrangement of the data files is conducted among layers while retaining a directory structure. Thus, it is difficult to sufficiently suppress reduction of the process speed due to the positioning.
Accordingly, as one aspect of an embodiment, there is provided a storage apparatus which is capable of reducing the process time for the backup.
In the following, examples of a storage apparatus, a control method of the storage apparatus, and a control program of the storage apparatus will be described with reference to the accompanying drawings.
The storage apparatus 10 includes a Central Processing Unit (CPU) 12, a disk device 14, a Random Access Memory (RAM) 16, a program memory 18, and a Network Interface Card (NIC) 20.
The CPU 12 executes a program stored in the program memory 18. The program memory 18 may be a disk device other than the disk device 14. The program memory 18 may correspond to a dedicated area for the disk device 14. Alternatively, the program memory 18 may be a Read-Only Memory (ROM), an Electrically Erasable and Programmable Read-Only Memory (EEPROM), a Solid State Drive (SSD), or the like.
The disk device 14 may be a HDD, a DVD (Digital Versatile Disc), a Blu-ray (trademark) disk, or the like. In the disk device 14, a main storage area 14A and a backup area 14B are set. The main storage area 14A is an area to which data are written in response to a write request from the host 50. The backup area 14B is an area used as an intermediate area when data are transferred to the backup apparatus 60. The backup area 14B may be set in the RAM 16, instead of the disk device 14. Alternatively, the backup area 14B may be set in another storage device such as the SSD, the EEPROM, or the like.
The RAM 16 may be used to develop a program stored in the program memory 18 and may be used as a cache with respect to the disk device 14.
The NIC 20 conducts communications with the host 50.
The NFSD/CIFS part 12A writes data in the main storage area 14A based on a write request received from the host 50. Also, the NFSD/CIFS part 12A reads the data from the main storage area 14A and outputs the data to the host 50 in response to a read request received from the host 50.
Also, the NFSD/CIFS part 12A sequentially writes data from a beginning of a physical address of the backup area 14B when writing the data to the backup area 14B. Then, when a backup request is received from the host 50, the NFSD/CIFS part 12A sequentially reads out the data, which are written in the backup area 14B, from the beginning of the physical address, and outputs the data to the backup apparatus 60 through the host 50. Accordingly, the backup area 14B is controlled by a First-In-First-Out (FIFO).
Numerals 1-10 in ( ) in
(1) First, the host 50 sends the write request of a file to be a backup target with respect to the storage apparatus 10. In this case, the write requests pertinent to files #1, #11, and #13 are conducted by the host 50.
(2) the NFSD/CIFS part 12A receives each of the write requests from the host 50, and controls a file system 12B, so as to conduct positioning of a disk towards a location for the file #1 in the main storage area 14A. Then, the NFSD/CIFS part 12A writes the file #1. In detail, the NFSD/CIFS part 12A issues a write command with respect to the disk device 14 storing the file #1, to the file system 12B. In a process of the write command by the file system 12B, a positioning operation of a head of the disk device 14 and an actual data write are conducted. Details of the file system 12B will be described later.
(3) When writing of one file requested by the host 50 is completed (or in parallel with the writing of one file), the NFSD/CIFS part 12A sequentially writes the same file from the beginning of the physical address of the backup area 14B. For this writing, a command prepared by the file system 12B is used.
(4) The NFSD/CIFS part 12A repeats the above processes (2) and (3) for each of the files #1, #11, and #13 to which the write requests are received from the host 50. In
(5) After that, the host 50 sends the backup request to the storage apparatus 10.
(6) Also, the host 50 sends the backup request to the backup apparatus 60. The backup apparatus 60 performs a positioning towards a location to store the file #1, and conducts a write preparation for the file #1.
(7) The NFSD/CIFS part 12A receives the backup request from the host 50, and outputs a read instruction with respect to the backup area 14B.
(8) After that, the NFSD/CIFS part 12A controls the NIC 20 and sends the file #1 to the host 50.
(9) When the host 50 receives the file #1 to back up, the host 50 transfers the file #1 to the backup apparatus 60 and requests the writing of the file #1.
(10) The host 50 repeats the above processes (7) through (9) until the end of the backup area 14B, and completes the backup process. When the storage apparatus 10 completes one backup process, the storage apparatus 10 deletes contents in the backup area 14B. When a next write to the main storage area 14A occurs, the storage apparatus 10 writes a file from the beginning of the physical address of the backup area 14B.
In this case, the host 50 does not always conduct the write request and the backup request as a series of processes. The host 50 may send the backup request at a desired timing to the storage apparatus 10. When a free area of the backup area 14B becomes lower than a threshold (for example, a small percentage of the entire area), the host 50 sends the backup request to the storage apparatus 10. In this case, the storage apparatus 10 may periodically send the free area size of the backup area 14B to the host 50. The host 50 may count the number of files cumulatively stored in the backup area 14B. This control may be conducted in response to an input operation of a user with respect to the host 50, or may be voluntarily conducted by the storage apparatus 10.
Also, the vfs 12Ba communicates with the host 50 through the nfs 12Bc, the rpc 12Bd which regulates a procedure between different machines in a common network, a tcp/ip 12Bg corresponding to a network layer, and an NIC driver 12Bh. The nfs 12Bc is regarded as a layer corresponding to the file system 12Bb.
In the file system 12B having the above described hierarchical structure, I/O requests (the write request and the read request) from the host 50 to the disk device 14 are controlled in accordance with the following routes:
NIC driver 12Bh→tcp/ip 12Bg→rpc 12Bd→nfs 12Bc→vfs 12Ba→file system 12Bb→cache 12Be→device driver 12Bf→disk device 14.
(a) generic_file_write(1)
The generic_file_write(1) corresponds to a general procedure for a write access to a file in a file system, and is called from the vfs 12Ba when a write of the file is conducted. When the generic_file_write(1) is executed, write data received from the vfs 12Ba are written in the page cache of an indicated file, and a state is changed to a Dirty state. In an execution process of the generic_file_write(1), a write to the page cache alone is conducted, and a write to the disk device 14 is delayed.
(b) block_prepare_write(1)
The block_prepare_write(1) conducts a prepare_write process specific to the file system. The block_prepare_write(1) allocates a buffer and allocates a disk block, for the page cache of a write subject.
(c) generic_commit_write(1)
The generic_commit_write(1) sets the Dirty state to the buffer cache corresponding to a write area. Also, the Dirty state is set to a respective page cache. Later, update data in the page cache is written in a disk.
(d) bdflush(1)
The bdflush(1) writes dirty data in the cache to the disk device 14.
In the page cache, the data of the write subject remains. The write to the backup area 14b may be executed in accordance with the following procedures:
(a) block_prepare_write(2)
The block_prepare_write(2) temporarily converts data cached in a page into a buffer format (a data format for a disk write). Also, the block_prepare_write(2) indicates a write start address in the backup area 14B.
(b) generic_commit_write(2)
The generic_commit_write(2) conducts a process similar to the generic_commit_write(1).
(c) bdflush(2)
The bdflush(2) writes the dirty data in the cache to the disk device 14. By this operation, the file is actually written in the backup area 14B.
[Comparison with Another Storage Apparatus]
A comparison with another storage apparatus (called a “storage apparatus 10X”), which does not includes the backup area 14B according to the embodiment, will be described.
In the above described processes, each of the positioning in a disk device in the storage apparatus 10X and the positioning in the backup apparatus 60X occurs three times. As previously described, since the writing of the file is repeated in the disk device, it is assumed that areas updated in response to the write requests are dispersed.
On the other hand, as described in
In the storage apparatus 10 in the embodiment, it is possible to reduce a process speed for the backup as described above. However, a file arrangement in the main storage area 14A is different from that in the backup apparatus 60. Thus, when a desired file is restored at a desired time for data stored in chronological order into the backup apparatus 60, the desired file is searched for from the beginning of a medium (hereinafter, simply called “tape”) of the backup apparatus 60. Then, the file is read out. Accordingly, if a location of a subject file is not ascertained beforehand, a search of the file may take a relatively long time.
By implementing the following functions, the file search of the tape may be effectively conducted.
The storage apparatus 10 includes a backup management table 14C for storing a storage location which indicates a count of storage locations of the files from the beginning of the tape when the file is stored on the tape.
On the other hand, when the file is stored to the tape, header information is provided at a beginning of each of the files. The header information may include the file name, the file length, the creation date, the latest update date and time.
In a case of conducting a restore, the header information of a file of a restore subject is searched for as a search condition in the backup management table 14C. A location of the file of the restore subject on the tape is determined based on matched table information. The restore is performed from the tape. By these operations, it is possible to omit reading information of a file body on the tape when the restore is performed from the tape. Hence, it is possible to read the file of the restore subject by simply searching for the storage location of the file at an earlier stage and positioning at the storage location of the file on the tape.
Also, when the storage apparatus 10 is defective, the following processes may be performed.
(1) In a case in which a process is interrupted for some reason when the write operation is conducted to the backup area 14B, the write process is performed again by using original data to which the writing to the main storage area 14A is completed. Especially in case of a power outage, it is preferable that a battery or the like is mounted in the storage apparatus 10, and it is preferable to take measures so as to assure a data write time.
(2) In a case of a failure of the backup area 14B itself, it is possible to avoid an error by creating and retaining a copy of data in a different location in the backup area 14B.
(3) In a case in which an error is detected at the backup apparatus 60 when the file is transferred from the backup area 14B to the backup apparatus 60, similar to a common tape backup mechanism, the file to which the error is detected is transferred again to the backup apparatus 60.
(4) In a case in which an error is detected at the backup apparatus 60 when data are restored by using backup data of the backup apparatus 60, similar to a restore process from a common tape, the file to which the error is detected is read out again from the backup apparatus 60.
According to the storage apparatus 10, the control method of the storage apparatus 10, and the control program of the storage apparatus 10, it is possible to reduce the process time for the backup.
The main storage area 14A may be an example of a “first storage area”, the backup area 14B may be an example of a “second storage area”, and a storage area for the backup management table 14C may be an example of a “third storage area”. Also, the NFSD/CIFS part 12A may be an example of a “controller”.
According to the embodiment, in the storage apparatus 10, it is possible to reduce the process time for the backup.
All examples and conditional language recited herein are intended for pedagogical purposes to aid the reader in understanding the invention and the concepts contributed by the inventor to furthering the art, and are to be construed as being without limitation to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although the embodiments of the present invention have been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2012-204851 | Sep 2012 | JP | national |