A LUN conversion method, system and device
By creating an identity set and modifying the mapping table between the storage device and the application server, the problem of inflexible space planning of Thick LUN is solved, and the conversion of Thick LUN to Thin LUN is realized, avoiding the need for additional storage space and data migration, and improving Improve resource utilization and conversion efficiency.
Patent Information
- Application Number
- CN202111143957.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-28
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2041-09-28
AI Technical Summary
Thick LUN is not flexible enough in space planning, making it difficult to accurately determine capacity requirements, resulting in space waste or frequent expansion.
By creating the first identification set between the storage device and the application server, the identifier set records the physical storage unit of the data that has been written in Thick Lun, and the storage device replaces the first mapping table as the second mapping table, and only record the written data that has been written into the data The mapping relationship, and modify the THICK LUN's I/O processing to Thin Lun, to realize the conversion of Thick Lun into Thin Lun.
There is no need to create THIN LUN without additional storage space, avoiding the data migration process, significantly reduced conversion time and resource consumption.
Smart Images

Figure CN113886285B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer storage technology, and in particular to a LUN conversion method, system and device. Background Art
[0002] LUN (Logical Unit Number) is a storage unit created on a storage device that can be assigned to an application server for independent use. The space of a LUN comes from the storage pool, and the space of the pool comes from the hard disks that make up the disk array. From the perspective of an application server, a LUN can be regarded as a usable hard disk.
[0003] Thick LUN is a traditional non-thin LUN, a type of LUN that supports virtual resource allocation and can be created and expanded in a relatively simple way. After the creation of a Thick LUN, the full amount of storage space will be allocated from the storage pool, that is, the size of the LUN is exactly equal to the allocated storage space.
[0004] Thin LUN is a streamlined LUN, which is also a type of LUN. It supports virtual resource allocation and can be created, expanded, and compressed in a simple way. When creating a Thin LUN, you can set an initial allocation capacity. After the creation is completed, the storage pool Pool will only allocate storage space of this initial capacity to the Thin LUN, and will not immediately allocate the remaining storage space. When the usage rate of the storage space allocated to the Thin LUN reaches the threshold, the storage system will allocate a certain amount of storage space from the Pool to the Thin LUN. This process is repeated until the full capacity initially set for the Thin LUN is reached.
[0005] Currently, Thick LUN is still the most widely used. The biggest problem in using Thick LUN is that the space planning is not flexible enough. That is, Thick LUN initially allocates full storage space, and it is very difficult to accurately determine the capacity requirement of Thick LUN. If the capacity is too large, it will cause space waste. If the capacity is too small, it will need to expand the Thick LUN frequently.
[0006] Using Thin LUN can solve the above problems. When a Thick LUN that has already deployed services needs to be converted to a Thin LUN, the current available solution is to create a new Thin LUN, then migrate the data in the Thick LUN to the Thin LUN on the application server, run the services on the Thin LUN, and then delete the Thick LUN to free up space.
[0007] The entire conversion process requires additional storage space to create a Thin LUN, and the entire process involves data migration, which takes a certain amount of time. Summary of the invention
[0008] In order to overcome the problems existing in the related art, this specification provides a LUN conversion method, system and device.
[0009] According to a first aspect of the present application, a LUN conversion method is provided, the method comprising:
[0010] The storage device sends a conversion request of the target Thick LUN to the application server, wherein the target Thick LUN includes a first mapping table, and the first mapping table sequentially records the mapping relationship between the logical address and the physical address corresponding to the physical storage unit in the target Thick LUN;
[0011] After receiving the conversion request, the application server creates a first identification set, where each first identification in the first identification set corresponds to a physical storage unit in the target thick LUN, and the first identification is used to describe whether the corresponding physical storage unit has been written with data;
[0012] The application server sends the first identification set to the storage device;
[0013] After receiving the first identification set, the storage device replaces the first mapping table with a second mapping table according to the first identification set, wherein the second mapping table does not record the mapping relationship between the logical address and the physical address corresponding to the physical storage unit in which no data is written in the target thick LUN;
[0014] The storage device modifies the processing mode of the target Thick LUN for I / O into the processing mode of the Thin LUN for I / O, so that the target Thick LUN is converted into the Thin LUN.
[0015] According to a second aspect of the present application, a LUN conversion system is provided, the system comprising a storage device and an application server:
[0016] The storage device sends a conversion request of the target Thick LUN to the application server, wherein the target Thick LUN includes a first mapping table, and the first mapping table sequentially records the mapping relationship between the logical address and the physical address corresponding to the physical storage unit in the target Thick LUN;
[0017] After receiving the conversion request, the application server creates a first identification set, where each first identification in the first identification set corresponds to a physical storage unit in the target thick LUN, and the first identification is used to describe whether the corresponding physical storage unit has been written with data;
[0018] The application server sends the first identification set to the storage device;
[0019] After receiving the first identification set, the storage device replaces the first mapping table with a second mapping table according to the first identification set, wherein the second mapping table does not record the mapping relationship between the logical address and the physical address corresponding to the physical storage unit in which no data is written in the target thick LUN;
[0020] The storage device modifies the processing mode of the target Thick LUN for I / O into the processing mode of the Thin LUN for I / O, so that the target Thick LUN is converted into the Thin LUN.
[0021] According to a third aspect of the present application, a LUN conversion device is provided, which is applied to a storage device, and includes:
[0022] A sending module, used for sending a conversion request of a target Thick LUN to an application server, so that after receiving the conversion request, the application server creates a first identification set, each first identification in the first identification set corresponds to a physical storage unit in the target Thick LUN, and the first identification is used to describe whether the corresponding physical storage unit has been written with data; and sends the first identification set to the storage device; the target Thick LUN contains a first mapping table, and the first mapping table sequentially records the mapping relationship between the logical address and the physical address corresponding to the physical storage unit in the target Thick LUN;
[0023] a replacement module, configured to replace the first mapping table with a second mapping table according to the first identification set after receiving the first identification set, wherein the second mapping table does not record a mapping relationship between a logical address and a physical address corresponding to a physical storage unit in which no data is written in the target thick LUN;
[0024] The modification module is used to modify the processing mode of the target Thick LUN on I / O to the processing mode of the Thin LUN on I / O, so that the target Thick LUN is converted into the Thin LUN.
[0025] According to a fourth aspect of the present application, a LUN conversion device is provided, which is applied to an application server, and includes:
[0026] A creation module, configured to create a first identification set after receiving a conversion request of a target Thick LUN, wherein the target Thick LUN includes a first mapping table, wherein the first mapping table sequentially records the mapping relationship between the logical address and the physical address corresponding to the physical storage unit in the target Thick LUN; each first identification in the first identification set corresponds to a physical storage unit in the target Thick LUN, and the first identification is used to describe whether the corresponding physical storage unit has been written with data;
[0027] A sending module is used to send the first identification set to the storage device, so that after the storage device receives the first identification set, the first mapping table is replaced by a second mapping table according to the first identification set, and the second mapping table does not record the mapping relationship between the logical address and the physical address corresponding to the physical storage unit in the target Thick LUN to which no data is written; and the processing method of the target Thick LUN for I / O is modified to the processing method of the Thin LUN for I / O, so that the target Thick LUN is converted into a Thin LUN.
[0028] The technical solution provided by the present application creates an identification set, uses the identification set to change the mapping table of the logical address and the physical address in the target Thick LUN, cancels the mapping relationship between the logical address and the physical address corresponding to the physical storage unit to which no data is written, and then changes the processing method of the target Thick LUN to the processing method of the Thin LUN to convert the target Thick LUN into a Thin LUN. Using the solution provided by the present application, a Thin LUN is generated based on the target Thick LUN, and there is no need to create an additional Thin LUN, so no additional storage space is required to create a Thin LUN; and the entire LUN conversion process does not involve the migration of data in the target Thick LUN, so the entire solution does not need to consume a lot of time required for data migration.
[0029] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present specification. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the specification and, together with the description, serve to explain the principles of the specification.
[0031] Figure 1 It is a flow chart of the conversion method of LUN of this application;
[0032] Figure 2 is an interactive diagram of an embodiment of a LUN conversion system of the present application;
[0033] Figure 3 It is a structural schematic diagram of a LUN conversion device applied to a storage device in the present application;
[0034] Figure 4 It is a structural schematic diagram of a LUN conversion device applied to an application server in the present application. DETAILED DESCRIPTION
[0035] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this specification. Instead, they are merely examples of devices and methods consistent with some aspects of this specification as detailed in the appended claims.
[0036] The terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit this specification. The singular forms "a", "the" and "the" used in this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0037] It should be understood that although the terms first, second, third, etc. may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0038] In response to the above problems, the present application provides a LUN conversion method, which can be applied to scenarios where a Thick LUN needs to be converted into a Thin LUN. For example, in a typical application scenario: a user creates multiple Thick LUNs with a capacity of 150TB. After a long period of time, only about 30TB is actually written to each Thick LUN, and a large part of the space on each Thick LUN does not store data, which wastes storage space. In order to solve the waste problem, according to the prior art, multiple Thin LUNs are newly created, the data in each Thick LUN is migrated to each Thin LUN, and then the business is run on the Thin LUN, and then the Thick LUN is deleted. It can be seen that the process of solving the problem in the prior art requires additional huge storage space to create a Thin LUN, and the process involves data migration, which takes a certain amount of time. Using the method of the present application, the Thick LUN can be converted into a Thin LUN without creating an additional Thin LUN, and does not involve data migration, reducing the time required for data migration. The entire process of converting the Thick LUN not only saves resources, but also saves time.
[0039] Of course, the above application scenarios are only used for illustrative purposes and should not be understood as limiting the present application.
[0040] In order to enable those skilled in the art to better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be described in detail below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field should fall within the scope of protection of this application.
[0041] See also Figure 1 , Figure 1 This is a flow chart of a LUN conversion method provided by the present application, comprising the following steps:
[0042] S101, the storage device sends a conversion request of a target Thick LUN to an application server, wherein the target Thick LUN includes a first mapping table, and the first mapping table sequentially records the mapping relationship between the logical address and the physical address corresponding to the physical storage unit in the target Thick LUN;
[0043] S102, after receiving the conversion request, the application server creates a first identification set, where each first identification in the first identification set corresponds to a physical storage unit in the target thick LUN, and the first identification is used to describe whether the corresponding physical storage unit has been written with data;
[0044] S103, the application server sends the first identification set to the storage device;
[0045] S104, after receiving the first identification set, the storage device replaces the first mapping table with a second mapping table according to the first identification set, wherein the second mapping table does not record the mapping relationship between the logical address and the physical address corresponding to the physical storage unit in the target thick LUN to which no data is written;
[0046] S105: The storage device modifies the I / O processing mode of the target Thick LUN to the I / O processing mode of the Thin LUN.
[0047] According to S101, for the target Thick LUN that needs to be converted to LUN, the storage device sends a conversion request for the target Thick LUN to the application server. The conversion request may carry the LUN identifier and physical storage unit block size of the target Thick LUN; wherein the physical storage unit block size may be specified by the user or predefined in the code, such as 8KB; the information carried in the above conversion request may also include other information, which is not limited in this application. The target Thick LUN contains a first mapping table. Since all logical addresses in the target Thick LUN have corresponding physical addresses, all logical addresses correspond to physical addresses one-to-one. The first mapping table sequentially records the mapping relationship between the logical address and the physical address corresponding to each physical storage unit in the target Thick LUN.
[0048] According to S102, after receiving the conversion request sent by the storage device, the application server creates a first identification set; each identification in the first identification set corresponds to a physical storage unit in the target Thick LUN, and the first identification is used to describe whether data has been written into the corresponding physical storage unit. In a specific embodiment, each first identification is a numerical value, and the value is 0 or 1; when the value of a first identification is 1, it indicates that data has been written into the physical storage unit corresponding to the first identification; when the value of a first identification is 0, it indicates that data has not been written into the physical storage unit corresponding to the first identification. After creating the first identification set, the application server will detect in real time whether there is newly written data stored in the physical storage unit in the target Thick LUN; if newly written data is generated during the detection process, the value of the first identification corresponding to the physical storage unit where the newly written data is stored needs to be updated to 1.
[0049] Of course, the first identifier can be set to other values, or the application server can set the first identifier set in other forms. The above is only a specific implementation method of the present application and is not intended to be a limitation of the present solution.
[0050] According to S103, after the application server creates and updates the first identification set, the application server sends the first identification set to the storage device. In a specific embodiment, after the application server creates and updates the first identification set, the application server suspends the I / O of the application server and sends the first identification set to the storage device. The application server suspends the I / O, which means that the application server cannot currently process input or output, which can prevent the application server from being unable to update the first identification set in real time when data is written during the transmission of the first identification set, thereby causing the first identification set to be inaccurate.
[0051] According to S104, after receiving the first identification set, the storage device replaces the first mapping table with the second mapping table according to the first identification set. In a specific embodiment, after receiving the first identification set, the storage device immediately saves the first identification set and returns a notification to the application server, and the notification is used for the storage device to notify the application server to restore I / O; after receiving the notification, the application server can also delete the first identification set on the application server to save storage space. Regardless of whether the storage device saves the first identification set successfully, the storage device will immediately notify the application server to restore I / O after receiving the first identification set, thereby shortening the time for the application server to suspend I / O and allowing the application server to resume normal operation as soon as possible; the first identification set can be saved in a dedicated storage space pre-allocated by the storage device, or it can be saved in memory, and this application does not limit this. In a specific embodiment, after receiving the first identification set, the storage device first initializes the first mapping table in the target ThickLUN, and then, based on the first identification set, filters out the mapping relationship between the logical address and the physical address corresponding to the physical storage unit to which the data has been written in the target Thick LUN, records it in the initialized first mapping table, and generates a second mapping table, which does not record the mapping relationship between the logical address and the physical address corresponding to the physical storage unit to which the data has not been written.
[0052] In a specific embodiment, it is assumed that the capacity of the target Thick LUN that needs to be converted to LUN is 200GB, that is, the mapping relationship between the logical address and the physical address corresponding to the 200GB physical storage unit in the target Thick LUN is recorded in the first mapping table of the target Thick LUN; and only 50GB of the physical storage unit in the target Thick LUN has data written into it. After receiving the first identification set, the storage device filters out the mapping relationship between the logical address and the physical address corresponding to the 50GB physical storage unit according to the record of the first identification set, records it in the initialized first mapping table, and generates a second mapping table, which does not record the mapping relationship between the logical address and the physical address corresponding to the 150GB physical storage unit in which no data is written.
[0053] In a specific embodiment, when the storage device generates the second mapping table, when the application server writes new data and stores it in the target Thick LUN, the storage device will update the first identification set in real time according to the newly written data, so that the first identification set can accurately indicate in real time whether each physical storage unit in the target Thick LUN has written data; the storage device updates the second mapping table in real time according to the first identification updated in real time. In a specific embodiment, when the target Thick LUN receives the newly written data, the storage device updates the first identification corresponding to the physical storage unit storing the newly written data, and records the mapping relationship between the logical address and the physical address corresponding to the physical storage unit storing the newly written data in the second mapping table.
[0054] In a specific embodiment, after receiving the first identifier set, the storage device creates a conversion state identifier, and the conversion state identifier is used to describe that the target Thick LUN is in a state of conversion. When the state identifier exists, it means that the target Thick LUN is in a conversion state. The state identifier can also be represented by a parameter value of 0 or 1. If the state identifier parameter value is 0, it means that the target Thick LUN is not in a conversion state, and if the state identifier parameter value is 1, it means that the target Thick LUN is in a conversion state.
[0055] The above description is only a specific implementation of the present application and is not intended to be a limitation of the present solution.
[0056] According to S105, after the storage device creates and updates the second mapping table, it modifies the target Thick LUN's I / O processing method to the Thin LUN's I / O processing method. After the modification is completed, the conversion of the target Thick LUN to the Thin LUN is completed. In a specific embodiment, after the storage device creates and updates the second mapping table, the target Thick LUN suspends I / O, and after the storage device modifies the target Thick LUN's I / O processing method to the Thin LUN's I / O processing method, the target Thick LUN resumes I / O. In a specific embodiment, if in the previous steps of the method of the present application, the storage device creates a conversion state identifier indicating that the target Thick LUN is in a conversion state when receiving the first mapping table, then in this step, after the storage device modifies the target Thick LUN's I / O processing method to the Thin LUN's I / O processing method, the storage device deletes the conversion state identifier.
[0057] The storage device modifies the target Thick LUN's I / O processing mode to the Thin LUN's I / O processing mode. After the modification, the target Thick LUN will process the input and output in accordance with the Thin LUN processing mode, and the target Thick LUN is converted into a Thin LUN. After the target Thick LUN is converted into a Thin LUN, the storage device determines whether the physical storage unit space in which data is not written in the physical storage unit having the mapping relationship between the logical address and the physical address reaches a threshold value according to the first identifier. If the threshold value is reached, the physical storage unit in which data is not written is released from the converted Thin LUN. In a specific embodiment, in a Thin LUN allocated with 100GB of physical space, the first identifier set can determine which physical storage units in the physical storage units corresponding to the 100GB physical space have no data written. If it is detected that the free physical space occupied by the physical storage units in which data is not written is 60GB, and exceeds the preset threshold value of the maximum free physical space of the Thin LUN, the threshold value is, for example, 20GB, then the Thin LUN releases the 40GB free physical space exceeding the threshold value. The method of releasing physical space of Thin LUN belongs to the conventional technical solution of Thin LUN and will not be elaborated in this application.
[0058] The above is only a specific implementation of the present application and is not intended to be a limitation of the present solution. It should be noted that, for those skilled in the art, several improvements and modifications can be made without departing from the principles of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.
[0059] The present application also provides a LUN conversion system. For an interactive diagram of an embodiment of the system in actual application, see Figure 2, the system includes a storage device 21 and an application server 22. In S201, the storage device 21 sends a conversion request of a target Thick LUN to the application server, the target Thick LUN includes a first mapping table, the first mapping table sequentially records the mapping relationship between the logical address and the physical address corresponding to the physical storage unit in the target Thick LUN. In S202, after receiving the conversion request of the target Thick LUN sent by the storage device 21, the application server 22 creates a first identification set, each first identification in the first identification set corresponds to a physical storage unit in the target Thick LUN, and the first identification is used to describe whether the corresponding physical storage unit has been written with data; and the application server 22 updates the first identification set in real time according to the real-time written data. In S203, after the application server 22 creates and updates the first identification set, it suspends I / O, and the application server 22 cannot process the input or output of the application server 22 during the period of suspending I / O. In S204, after the application server 22 suspends I / O, it sends the first identification set to the storage device 21. In S205, after receiving the first identification set sent by the application server 22, the storage device 21 saves the first identification set and immediately executes S206 to send a notification to the application server 22. In S207, after receiving the notification sent by the storage device 21, the application server 22 immediately resumes I / O and deletes the first identification set on the application server side. In S208, the storage device 21 initializes the first mapping table according to the received first identification set; and the storage device 21 can also create a conversion status identifier. When the conversion status identifier exists, it means that the target Thick LUN is in a conversion state. When the status identifier does not exist, it means that the target Thick LUN is not in a conversion state. In S209, the storage device 21 selects the physical storage units to which data has been written and the mapping relationship between the logical addresses and physical addresses corresponding to the physical storage units to which data has been written according to the first identification set, generates a second mapping table that does not include the mapping relationship between the logical addresses and physical addresses corresponding to the physical storage units to which data has not been written, and replaces the first mapping table; when generating the second mapping table, if there is new written data in the target Thick LUN, the first identification set is updated in real time according to the physical storage space of the new written data, and the second mapping table is updated in real time according to the first identification set updated in real time. In S210, after the storage device 21 generates the second mapping table, it suspends the I / O of the target Thick LUN, and the target Thick LUN cannot process the input or output of the target Thick LUN during the period when the I / O is suspended.In S211, after suspending the I / O of the target Thick LUN, the storage device 21 modifies the I / O processing mode of the target Thick LUN to the I / O processing mode of the Thin LUN, and the input and output processing of the modified target Thick LUN will be performed in accordance with the processing mode of the Thin LUN; and the storage device 21 deletes the conversion state parameter. In S212, after completing the operation in S211, the storage device 21 resumes the I / O of the target Thick LUN.
[0060] Furthermore, during the operation of the converted Thin LUN, the physical storage units that have been allocated but not used in the Thin LUN can be released according to the first identification set. The specific method of release belongs to the conventional technical solution of Thin LUN and will not be elaborated in this application.
[0061] See also Figure 3 The present application also provides a LUN conversion device, which is applied to a storage device:
[0062] The sending module 302 is used to send the conversion request of the target Thick LUN to the application server, so that after receiving the conversion request, the application server creates a first identification set, each first identification in the first identification set corresponds to a physical storage unit in the target Thick LUN, and the first identification is used to describe whether the corresponding physical storage unit has been written with data; and sends the first identification set to the storage device; the target Thick LUN includes a first mapping table, and the first mapping table sequentially records the mapping relationship between the logical address and the physical address corresponding to the physical storage unit in the target Thick LUN;
[0063] A replacement module 304 is used to replace the first mapping table with a second mapping table according to the first identification set after receiving the first identification set, wherein the second mapping table does not record the mapping relationship between the logical address and the physical address corresponding to the physical storage unit in the target thick LUN to which no data is written;
[0064] The modification module 306 is used to modify the processing mode of the target Thick LUN for I / O to the processing mode of the Thin LUN for I / O, so that the target Thick LUN is converted into a Thin LUN.
[0065] See also Figure 4 The present application also provides a LUN conversion device, which is applied to an application server:
[0066] A creation module 402 is used to create a first identification set after receiving a conversion request of a target Thick LUN, wherein the target Thick LUN includes a first mapping table, and the first mapping table sequentially records the mapping relationship between the logical address and the physical address corresponding to the physical storage unit in the target Thick LUN; each first identification in the first identification set corresponds to a physical storage unit in the target Thick LUN, and the first identification is used to describe whether the corresponding physical storage unit has been written with data;
[0067] The sending module 404 is used to send the first identification set to the storage device, so that after the storage device receives the first identification set, the first mapping table is replaced by a second mapping table according to the first identification set, and the second mapping table does not record the mapping relationship between the logical address and the physical address corresponding to the physical storage unit in the target Thick LUN to which data is not written; and the processing method of the target Thick LUN for I / O is modified to the processing method of the Thin LUN for I / O, so that the target Thick LUN is converted into a Thin LUN.
[0068] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.
[0069] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. A person of ordinary skill in the art can understand and implement it without paying creative labor.
[0070] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0071] Those skilled in the art will readily appreciate other embodiments of the specification after considering the specification and practicing the invention claimed herein. The specification is intended to cover any variations, uses or adaptations of the specification that follow the general principles of the specification and include common knowledge or customary techniques in the art that are not claimed in the specification. The specification and examples are to be considered exemplary only, and the true scope and spirit of the specification are indicated by the following claims.
[0072] It should be understood that the present description is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.
[0073] The above description is only a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this specification should be included in the scope of protection of this specification.
Claims
1. A method for converting a LUN, characterized in that: The method includes: The storage device sends a conversion request of the target Thick LUN to the application server, wherein the target Thick LUN includes a first mapping table, and the first mapping table sequentially records the mapping relationship between the logical address and the physical address corresponding to the physical storage unit in the target Thick LUN; After receiving the conversion request, the application server creates a first identification set, where each first identification in the first identification set corresponds to a physical storage unit in the target thick LUN, and the first identification is used to describe whether the corresponding physical storage unit has been written with data; The application server sends the first identification set to the storage device; After receiving the first identification set, the storage device replaces the first mapping table with a second mapping table according to the first identification set, wherein the second mapping table does not record the mapping relationship between the logical address and the physical address corresponding to the physical storage unit in which no data is written in the target thick LUN; The storage device modifies the processing mode of the target Thick LUN for I / O into the processing mode of the Thin LUN for I / O, so that the target Thick LUN is converted into the Thin LUN.
2. The method according to claim 1, characterized in that: The LUN conversion method further includes: The application server suspends I / O when sending the first set of identifiers to the storage device; The storage device notifies the application server to resume I / O when receiving the first identification set.
3. The method according to claim 1, characterized in that: After the storage device receives the first identification set and before the storage device changes the processing mode of the target thick LUN to the processing mode of the thin LUN to the I / O, the method further includes: When the application server writes data to the target Thick LUN, the storage device updates the first identifier of the physical storage unit where the data is written in real time.
4. The method according to claim 3, characterized in that: The second mapping table is updated in real time according to the first identifier that is updated in real time.
5. The method according to claim 1, characterized in that: After the storage device changes the processing mode of the target thick LUN to the processing mode of the thin LUN to the I / O, the method includes: The storage device determines whether the physical storage unit space where data is not written reaches a threshold value according to the first identification set, and if the threshold value is reached, releases the physical storage unit where data is not written from the converted Thin LUN.
6. The method according to claim 1, characterized in that: Also includes: After receiving the first identifier set, the storage device creates a status identifier for the target thick LUN, where the status identifier is used to describe that the target thick LUN is in a state of being converted; After the storage device modifies the processing mode of the target Thick LUN for IO to the processing mode of the Thin LUN for IO, the storage device deletes the state identifier.
7. The method according to claim 1, characterized in that: Also includes: Before the storage device modifies the processing mode of the target Thick LUN for I / O to the processing mode of the Thin LUN for I / O, the target Thick LUN suspends I / O; After the storage device modifies the I / O processing mode of the target Thick LUN to the I / O processing mode of the Thin LUN, the target Thick LUN resumes the I / O.
8. A LUN conversion system, characterized in that: The system includes a storage device and an application server: The storage device is used to send a conversion request of a target Thick LUN to an application server, wherein the target Thick LUN includes a first mapping table, and the first mapping table sequentially records a mapping relationship between a logical address and a physical address corresponding to a physical storage unit in the target Thick LUN; The application server is configured to, upon receiving the conversion request, create a first identification set, wherein each first identification in the first identification set corresponds to a physical storage unit in the target thick LUN, and the first identification is used to describe whether the corresponding physical storage unit has been written with data; and send the first identification set to the storage device; The storage device is also used to replace the first mapping table with a second mapping table after receiving the first identification set, according to the first identification set, wherein the second mapping table does not record the mapping relationship between the logical address and the physical address corresponding to the physical storage unit in the target Thick LUN to which no data is written; and to modify the processing mode of the target Thick LUN for I / O to the processing mode of the Thin LUN for I / O, so that the target Thick LUN is converted into a Thin LUN.
9. A LUN conversion device, applied to a storage device, characterized in that: The device includes: A sending module, used for sending a conversion request of a target Thick LUN to an application server, so that after receiving the conversion request, the application server creates a first identification set, each first identification in the first identification set corresponds to a physical storage unit in the target Thick LUN, and the first identification is used to describe whether the corresponding physical storage unit has been written with data; and sends the first identification set to the storage device; the target Thick LUN includes a first mapping table, and the first mapping table sequentially records the mapping relationship between the logical address and the physical address corresponding to the physical storage unit in the target Thick LUN; a replacement module, configured to replace the first mapping table with a second mapping table according to the first identification set after receiving the first identification set, wherein the second mapping table does not record a mapping relationship between a logical address and a physical address corresponding to a physical storage unit in which no data is written in the target thick LUN; The modification module is used to modify the processing mode of the target Thick LUN to the I / O into the processing mode of the Thin LUN to the I / O, so that the target Thick LUN is converted into the Thin LUN.
10. A LUN conversion device, applied to an application server, characterized in that: The device includes: A creation module, configured to create a first identification set after receiving a conversion request of a target Thick LUN, wherein the target Thick LUN includes a first mapping table, wherein the first mapping table sequentially records a mapping relationship between a logical address and a physical address corresponding to a physical storage unit in the target Thick LUN; each first identification in the first identification set corresponds to a physical storage unit in the target Thick LUN, and the first identification is used to describe whether data has been written to the corresponding physical storage unit; A sending module is used to send the first identification set to a storage device, so that after the storage device receives the first identification set, the first mapping table is replaced by a second mapping table according to the first identification set, and the second mapping table does not record the mapping relationship between the logical address and the physical address corresponding to the physical storage unit in the target Thick LUN to which no data is written; and the processing method of the target Thick LUN for I / O is modified to the processing method of the Thin LUN for I / O, so that the target Thick LUN is converted into a Thin LUN.
Citation Information
Patent Citations
LUN storage unit management method and device
CN107220184A
Storage-space configuration method based on Thin-LUN, data writing method based on Thin-LUN and storage device
CN107239412A