Data access method and magnetic tape unit equipment

By introducing access control and data protection policies into tape drive devices, the problem of insufficient flexibility in tape WORM technology is solved, enabling flexible data access and secure management of different areas of the tape, and improving the flexibility and security of data protection.

CN121560211APending Publication Date: 2026-02-24CHENGDU HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411123316.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

Existing magnetic tape WORM technology is not flexible enough in protecting data on magnetic tapes, and cannot achieve flexible management of different areas of the tape, resulting in insufficient granularity of data protection.

Method used

By introducing an access control mechanism into the tape drive, read/write permissions for different areas of the tape are determined based on the address of the data access request. Combined with controller and data protection policies, flexible data access management for different areas of the tape can be achieved.

Benefits of technology

It improves the flexibility and security of magnetic tape data protection, and can flexibly adjust the restrictions on read/write operations according to the importance of the data and protection requirements, so as to achieve fine-grained protection of magnetic tape data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121560211A_ABST
    Figure CN121560211A_ABST
Patent Text Reader

Abstract

The invention discloses a data access method and magnetic tape unit equipment, and relates to the technical field of magnetic tapes. In the method, the magnetic tape unit equipment determines a first permission identifier according to a data protection strategy corresponding to a first address of a first data access request, and allows or forbids read / write operation of the first data access request according to the first permission identifier. Therefore, for each data access request, whether different areas, storing different data, of the magnetic tape allow read / write operation corresponding to the data access request is judged, flexible management of data access can be realized according to the address carried by the data access request, and the data protection granularity of the magnetic tape is refined into different areas in the magnetic tape; and the flexibility of the WORM technology for the magnetic tape is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of magnetic tape technology, and more particularly to a data access method and a magnetic tape drive device. Background Technology

[0002] Write-once-read-many (WORM) is a storage technology feature that can be implemented through various means, including software, hardware, physical structure, or storage media. This feature ensures that once important data is written to the storage medium, it can only be read and cannot be tampered with.

[0003] Currently, WORM technology for magnetic tape is implemented in two forms: a combination of ordinary magnetic tape and a write-protect switch, and a combination of dedicated drivers and tapes matched with dedicated drivers. In the combination of ordinary magnetic tape and a write-protect switch, a physical switch is added to the magnetic tape, and changing the state of the physical switch enables or disables data write protection. In the combination of dedicated drivers and tapes matched with dedicated drivers, WORM data is recorded using servo information different from that of ordinary magnetic tape; this tape can only be read and written using a dedicated driver.

[0004] However, the WORM technology mentioned above for magnetic tapes has a granularity of protecting the entire tape when WORM is applied. That is, if WORM technology is used for magnetic tapes, all data on the tape will be protected by WORM, which results in poor flexibility for WORM technology for magnetic tapes. Summary of the Invention

[0005] This application provides a data access method and a magnetic tape drive device, which solves the problem of poor flexibility in the WORM technology of magnetic tape.

[0006] The technical solution adopted in this application is as follows.

[0007] In a first aspect, this application provides a data access method applied to a tape drive device, the tape drive device including a first controller, the method being executable by the first controller. The data access method includes: acquiring a first data access request; the first data access request including a first address; determining a first permission identifier based on the first data access request; the first permission identifier indicating whether a first area of ​​the tape to which the first address belongs allows or prohibits read / write operations; and executing or denying the read / write operation corresponding to the first data access request based on the first permission identifier.

[0008] Based on the above data access method, for each data access request, such as the first data access request, it is determined whether the first controller is allowed to perform the read / write operation corresponding to the data access request in the area of ​​the tape corresponding to that address, based on the address corresponding to the data access request. In this way, by determining whether different areas of the tape storing different data are allowed to perform the read / write operation corresponding to the data access request for each data access request, flexible data access management can be achieved based on the address carried in the data access request. This refines the granularity of tape data protection to different areas within the tape, improving the flexibility of WORM technology for tapes.

[0009] In conjunction with the method provided in the first aspect, in one optional implementation, if the first permission identifier is a first value, the read / write operation corresponding to the first data access request is executed. If the first permission identifier is a second value, the read / write operation corresponding to the first data access request is refused. Here, the first value and the second value are different.

[0010] Taking the first controller of the tape drive as an example, when the first permission response's first permission identifier is a first value, the first controller executes the read / write operation corresponding to the first data access request; when the first permission response's first permission identifier is a second value, the first controller refuses to execute the read / write operation corresponding to the first data access request. The first value and the second value are different.

[0011] In conjunction with the method provided in the first aspect, in one optional implementation, the tape drive device includes a first controller and a second controller connected to the first controller. The first controller sends a first permission request to the second controller based on a first address; the first permission request includes the first address. In response to the first permission request, the second controller sends a first permission response to the first controller; the first permission response includes the first permission identifier. The first controller receives the first permission response sent by the second controller and determines the first permission identifier in the first permission response.

[0012] Based on the above implementation, the first controller determines whether the first area of ​​the tape to which the first address belongs is allowed or prohibited from reading / writing operations based on the first permission request contained in the first permission response sent by the second controller. This decouples the processing of data access requests and permission verification to be executed by different controllers, thereby improving the security of read / write operation protection.

[0013] In conjunction with the method provided in the first aspect, in one optional implementation, the first controller or the second controller stores a first data protection policy. This first data protection policy may be written to the first controller by the tape drive device, or sent to and written to the second controller by the first controller.

[0014] The first controller or the second controller determines the first permission identifier based on the first address contained in the first data access request. For example, if a valid first data protection policy exists in the first area of ​​the tape to which the first address belongs, the first permission identifier is the second value; if a valid first data protection policy does not exist in the first area of ​​the tape to which the first address belongs, the first permission identifier is the first value.

[0015] Optionally, the first data protection policy includes a first validity identifier, which indicates whether the first data protection policy is effective. The first validity identifier may include time limits, sequence limits, access restrictions, and / or access count limits. In this way, the time periods for restricting read / write operations on corresponding areas of the tape under the data protection policy can be flexibly adjusted according to the importance of the data, protection requirements, etc., further improving the flexibility of tape data protection.

[0016] In conjunction with the method provided in the first aspect, in an optional implementation, the data access method provided in this application further includes: receiving location information; the location information is used to indicate the relative position of the magnetic head and the magnetic tape; determining that the magnetic head is located in a second region of the magnetic tape based on the location information; determining a second data protection policy corresponding to the second region; the second data protection policy is used to indicate whether read / write operations are allowed or prohibited in the second region; if the second data protection policy is effective, read / write operations are prohibited in the second region.

[0017] Taking the second controller of the tape drive as an example, the second controller receives position information and then determines that the read / write head is located in the second region of the tape based on the position information, and determines the second data protection policy corresponding to the second region. The second data protection policy is used to indicate whether read / write operations are allowed or prohibited in the second region. If the first data protection policy is effective, read / write operations are prohibited in the second region.

[0018] Based on the above implementation method, when the magnetic head performs read / write operations on any area of ​​the magnetic tape, the validity of the data protection policy of the area of ​​the magnetic tape currently being operated on by the magnetic head can be judged, thereby enabling the tape drive to restrict read / write operations on that area based on the data protection policy in subsequent steps, thus improving the real-time performance of data protection for the magnetic tape.

[0019] In conjunction with the method provided in the first aspect, in an optional implementation, the tape drive device may further include a read / write circuit. The data access method provided in this application further includes: a second controller sending a shutdown signal to the read / write circuit; the read / write circuit is used to control the magnetic head to perform read / write operations on the tape according to the data access instructions of the first controller, and the shutdown signal is used to indicate that the read / write circuit is powered off.

[0020] Based on the above implementation, when the data protection policy for the area where the magnetic head is performing a read / write operation prohibits the corresponding read / write operation, the read / write circuit is powered off, thus preventing the magnetic head from accessing data on the magnetic tape through hardware control. In this way, the data access method provided in this application combines the flexibility of data management with the security of physical protection for magnetic tape data.

[0021] Secondly, this application provides a magnetic tape drive device. The magnetic tape drive device includes: a magnetic head, a magnetic tape, a magnetic tape drive, and a first controller. The magnetic tape drive is used to drive the magnetic tape. The first controller is used to acquire a first data access request; the first data access request includes a first address; determine a first permission identifier based on the first data access request; the first permission identifier is used to indicate whether a first area of ​​the magnetic tape to which the first address belongs allows or prohibits read / write operations; and execute or refuse to execute the read / write operation corresponding to the first data access request based on the first permission identifier.

[0022] In conjunction with the tape drive device provided in the second aspect, in one optional implementation, the tape drive device further includes a second controller, and the first controller is further configured to: send a first permission request to the second controller based on the first address; the first permission request includes the first address; receive a first permission response sent by the second controller according to the first permission request; the first permission response includes the first permission identifier; and determine the first permission identifier in the first permission response.

[0023] In conjunction with the tape drive device provided in the second aspect, in one optional implementation, the first controller is specifically used to: if the first permission identifier is a first value, execute the read / write operation corresponding to the first data access request; if the first permission identifier is a second value, refuse to execute the read / write operation corresponding to the first data access request; the first value and the second value are different.

[0024] In conjunction with the tape drive device provided in the second aspect, in one optional implementation, the first controller or the second controller stores a first data protection policy. This first data protection policy is used to indicate whether read / write operations are permitted or prohibited in the first area. If a valid first data protection policy exists in the first area of ​​the tape to which the first address belongs, the first permission identifier is the second value; if no valid first data protection policy exists in the first area of ​​the tape to which the first address belongs, the first permission identifier is the first value.

[0025] Optionally, the first data protection policy includes a first validity identifier, which indicates whether the first data protection policy is effective. The first validity identifier includes time limits, sequence limits, access restrictions, and / or access count limits. In this way, the data protection policy can flexibly adjust the time periods for restricting read / write operations on corresponding areas of the tape according to the importance of the data and protection requirements, further improving the flexibility of tape data protection.

[0026] In conjunction with the tape drive device provided in the second aspect, in one optional implementation, the second controller is further configured to: receive position information; the position information is used to indicate the relative position of the magnetic head and the tape; determine, based on the position information, that the magnetic head is located in a second region of the tape; determine a second data protection policy corresponding to the second region; the second data protection policy is used to indicate whether read / write operations are allowed or prohibited in the second region; if the second data protection policy is effective, read / write operations are prohibited in the second region.

[0027] In conjunction with the tape drive device provided in the second aspect, in one optional implementation, the tape drive device further includes a read / write circuit, and the second controller is further configured to: send a shutdown signal to the read / write circuit; the read / write circuit is configured to control the magnetic head to perform read / write operations on the tape according to the data access instruction, and the shutdown signal is configured to indicate that the read / write circuit is powered off.

[0028] Thirdly, this application provides a readable storage medium. The readable storage medium includes a computer program or instructions that, when executed on an electronic device, cause the electronic device to perform the method provided in the first aspect or any optional implementation thereof.

[0029] Fourthly, this application provides a computer program product. The computer program product includes a computer program or instructions that, when executed on an electronic device, cause the electronic device to perform the method provided in the first aspect or any optional implementation thereof. Attached Figure Description

[0030] Figure 1 A schematic diagram of the structure of a data access system provided in this application;

[0031] Figure 2 This application provides a schematic diagram of the structure of a magnetic tape drive device;

[0032] Figure 3 A schematic diagram of another magnetic tape drive device provided in this application;

[0033] Figure 4a A flowchart illustrating a data access method provided in this application Figure 1 ;

[0034] Figure 4b A flowchart illustrating a data access method provided in this application Figure 2 ;

[0035] Figure 5 A schematic diagram of the area corresponding to a data protection strategy for magnetic tape provided in this application;

[0036] Figure 6 A schematic diagram of the area corresponding to another magnetic tape data protection strategy provided in this application;

[0037] Figure 7 A flowchart illustrating hardware-level read / write protection steps for magnetic tape, as provided in this application;

[0038] Figure 8 This is a schematic diagram of the structure of a controller provided in this application. Detailed Implementation

[0039] This application provides a data access method and a tape drive device. When the tape drive device receives a data access request, it determines a first permission identifier based on the first data access request. The first permission identifier is used to indicate whether a first area of ​​the tape to which a first address belongs is allowed or prohibited from reading / writing operations. The device then executes or refuses to execute the read / write operation corresponding to the first data access request based on the first permission identifier. In this way, for each data access request, it determines whether different areas of the tape storing different data are allowed to perform the corresponding read / write operation. This enables flexible data access management based on the address carried in the data access request, refining the granularity of tape data protection to different areas within the tape and improving the flexibility of WORM technology for tapes.

[0040] The technical solutions involved in this application may be applied not only to current magnetic tape technology or storage devices, but also to future magnetic tape technology or storage devices, or to storage systems including magnetic tape media storage or storage devices. The terminology used in the embodiments section of this application is only for explaining specific embodiments of this application and is not intended to limit this application. A brief introduction to some concepts that may be involved in this application is given below.

[0041] Storage medium: A storage material used to record sound, images, digital signals, or other signals. This storage material may include, but is not limited to, magnetic tape, such as a tape-shaped material with a magnetic layer used to record sound, images, digital signals, or other signals. Magnetic tape contains a magnetic medium, such as magnetic powder, for storing data. For example, changes in the magnetic field in this magnetic medium are typically achieved by coating a plastic film substrate (support or backing) with a layer of granular magnetic material or by evaporating and depositing a layer of magnetic oxide or alloy film. The substrate of magnetic tape may include, but is not limited to, paper, celluloid, or polyester film.

[0042] Magnetic head: A component that reads and writes data on magnetic tape using magnetic principles. It is divided into write heads and read heads. Write heads record data by magnetizing the magnetic medium (such as magnetic powder), while read heads read data from the magnetic medium by sensing its magnetic field.

[0043] To make the objectives, technical solutions, and advantages of this application clearer, the application will now be described in further detail with reference to the accompanying drawings.

[0044] In the following description, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0045] Furthermore, in this application, directional terms such as "upper" and "lower" are defined relative to the orientation of the components shown in the accompanying drawings. It should be understood that these directional terms are relative concepts, used for relative description and clarification, and can change accordingly depending on the orientation of the components in the accompanying drawings.

[0046] According to the basic definition of WORM technology, it involves using hardware to control the storage medium so that data can only be written once, preventing repeated writing and modification. WORM tapes are write-once tapes. For example, WORM tapes with write-protection switches add a physical switch to the tape, and changing the state of the physical switch enables or disables write protection. WORM tapes using dedicated drives require a special driver, different from that used for ordinary tapes, to write data. However, the above-mentioned hardware-based WORM protection for tapes either provides WORM protection for all data on the tape or none of the data on the tape is protected, resulting in limited flexibility.

[0047] To address the aforementioned issues, the application scenarios of the embodiments of this application will be described below with reference to the accompanying drawings.

[0048] Figure 1 This is a schematic diagram of a data access system provided in this application. The data access system includes: a data access device 100 and a storage device 120. Figure 1 In the application scenario shown, users access data through applications. The computer running these applications can be referred to as a "computing device".

[0049] Data access device 100 can be a physical machine, a virtual machine, or a container. The physical machine can include, but is not limited to, one or both a client and a smart NIC. For example, data access device 100 includes a client, such as a host, desktop computer, server, laptop, or mobile device. Another example is that data access device 100 includes a smart NIC. This smart NIC, also known as a smart network adapter, in addition to performing the network transmission functions of a standard NIC, provides a built-in programmable and configurable hardware acceleration engine to improve application performance and significantly reduce CPU consumption in the host connected to the smart NIC during communication, thus providing more CPU resources for the application.

[0050] In one possible example, data access device 100 accesses storage device 120 via a network to access data; for example, the network may include switch 110.

[0051] In another possible example, data access device 100 may also communicate with storage device 120 via a wired connection, such as a universal serial bus (USB) or a peripheral component interconnect express (PCIe) bus.

[0052] Figure 1 The storage device 120 shown can be a centralized storage system. A key feature of a centralized storage system is a unified entry point through which all data from external devices passes; this entry point is the engine 121 of the centralized storage system. The engine 121 has management functions, and many advanced functions of the storage system are implemented within it.

[0053] like Figure 1 As shown, engine 121 may have one or more controllers. Figure 1 The following example illustrates the concept of engine 121 containing one controller. In one possible example, if engine 121 has multiple controllers, any two controllers can have a mirror channel, enabling any two controllers to serve as backups for each other, thereby preventing hardware failures from causing the entire storage device 120 to become unavailable. It should be understood that if engine 121 includes multiple controllers, then engine 121 can also be referred to as the array controller of storage device 120.

[0054] Engine 121 also includes a front-end interface 1211 and a back-end interface 1214. The front-end interface 1211 is used to communicate with the data access device 100 to provide data access services to the data access device 100. The back-end interface 1214 is used to communicate with hard drives to expand the capacity of the storage device 120. Through the back-end interface 1214, engine 121 can connect to more hard drives, thereby forming a very large storage resource pool.

[0055] In terms of hardware, such as Figure 1 As shown, the controller includes at least a processor 1212 and memory 1213. The processor 1212 is a central processing unit (CPU) used to process data access requests from outside the storage device 120 (server or other storage system), and also to process requests generated internally by the storage device 120. For example, when the processor 1212 receives write data requests from the data access system 100 through the front-end interface 1211, it temporarily stores the data in these write data requests in memory 1213. When the total amount of data in memory 1213 reaches a certain threshold, the processor 1212 sends the data stored in memory 1213 to at least one of the following hard drives for persistent storage: a mechanical hard drive 1221, a solid-state drive (SSD) 1222, a tape drive 200, or another hard drive 1224, through a back-end port.

[0056] It should be noted that, Figure 1 Only one engine 121 is shown in the figure. However, in actual applications, the storage system may contain two or more engines 121, and redundancy or load balancing may be performed between multiple engines 121.

[0057] The hard drive enclosure 122 includes a control unit 1225 and several hard drives. The control unit 1225 can have various forms. In one case, the hard drive enclosure 122 is a smart enclosure, such as... Figure 1As shown, the control unit 1225 includes a CPU and memory. The CPU performs operations such as address translation and reading / writing data. The memory is used to temporarily store data to be written to the hard disk or to read data from the hard disk to be sent to the controller. Alternatively, the control unit 1225 can be a programmable electronic component, such as a data processing unit (DPU). A DPU has the versatility and programmability of a CPU, but is more specialized, capable of efficiently operating on network packets, storage requests, or analysis requests. A DPU differs from a CPU by its high degree of parallelism (the ability to handle a large number of requests). Optionally, the DPU can be replaced by a graphics processing unit (GPU), an embedded neural network processing unit (NPU), or other processing chips. Typically, there can be one, two, or more control units 1225. The functions of the control unit 1225 can be offloaded to the network interface card (NIC) 1226. In other words, in this embodiment, the hard disk enclosure 122 does not contain a control unit 1225; instead, the NIC 1226 performs data reading / writing, address translation, and other computational functions. At this point, network interface card 1226 is a smart network interface card. It can contain a CPU and memory. The CPU is used to perform address translation and data reading / writing operations. Memory is used to temporarily store data to be written to the hard drive or to read data from the hard drive to be sent to the controller. It can also be a programmable electronic component, such as a DPU. There is no ownership relationship between network interface card 1226 and the hard drives in hard drive enclosure 122; network interface card 1226 can access any hard drive in hard drive enclosure 122 (e.g., ...). Figure 1 The mechanical hard drive 1221, solid-state drive 1222, tape drive device 200 and other hard drives 1224 shown are examples of hard drives that make it easier to expand hard drives when storage space is insufficient.

[0058] In this embodiment, the tape drive device 200 refers to a memory that includes a magnetic tape medium. In hardware implementation, this magnetic tape medium memory may include, but is not limited to, a magnetic head, a magnetic tape, and a tape drive. The tape drive is used to drive the magnetic tape for winding, and the magnetic head accesses the tape during winding, such as writing data to or reading data from the tape. Specific implementation details of the magnetic tape medium memory are provided below. Figures 2 to 7 The embodiments shown are not described in detail here.

[0059] In terms of hardware implementation, the hard disk enclosure 122 can be installed in the storage system, or the hard disk enclosure 122 can be encapsulated and set up independently. When the hard disk enclosure 122 exists independently, it can also be called a storage device or a storage system. This application does not limit this.

[0060] It is worth noting that the above examples are merely possible implementations of the data access system provided in this embodiment and should not be construed as limiting this application. For example, Figure 1 In the storage device 120 shown, data is stored in the form of files on each hard disk.

[0061] Regarding the aforementioned tape drive device 200, this application provides an optional example, such as... Figure 2 As shown, Figure 2 This is a schematic diagram of a magnetic tape drive device provided in this application. The magnetic tape drive device 200 can be used to implement the functions of the aforementioned magnetic tape drive device 200. In this document, the magnetic tape drive device may also be referred to as a magnetic tape media storage device, magnetic tape drive, integrated magnetic tape machine, integrated magnetic tape disk, or magneto-electric disk, etc., and this application does not limit it to these terms.

[0062] The following is combined Figure 2 The tape drive device 200 is described by way of example and includes: tape 210, tape drive 220, magnetic head 230, controller 240, reel 201, roller 202 and base 203.

[0063] The reel 201 and the base 203 are rotatably connected, and the magnetic tape 210 is wound onto the reel 201.

[0064] The magnetic tape drive device 200 includes two reels 201. The first end of the magnetic tape 210 is wound on one reel 201, and the last end of the magnetic tape 210 is wound on the other reel 201.

[0065] Combination Figure 2 As shown in the provided embodiments, the tape drive 220 is used to drive the tape 210 to wind along its length. The magnetic head in the tape drive device 200 accesses the tape 210 during the winding process.

[0066] Please continue reading. Figure 2 As an optional implementation, the tape drive 220 includes a tape reel motor and a voice coil motor (VCM) motor.

[0067] The tape reel motor is used to drive the magnetic tape 210 to wind along its length. For example, the tape reel motor can be used to drive a drum, causing the magnetic tape wound on the drum to rewind in a first direction, rewind in a second direction, or stop rewinding. The first direction and the second direction are two opposite directions along the length of the magnetic tape.

[0068] Optionally, the tape drive 220 may also include devices such as stepper motors, linear motors, hydraulic cylinders or pneumatic cylinders, which are not limited in this application.

[0069] As an optional implementation, the magnetic head 230 may include one or both of a write head and a read head. The write head records data by magnetizing and changing the magnetic field of the magnetic medium (such as magnetic powder), while the read head reads data from the magnetic medium by sensing its magnetic field.

[0070] In some alternative configurations, the magnetic head 230 may also include a servo head, which may be divided into a write servo head and a read servo head. Taking the read servo head as an example, the read servo head can determine the position information of the tape 210 based on the address in the IO request, and the tape driver 220 can rewind the tape 210 from its current position to the tape area indicated by the position information, thereby allowing the read data head to read the data stored in the tape area indicated by the position information.

[0071] The aforementioned IO request may be generated by the controller 240 from a data access request obtained from outside the tape drive device 200. The controller 240 is electrically connected to the magnetic head 230 and the tape drive 220, respectively.

[0072] For example, the controller 240 can be a chip, such as a logic chip or a memory chip, used to process data access requests (also called I / O requests) from outside the tape drive device 200 (such as a host, server, or other storage system), and also to process requests generated internally by the tape drive device 200. For example, when the chip receives a write data access request, it temporarily stores the data in these write I / O requests internally. When the total amount of data internal to the chip reaches a certain threshold, the chip writes the stored data to the tape 210 for persistent storage.

[0073] For example, controller 240 is used to send control commands according to a data access request. The control commands are used to instruct the magnetic head 230 to slide relative to the base 203, thereby instructing the magnetic head 230 to perform read / write operations on the data stored in the area of ​​the magnetic tape corresponding to the address in the data access request. The type of read / write operation can be a read operation or a write operation, wherein a write operation can include any operation involving the writing principle, such as writing, updating, overwriting, etc.

[0074] It is worth noting that when the magnetic tape travels within the target distance range, the magnetic head will access the data in the tape. Therefore, this control command can also be called an access command, read / write command, read command, or write command, etc. This application embodiment does not limit this.

[0075] After receiving an external data access request, the controller 240 determines a first permission identifier based on the first data access request. If the first permission identifier indicates that the area of ​​the tape to which the address in the data access request belongs is allowed to perform read / write operations, the controller 240 sends a control command to control the magnetic head 230 to access the corresponding area of ​​the tape 210.

[0076] If the first permission identifier indicates that the area of ​​the tape to which the address in the data access request belongs is prohibited from reading / writing, the controller 240 does not send a control command to control the magnetic head 230 not to access the corresponding area of ​​the tape 210.

[0077] In some alternative methods, the controller 240 does not send control commands. This could be that the controller 240 does not generate control commands, or that the control commands generated by the controller 240 are intercepted. The implementation method of this application embodiment is not limited.

[0078] The tape drive device 200 may further include a controller 250, which is electrically connected to the controller 240. The controller 250 is used to determine, based on the permission request sent by the controller 240, whether the area of ​​the tape to which the address in the data access request obtained by the controller 240 belongs is permitted or prohibited from read / write operations, and returns a permission response to the controller 240 to instruct the controller 240 to execute or not execute the data access request. The controller 240 may also be referred to as the first controller, and the controller 250 may also be referred to as the second controller.

[0079] For example, the controller 250 may be a chip used to determine whether read / write operations are allowed or prohibited for the tape region to which the address in the permission request from the controller 240 belongs, and also to determine whether read / write operations are allowed or prohibited for the tape region currently being accessed by the read / write head 230. The controller 250 is also used to store data protection policies for different regions of the tape 210. If a valid data protection policy corresponding to the tape region to which the address in the permission request belongs is stored, read / write operations are prohibited for that region; if a valid data protection policy corresponding to the tape region to which the address in the permission request belongs is not stored, read / write operations are allowed for that region.

[0080] For example, controller 250 queries a data protection policy based on the address in the permission request. If a valid data protection policy is found, controller 250 sends a permission response to controller 240. The permission response includes a permission identifier, which indicates that read / write operations are prohibited in the area of ​​the tape to which the address belongs. If no valid data protection policy is found, controller 250 sends a permission response to controller 240. The permission response includes a permission identifier, which indicates that read / write operations are permitted in the area of ​​the tape to which the first address belongs.

[0081] The permission identifier can use a first value to indicate that read / write operations are allowed in the tape region corresponding to the address, and a second value to indicate that read / write operations are prohibited in the tape region corresponding to the address. The first and second values ​​can be different; for example, the first value can be 0 and the second value can be 1, or the first value can be 1 and the second value can be 0.

[0082] Please participate Figure 3 As an optional implementation, the tape drive device 200 also includes: a read / write circuit 260 and a position recognition sensor 270.

[0083] The read / write circuit 260 is used to control the magnetic head 230 to perform read / write operations on the magnetic tape 210 according to the control commands sent by the controller 240.

[0084] The read / write circuit 260 includes an independent physical circuit read / write switch, which controls the read / write operation of the magnetic head 230. The state of the read / write switch is controlled only by the controller 250, or the controller 250 has the highest management authority over the read / write switch.

[0085] In the embodiments of this application, the read / write circuit 260 has various types, and correspondingly, the control of the magnetic head 230 to perform read / write operations on the magnetic tape 210 also has various methods. Exemplary examples are described below.

[0086] For example, the read / write circuit 260 is a hardware circuit structure deployed on the magnetic head 230. When the position recognition sensor 270 detects that the magnetic head 230 has a data protection policy area on the magnetic tape 210, the controller 250 sends a shutdown signal to the read / write circuit 260. The shutdown signal instructs the read / write switch of the read / write circuit 260 to be turned off, thereby preventing the magnetic head 230 from starting and achieving the effect of prohibiting read / write operations on the area corresponding to the data protection policy.

[0087] For example, the read / write circuit 260 is a hardware circuit structure deployed on the connection circuit between the magnetic head 230 and the controller 240. When the position recognition sensor 270 detects that the magnetic head 230 has a data protection policy area on the magnetic tape 210, the controller 250 sends a shutdown signal to the read / write circuit 260. The shutdown signal instructs the read / write switch of the read / write circuit 260 to turn off, thereby closing the connection circuit between the magnetic head 230 and the controller 240, thus preventing the magnetic head 230 from being driven, achieving the effect of prohibiting read / write operations on the area corresponding to the data protection policy.

[0088] The position recognition sensor 270 is used to detect the relative position of the magnetic head 230 and the magnetic tape 210. For example, the position recognition sensor 270 can obtain the movement distance of the tape body of the magnetic head 230, thereby determining the relative position of the magnetic head 230 and the magnetic tape 210 based on the initial position of the magnetic head 230 and the magnetic tape 210 and the movement distance of the tape body.

[0089] In the embodiments of this application, the position recognition sensor 270 has various types, and correspondingly, there are also various ways to obtain the moving distance of the belt.

[0090] For example, the position identification sensor 270 includes a Hall encoder or photoelectric encoder; the Hall encoder or photoelectric encoder is sleeved on the drum 201. Also for example, the position identification sensor 270 includes an angle sensor for determining the travel distance of the tape body based on the angle of rotation of the drum 201. Also for example, the position identification sensor 270 includes a thickness sensor. The thickness sensor is used to determine the travel distance of the tape body based on the thickness of the tape body wound on the drum. Also for example, the position identification sensor 270 includes an encoding strip and a detection component. The detection component is used to determine the travel distance of the tape body based on the encoding recorded on at least two of the plurality of strips. Also for example, in a contact addressing scheme, the position identification sensor 270 may be disposed on the magnetic head 230, and the current position information of the magnetic tape 210 read from the magnetic head 230 may be present.

[0091] In the above embodiments of this application, the structure of the tape drive device 200 is merely illustrative and does not limit the implementation of the tape drive device 200. For example, the controller 250 can be located inside the tape drive device 200 or in an external chip electrically connected to the tape drive device 200. Furthermore, the controllers 240 and 250 can be data processed by separate chips or by a microcontroller, etc.

[0092] The following example illustrates how controllers 240 and 250 execute the data access method provided in the embodiments of this application.

[0093] Figure 4a A flowchart illustrating a data access method provided in this application Figure 1 This data access method can be applied to the above. Figure 2 or Figure 3 The tape drive device 200 shown can also be applied to, including, other data access methods. Figure 2 or Figure 3 The illustrated tape drive device 200 includes a database or storage system, etc.

[0094] In this embodiment, the controller 250 stores data protection policies for different areas of the magnetic tape 210. Please refer to... Figure 4a The data access method provided in this application embodiment may include the following steps 401a-407a.

[0095] Step 401a: Controller 240 obtains the first data access request.

[0096] For example, the first data access request is sent to the controller 240 in the tape drive device 200 by another device, such as the data access device 100 in the aforementioned embodiment. Corresponding to step 401a above, the data access device 100 sends the first data access request to the controller 240.

[0097] For example, the first data access request is generated by the controller 240 based on applications or tasks running in the tape drive device 200.

[0098] The above-mentioned method for obtaining the first data access request is only an optional method provided by the embodiments of this application and should not be construed as a limitation of this application.

[0099] The first data access request includes: a first address.

[0100] The first data access request can be either a data read request or a data write request. If the first data access request is a data write request, the first address is the address of the data area where the first data is written. If the first data access request is a data read request, the first address is the address of the storage area of ​​the first data in tape 210.

[0101] For example, the first address is a logical address. The controller 240 can obtain the physical address corresponding to the logical address based on the logical address and the address mapping table of the tape drive device 200. The physical address indicates the storage location of the first data on the tape.

[0102] For example, the first address is a physical address. This physical address indicates the storage location of the first data on the magnetic tape.

[0103] The above two examples are merely optional methods for the first address provided in this embodiment and should not be construed as limiting this application. In some optional methods, the first address may also refer to the key obtained by mapping a logical address, such as using the logical address of data as the value and performing a key-value mapping on that logical address, which is the first address.

[0104] Step 402a: Controller 240 sends a first permission request to controller 250.

[0105] The first permission request includes: the first address.

[0106] Optionally, the first permission request can be a read operation request or a write operation request. That is, the read / write operation corresponding to the first permission request can be a read / write operation, or it can be regarded as the first permission request carrying a read / write operation type.

[0107] Step 403a: Controller 250 receives the first permission request sent by controller 240.

[0108] Step 404a: Controller 250 determines the first data protection policy corresponding to the first address.

[0109] The controller 250 determines whether a first data protection policy exists in the first region of the disk 210 to which the first address belongs, based on the first address.

[0110] As one possible implementation, the controller 250 stores data protection policies for different areas of the tape 210.

[0111] Optionally, the controller 250 stores a mapping table, and the first address in the mapping table of the controller 250 may have a corresponding first data protection policy.

[0112] As shown in Table 1, the mapping table may include a region address and a data protection policy identifier. The data protection policy identifier is used to indicate whether a data protection policy exists, and the address is used to indicate the region of tape 210 corresponding to the data protection policy.

[0113] Table 1

[0114] area address Data Protection Policy Identifier [0,99] 1 [100,199] 0 [200,499] 1 [500,608] 1 [609,1024] 0

[0115] For example, in Table 1, the storage area of ​​tape 210 includes a storage capacity of 1024 units. [0,99] represents the area of ​​tape 210 with addresses 0 to 99. The data protection policy identifier corresponding to [0,99] is 1, indicating that a data protection policy exists. [100,199] represents the area of ​​tape 210 with addresses 100 to 199. The data protection policy identifier corresponding to [100,199] is 0, indicating that no data protection policy exists. The data protection policy identifier can be any character such as letters or other numbers, and the unit of storage capacity can be bytes, bits, etc. The contents of other rows in Table 1 will not be described further here.

[0116] For example, the first permission request obtained by the controller 250 includes the first address [108,190]. The data protection policy identifier corresponding to [108,190] is found to be 0 in the mapping table, which determines that the first area to which the first address belongs does not have a first data protection policy.

[0117] For example, the first permission request obtained by controller 250 includes the first address [211,325]. The data protection policy identifier corresponding to [211,325] is found to be 1 in the mapping table, which determines that the first area to which the first address belongs has a first data protection policy.

[0118] For example, if the first permission request obtained by the controller 250 includes the first address [80,185], and the mapping table shows that the data protection policy identifier corresponding to [80,99] is 1 and the data protection policy identifier corresponding to [100,185] is 0, it is determined that the first area to which the first address belongs has a first data protection policy, while the other part does not have a first data protection policy.

[0119] In possible embodiments of this application, Table 1 may further include a validity identifier to indicate whether the data protection policy is valid. For example, the validity identifier may be a time limit, where the time limit is n time units or moments. If the generation time of the data protection policy is less than or equal to n time units or the current moment is less than or equal to that moment, it indicates that the data protection policy is valid.

[0120] In possible embodiments of this application, Table 1 may further include read / write operation type identifiers to indicate read / write operation types prohibited by the data protection policy. For example, a read / write operation type identifier of 'w' indicates that the data protection policy prohibits write operations. Another example is a read / write operation type identifier of 'r', indicating that the data protection policy prohibits read operations. Yet another example is a read / write operation type identifier of 'wr', indicating that the data protection policy prohibits both read and write operations.

[0121] The data protection policy in the controller 250 can be a data protection policy generated by the controller 240 for the data write area of ​​the write operation based on the data access request of the write operation, and sent to the controller 250 the data write area and the data protection policy, so that the controller 250 stores the data protection policy in the data write area.

[0122] For example, when the controller 240 obtains that the first data access request is a write operation, it sends a first data protection policy to the controller 250. The first data protection policy includes the data write area corresponding to the read / write operation of the first data access request. The controller 250 fills the data write area with the area address and sets the corresponding data protection policy flag to 1.

[0123] In addition, the first data protection policy sent by the controller 240 may also include a read / write operation type identifier and a validity identifier for the first data protection policy.

[0124] For example, controller 250 allows a data protection policy to be written only once for a region of the same tape 210, and does not allow it to be written again until the data protection policy expires.

[0125] Step 405a: Controller 250 sends a first permission response to controller 240 according to the first data protection policy.

[0126] The first permission response includes: the first permission identifier.

[0127] For example, the first area of ​​the tape 210 to which the first address belongs has an effective first data protection policy, and the first permission identifier in the first permission response is used to indicate that the first area of ​​the tape 210 to which the first address belongs is prohibited from reading / writing operations.

[0128] The first permission identifier can use different characters such as letters and numbers to represent whether read / write operations are allowed or prohibited. Taking Table 1 as an example, a valid first data protection policy can mean that the data protection policy identifier is not 0 (i.e., the first data protection policy is not empty), the corresponding first validity identifier indicates that the data protection policy is valid, and the read / write operation type identifier is the same as the read / write operation type of the first permission request.

[0129] For example, if there is no effective first data protection policy in the first area of ​​the tape 210 to which the first address belongs, the first permission identifier in the first permission response is used to indicate that the first area of ​​the tape 210 to which the first address belongs is allowed to perform read / write operations.

[0130] Taking Table 1 as an example, an invalid first data protection policy may mean that the data protection policy identifier is 0 (i.e., the first data protection policy is empty) or the corresponding first validity identifier indicates that the data protection policy is invalid, or the read / write operation type identifier is different from the read / write operation type of the first permission request.

[0131] Optionally, the first validity identifier may include time limit, sequence limit, permission limit, and / or access limit. For example, a time limit is used to invalidate a data protection policy whose generation time exceeds a preset time limit; a sequence limit is used to validate a data protection policy when the current data is accessed outside of a preset data access order; a permission limit is used to validate a data protection policy when the user does not have access rights to the current data; and an access limit is used to validate a data protection policy when the current data is accessed more than a preset number of times.

[0132] The permission restrictions can be determined by the controller 250 based on the key or other verification information that can verify the user's identity carried in the first permission request.

[0133] In this embodiment, the first permission identifier, in addition to the aforementioned time limit, sequence limit, permission limit, and access count limit, may also include any other restrictions or constraints that indicate the effectiveness of the first data protection policy. For example, the first permission identifier may also include access device restrictions, etc., which will not be elaborated here.

[0134] Step 406a: Controller 240 receives the first permission response sent by controller 250.

[0135] Step 407a: The controller 240 executes or refuses to execute the read / write operation corresponding to the first data access request based on the first permission identifier.

[0136] When the first permission identifier indicates that the first area of ​​the tape 210 to which the first address belongs is allowed to perform read / write operations, the controller 240 executes the read / write operation corresponding to the first data access request.

[0137] For example, the controller 240 sends a control instruction corresponding to the first data access request to control the magnetic head 230 and the tape drive 220, so that the magnetic head 230 accesses the data at the first address of the tape 210 and performs the corresponding read / write operation.

[0138] If the first permission identifier indicates that the first area of ​​the tape 210 to which the first address belongs is prohibited from reading / writing operations, the controller 240 prohibits (or does not execute) the read / write operation corresponding to the first data access request.

[0139] For example, if the controller 240 does not send the control command corresponding to the first data access request, the magnetic head 230 cannot access the data at the first address of the tape 210 to perform a read / write operation.

[0140] Since the data access method implemented by the controllers 240 and 250 can protect the read / write operations of the tape 210, and is not only able to prevent malicious tampering, the WORM in this embodiment can be extended to scenarios that restrict data reading.

[0141] Based on steps 401a-407a above, for each data access request, such as the first data access request, the controller 240 sends a permission request to the controller 250, enabling the controller 250 to determine whether it is allowed to perform the read / write operation corresponding to the data access request in the area of ​​the tape corresponding to that address, based on the address carried in the data access request. In this way, by having the controller 250 determine whether different areas of the tape storing different data are allowed to perform the read / write operation corresponding to the data access request for each data access request, flexible management of data access can be achieved based on the address carried in the data access request. This refines the granularity of data protection for the tape to different areas within the tape, improving the flexibility of WORM technology for tapes.

[0142] The above text combined Figure 4a The data access method provided in this application is illustrated using the interaction between controllers 240 and 250 in the tape drive device 230 as an example. The tape drive device 230 can also use a single controller to implement the data access method provided in this application. (The following is a continuation of the previous paragraph.) Figure 4b The following is an illustrative example of the data access method provided in the embodiments of this application, executed by the controller 240.

[0143] Figure 4b A flowchart illustrating a data access method provided in this application Figure 2 This data access method can be applied to the above. Figure 2 or Figure 3 The tape drive device 200 shown can also be applied to, including, other data access methods. Figure 2 or Figure 3 The illustrated tape drive device 200 includes a database or storage system, etc.

[0144] In this embodiment, the controller 240 stores data protection policies for different areas of the magnetic tape 210. Please refer to... Figure 4b The data access method provided in this application embodiment may include the following steps 401b-403b.

[0145] Step 401b: Controller 240 obtains the first data access request.

[0146] Please refer to the details of the first data access request. Figure 4a Step 401a shown will not be repeated here.

[0147] Step 402b: Controller 240 determines the first permission identifier based on the first data access request.

[0148] The first data access request includes: a first address.

[0149] The controller 240 determines the first data protection policy corresponding to the first address, and determines the first permission identifier according to the first data protection policy.

[0150] For details on how controller 240 determines the first data protection policy corresponding to the first address, please refer to [link / reference needed]. Figure 4a Step 404a shown will not be repeated here.

[0151] The first controller 240 determines the first permission identifier based on whether a valid first data protection policy exists.

[0152] For example, the first area of ​​the tape 210 to which the first address belongs has an effective first data protection policy, and the first permission identifier determined by the controller 240 is used to indicate that the first area of ​​the tape 210 to which the first address belongs is prohibited from reading / writing operations.

[0153] For example, if there is no effective first data protection policy in the first area of ​​the tape 210 to which the first address belongs, the first permission identifier determined by the controller 240 is used to indicate that the first area of ​​the tape 210 to which the first address belongs is allowed to perform read / write operations.

[0154] Please refer to the details of the above permission identifiers. Figure 4a The relevant descriptions in step 405a shown will not be repeated here.

[0155] Step 403b: Controller 240 executes or denies the read / write operation corresponding to the first data access request based on the first permission identifier.

[0156] For details regarding whether controller 240 executes or denies the read / write operation corresponding to the first data access request, please refer to [link / reference needed]. Figure 4a Step 407a shown will not be repeated here.

[0157] To make the beneficial effects of the data access method provided in the embodiments of this application clearer, the following will be discussed... Figure 5 and Figure 6 Based on this, the correspondence between the data protection strategy stored in the controller 250 and the data storage area on the tape 210 is explained.

[0158] like Figure 5 As shown, the area on tape 210 corresponding to the area where a data protection policy (or a valid data protection policy) exists ( Figure 5 (represented by padding) and areas where no data protection policy exists ( Figure 5 (The blank space in the middle represents the block), and it can be set in blocks.

[0159] like Figure 6 As shown, the area on tape 210 corresponding to the area where a data protection policy (or a valid data protection policy) exists ( Figure 6 (represented by padding) and areas where no data protection policy exists ( Figure 6 (The blank space represents the text), and you can also mix and match settings.

[0160] The segmented or mixed configuration of the aforementioned regions can be determined by the granularity of the regions corresponding to the data protection policies. For example, when the granularity of the regions corresponding to the data protection policies is small, the regions on tape 210 corresponding to the presence and absence of data protection policies are considered a mixed configuration. Conversely, when the granularity of the regions corresponding to the data protection policies is large, the regions on tape 210 corresponding to the presence and absence of data protection policies are considered segmented configurations.

[0161] The different areas on the magnetic tape 210 are not distinguished by material or stored data, but are determined by the data protection strategy stored in the controller 250.

[0162] Depend on Figure 5 and Figure 6As can be seen, the data access method provided in this application can divide the magnetic tape into regions with different granularities of data protection strategies, enabling the magnetic tape 210 to simultaneously store and manage multiple WORM data blocks and multiple non-WORM data blocks, thereby enabling partitioned WORM protection of the data on the magnetic tape 210 and improving the flexibility of WORM protection of the magnetic tape.

[0163] The data access method provided in this application has been described above with reference to the accompanying drawings. This data access method can determine whether the read / write operation corresponding to the external I / O request of the tape drive device 200 is allowed to be executed, and can realize read / write protection of the tape 210 at the operation instruction level of the tape drive device 200. To further improve the security of read / write protection of the tape 210, this application embodiment also provides a method for implementing read / write protection of the tape 210 at the hardware level. Please refer to... Figure 7 The data access method provided in this application embodiment may further include the following steps 701-704.

[0164] Step 701: Controller 250 acquires location information.

[0165] For example, the controller 250 receives position information from the position identification sensor 270. The position information is used to indicate the relative position of the magnetic head 230 and the magnetic tape 210. Correspondingly, after detecting the relative position of the magnetic head 230 and the magnetic tape 210, the position identification sensor 270 sends the position information to the controller 250.

[0166] Step 702: The controller 250 determines that the magnetic head 230 is located in the second region of the magnetic tape 210 based on the position information.

[0167] The controller 250 determines, based on the relative position of the magnetic head 230 and the magnetic tape 210 indicated by the position information, that the address currently being read or written by the magnetic head 230 is located in the second region of the magnetic tape 210.

[0168] For example, the controller 250 determines the second region of the magnetic tape 210 corresponding to the magnetic head 230 indicated by the position information based on the correspondence between the storage address of the data on the magnetic tape 210 and the physical location of the data on the tape body.

[0169] Step 703: Controller 250 determines the second data protection strategy corresponding to the second area.

[0170] For example, the controller 250 determines the data protection policy corresponding to the second region in the same way as in step 404 above, and will not be described again here.

[0171] Step 704: If the second data protection policy is effective, the controller 250 prohibits read / write operations in the second area.

[0172] For example, if the second data protection strategy is effective, the controller 250 sends a shutdown signal to the read / write circuit 260 to instruct the read / write circuit 260 to be powered off, thereby preventing read / write operations in the second area.

[0173] Based on steps 701-704 above, when the data protection policy for the area where the magnetic head is performing a read / write operation prohibits the corresponding read / write operation, the read / write circuit is powered off, thus preventing the magnetic head from accessing data on the magnetic tape through hardware control. In this way, the data access method provided by this application combines the flexibility of data management with the security of physical protection of magnetic tape data.

[0174] This application also provides a magnetic tape system. The magnetic tape system includes: a communication interface, a storage controller, and the magnetic tape media storage provided in any of the foregoing embodiments. The magnetic tape media storage is used to store data, and the communication interface is used to receive data access requests; the storage controller is used to manage target magnetic tape media storage in the magnetic tape system according to data access requests (such as read requests or write requests). The magnetic tape system is, for example, a magnetic tape library, or a computer / server that includes magnetic tape media storage as a persistent storage medium.

[0175] The storage controller includes one or more processors, which can be a very large-scale integrated circuit. The processor contains an operating system and other software programs, enabling it to access the magnetic tape media storage and various PCIe devices. The processor includes one or more processor cores. These cores can be, for example, a central processing unit (CPU) or other ASICs. The processor can also be other general-purpose processors, DSPs, ASICs, FPGAs, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. In practical applications, the magnetic tape system may also include multiple controllers.

[0176] Optionally, the tape system may also include, but is not limited to, other storage media: dynamic random access memory (DRAM), static random access memory (SRAM), etc., for caching data in the tape media memory for processor processing. Additionally, other storage media can also be read-only memory (ROM). For example, read-only memory can be programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), etc. This embodiment does not limit the number or type of other storage media. Furthermore, other storage media can be configured to have power-saving functionality. Power-saving functionality means that when the system experiences a power outage and is then powered on again, the data stored in the memory will not be lost. Storage media with power-saving functionality are called non-volatile memory.

[0177] This application also provides a controller. For example... Figure 8 As shown, the controller 800 includes a chip 810 and a communication interface 820. The communication interface 820 is used to receive data access requests. The chip 810 is used to process data access requests, issue instructions through the communication interface 820, and store data such as data protection policies.

[0178] The controller 800 may include one or more chips 810, which may be an integrated circuit. The chip 810 contains an operating system and other software programs, enabling it to access magnetic tape media storage and various PCIe devices. The chip 810 includes one or more cores.

[0179] Optionally, the controller 800 may also include, but is not limited to, other storage media such as DRAM and SRAM for caching data from the magnetic tape storage medium for processing by the chip 810. Other storage media may also be ROM. For read-only memory, for example, it could be PROM or EPROM. This embodiment does not limit the number or type of other storage media. Furthermore, other storage media can be configured to have power-saving functionality. Power-saving functionality means that when the system experiences a power outage and is then powered on again, the data stored in the memory will not be lost. Storage media with power-saving functionality are called non-volatile memory.

[0180] For example, controller 800 can be used to implement such Figure 4a or Figure 4b The functions of controller 240 or controller 250 in the data access method shown.

[0181] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Various equivalent modifications or substitutions can be conceived within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A data access method, characterized in that, Applied to a tape drive device, the tape drive device including a first controller, the method being executed by the first controller, the method comprising: Obtain a first data access request; the first data access request includes a first address; A first permission identifier is determined based on the first data access request; the first permission identifier is used to indicate whether read / write operations are allowed or prohibited in the first area of ​​the tape to which the first address belongs; The read / write operation corresponding to the first data access request will be executed or denied based on the first permission identifier.

2. The method according to claim 1, characterized in that, The step of executing or denying the read / write operation corresponding to the first data access request based on the first permission identifier includes: If the first permission identifier is a first value, execute the read / write operation corresponding to the first data access request; If the first permission identifier is the second value, the read / write operation corresponding to the first data access request is refused; the first value and the second value are different.

3. The method according to claim 1 or 2, characterized in that, The tape drive device further includes a second controller connected to the first controller, and the step of determining the first permission identifier based on the first data access request includes: A first permission request is sent to the second controller based on the first address; the first permission request includes the first address. Receive a first permission response sent by the second controller in accordance with the first permission request; the first permission response includes the first permission identifier; Determine the first permission identifier in the first permission response.

4. The method according to claim 2, characterized in that, The first controller or the second controller stores a first data protection policy, which is used to indicate whether the first area allows or prohibits read / write operations. If the first area of ​​the tape to which the first address belongs has a valid first data protection policy, the first permission identifier is the second value; if the first area of ​​the tape to which the first address belongs does not have a valid first data protection policy, the first permission identifier is the first value. The first data protection policy includes a first validity identifier, which is used to indicate whether the first data protection policy is effective. The first validity identifier includes a time limit, a sequence limit, a permission limit, and / or an access limit.

5. The method according to claim 1, characterized in that, The method further includes: Receive position information; the position information is used to indicate the relative position of the magnetic head and the magnetic tape; Based on the location information, it is determined that the magnetic head is located in the second region of the magnetic tape; Determine the second data protection policy corresponding to the second region; the second data protection policy is used to indicate whether read / write operations are allowed or prohibited in the second region. If the second data protection policy is effective, read / write operations are prohibited in the second area.

6. The method according to claim 5, characterized in that, The tape drive device further includes read / write circuitry, and the prohibition of read / write operations in the second area includes: A shutdown signal is sent to the read / write circuit; the read / write circuit is used to control the magnetic head to perform read / write operations on the magnetic tape according to the data access instruction, and the shutdown signal is used to indicate that the read / write circuit is powered off.

7. A magnetic tape drive device, characterized in that, include: magnetic head; magnetic tape; A magnetic tape driver for driving the magnetic tape; A first controller is configured to acquire a first data access request; the first data access request includes a first address; and determine a first permission identifier based on the first data access request. The first permission identifier is used to indicate whether read / write operations are allowed or prohibited in the first area of ​​the tape to which the first address belongs; The read / write operation corresponding to the first data access request will be executed or denied based on the first permission identifier.

8. The magnetic tape drive device according to claim 7, characterized in that, The tape drive device further includes a second controller connected to the first controller, and the first controller is further configured to: send a first permission request to the second controller based on the first address; the first permission request includes the first address; and receive a first permission response sent by the second controller according to the first permission request. The first permission response includes the first permission identifier; Determine the first permission identifier in the first permission response.

9. The magnetic tape drive device according to claim 7 or 8, characterized in that, The first controller is specifically used for: If the first permission identifier is a first value, execute the read / write operation corresponding to the first data access request; If the first permission identifier is the second value, the read / write operation corresponding to the first data access request is refused; the first value and the second value are different.

10. The magnetic tape drive device according to claim 9, characterized in that, The first controller or the second controller stores a first data protection policy, which is used to indicate whether the first area allows or prohibits read / write operations. If the first area of ​​the tape to which the first address belongs has a valid first data protection policy, the first permission identifier is the second value; if the first area of ​​the tape to which the first address belongs does not have a valid first data protection policy, the first permission identifier is the first value. The first data protection policy includes a first validity identifier, which is used to indicate whether the first data protection policy is effective. The first validity identifier includes a time limit, a sequence limit, a permission limit, and / or an access limit.

11. The magnetic tape drive device according to claim 7, characterized in that, The first controller is also used for: Receive position information; the position information is used to indicate the relative position of the magnetic head and the magnetic tape; Based on the location information, it is determined that the magnetic head is located in the second region of the magnetic tape; Determine the second data protection strategy corresponding to the second region; The second data protection policy is used to indicate whether read / write operations are allowed or prohibited in the second zone; If the second data protection policy is effective, read / write operations are prohibited in the second area.

12. The magnetic tape drive device according to claim 11, characterized in that, The magnetic tape drive further includes a read / write circuit, and the first controller is further configured to: A shutdown signal is sent to the read / write circuit; the read / write circuit is used to control the magnetic head to perform read / write operations on the magnetic tape according to the data access instruction, and the shutdown signal is used to indicate that the read / write circuit is powered off.