CN110018785B - Method for executing data reading and writing in data migration between volumes and electronic device - Google Patents

Method for executing data reading and writing in data migration between volumes and electronic device Download PDF

Info

Publication number
CN110018785B
CN110018785B CN201810021349.1A CN201810021349A CN110018785B CN 110018785 B CN110018785 B CN 110018785B CN 201810021349 A CN201810021349 A CN 201810021349A CN 110018785 B CN110018785 B CN 110018785B
Authority
CN
China
Prior art keywords
volume
read
data
address
write
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810021349.1A
Other languages
Chinese (zh)
Other versions
CN110018785A (en
Inventor
李宝鉴
曹世强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Chuanyuan Information Technology Co Ltd
Original Assignee
Shanghai Chuanyuan Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Chuanyuan Information Technology Co ltd filed Critical Shanghai Chuanyuan Information Technology Co ltd
Priority to CN201810021349.1A priority Critical patent/CN110018785B/en
Publication of CN110018785A publication Critical patent/CN110018785A/en
Application granted granted Critical
Publication of CN110018785B publication Critical patent/CN110018785B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method and an electronic device for executing data reading and writing in data migration between volumes. The method comprises the following steps: blocking read and write actions on the first volume; switching the execution object of the read-write action to a brand-new second volume; releasing the read-write actions so that the read-write actions are executed for the second volume; and migrating the data of the first volume to the second volume, wherein in the migration process, if the second volume has the data, the content of the corresponding address in the first volume is not migrated to the second volume.

Description

Method for executing data reading and writing in data migration between volumes and electronic device
Technical Field
The present invention relates to a data reading and writing method, and more particularly, to a method and an electronic device for executing data reading and writing in inter-volume data migration.
Background
Generally, after the storage system completes the disk planning, the available space is fixed. Later, the development of thin provisioning (thin provisioning) technology made the use of storage more flexible. However, when the storage space is insufficient, it is still necessary to increase the storage space by a scale up (scale up) technique. However, when using the vertical expansion technique, the storage system needs to be temporarily stopped (shut down) to expand the hardware. However, another improved vertical expansion technique needs an upgrade time even if the storage system is upgraded by a dynamic addition without stopping the hardware of the storage system. During this upgrade period, the user is still unable to write data.
Disclosure of Invention
In view of the above, the present invention provides a method and an electronic apparatus for performing data read/write in data migration between volumes, which enable a user to still perform read/write operations during the data migration of the volumes, do not affect the user operations, and can be applied to the requirements of expanding storage space or backing up data.
The method for executing data reading and writing in the data migration among the volumes comprises the following steps: blocking read and write actions on the first volume; switching the execution object of the read-write action to a brand-new second volume; releasing the read-write actions so that the read-write actions are executed for the second volume; and migrating the data of the first volume to the second volume, wherein in the migration process, if the second volume has the data, the content of the corresponding address in the first volume is not migrated to the second volume.
The electronic device for executing data read-write in the data migration between volumes comprises: a storage module and a control module. The storage module comprises a plurality of volumes, and the volumes comprise a first volume and a second volume. The control module is electrically connected with the storage module and comprises a locking unit, an adjusting unit and an execution unit. The locking unit blocks read and write actions to the first volume. The adjustment unit switches the execution target of the read/write operation to a brand-new second volume. The execution unit executes the read and write actions. After the execution object of the read-write action is switched to the second volume, the locking unit releases the read-write action, so that the execution unit executes the read-write action on the second volume and migrates the data of the first volume into the second volume. In the migration process, if the second volume has data, the content of the corresponding address in the first volume is not migrated to the second volume.
In one embodiment, the read/write operation is a read operation, and the execution unit reads the read address of the second volume.
In an embodiment, if the data is not read at the read address of the second volume, the execution unit performs the address reading from the first volume corresponding to the read address.
In an embodiment, when the read/write operation is writing, the execution unit writes the data into the second volume at an address corresponding to the write address of the first volume.
In one embodiment, the first volume may be a clone volume of the original volume.
Drawings
Fig. 1 is a block diagram illustrating an electronic device for performing data reading and writing in data migration between volumes according to an embodiment of the present invention.
FIG. 2 is a first diagram illustrating data migration according to an embodiment of the present invention.
Fig. 3 is a flowchart illustrating a method of an electronic device for performing data reading and writing in data migration between volumes according to an embodiment of the present invention.
Fig. 4 is a schematic diagram (two) of data migration according to an embodiment of the present invention.
Fig. 5 is a schematic diagram (iii) of data migration according to an embodiment of the present invention.
Fig. 6 is a schematic diagram (iv) of data migration according to an embodiment of the present invention.
Fig. 7 is a schematic diagram (v) of data migration according to an embodiment of the present invention.
FIG. 8 is a block diagram of data migration according to an embodiment of the present invention.
Description of the symbols:
100 electronic device
120 storage module
121 storage device
140 control module
141 locking unit
142 adjusting unit
143 execution unit
PB1, PB2 physical Block
V1 first roll, first original roll
Volume V1' first clone
V2 second roll and second original roll
Volume V2' second clone
A. B, C, D, E, F, Z data
Detailed Description
Referring to fig. 1, a block diagram of an electronic device 100 for performing data reading and writing in data migration between volumes according to an embodiment of the invention is shown. The electronic device 100 includes a storage module 120 and a control module 140. The storage module 120 is electrically connected to the control module 140. The control module 140 includes a locking unit 141, an adjusting unit 142, and an executing unit 143.
In one embodiment, the electronic device 100 may be a computing device such as a personal computer, a notebook computer, a server, and the like. The storage module 120 may be a storage device such as a magnetic disk, a solid state disk, a magnetic disk Array, an All-Flash Array (All-Flash Array), and the like. The control module 140 is a processor that can execute a program code for implementing a method for reading and writing data in the data migration between volumes. The locking unit 141, the adjusting unit 142 and the executing unit 143 respectively execute different program segments for the processor to realize different functions.
Fig. 2 is a schematic diagram (a) of data migration according to an embodiment of the present invention. The storage module 120 includes a plurality of volumes, which are logical storage spaces. The roll is illustrated by a first roll V1 and a second roll V2. Here, the first volume V1 is a source volume and the second volume V2 is a target volume, that is, the data migration refers to migrating data of the first volume V1 to the second volume V2. The second volume V2 is a completely new volume, i.e., the second volume V2 is a newly established volume and has no data recorded, i.e., each address stores empty data. Here, the first volume V1 and the second volume V2 are located in different storage devices 121. However, in some embodiments, the first volume V1 and the second volume V2 may be located in the same storage device 121.
Fig. 3 is a flowchart illustrating a method of the electronic device 100 for performing data reading and writing in the inter-volume data migration according to an embodiment of the present invention. Referring to fig. 3, before migrating data, the locking unit 141 blocks the read/write actions of the user of the electronic device 100 with respect to the first volume V1 (step S301). Specifically, when detecting an instruction corresponding to a read/write operation, the lock unit 141 places the instruction in a queue (not shown) so that the read/write operation is not immediately executed. Herein, the read/write operation can be a read operation or a write operation.
Subsequently, the adjustment unit 142 switches the execution target of the read/write operation to the second volume V2 (step S302), as shown in fig. 4. Here, the switching of the execution target is not limited to the read/write operation, but includes the subsequent read/write operation of the first volume V1 by the user.
After the execution object is switched to the second volume V2, step S303 is executed, and the locking unit 141 releases the read/write action so that the read/write action is executed to the second volume V2.
Finally, in step S304, the execution unit 143 migrates the data of the first volume V1 into the second volume V2. For example, as shown in fig. 2, the first volume V1 stores data A, B, C, D, which is stored in the physical block PB1, and the physical block PB1 is a physical storage space. Here, the corresponding data sequence stored in the physical partition PB1 does not necessarily correspond to the data storage sequence in the first volume V1, for example: here, the storage data in the physical block PB1 is data B, A, D, C in sequence, which is different from the storage sequence of the data A, B, C, D in the first volume V1. Generally, the storage module 120 further stores a look-up table (not shown) for recording the data mapping relationship between the logical storage space and the physical storage space. Thus, the execution unit 143 can migrate, read, or write data in the logical storage space and the physical storage space.
Fig. 5 is a schematic diagram (iii) of data migration according to an embodiment of the present invention. If the user performs the write operation during the blocking period of step S301, after releasing the read/write operation in step S303, the execution unit 143 fetches the command corresponding to one or more read/write operations in the queue and executes the command on the second volume V2. That is, data is written at an address in the second volume V2 corresponding to the write address of the first volume V1. For example, data Z is written at the address of original data C.
In some embodiments, during the data migration, the execution unit 143 executes the operation of writing other data according to the newly received instruction, and writes the data to the execution target of the switched read/write operation (here, the second volume V2). In one embodiment, if the address to be written is empty, it means that the address corresponding to the first volume V1 is also empty or the data corresponding to the address of the first volume V1 has not been migrated, so that the data to be written can be directly written; if the address to be written has data, it represents that the migration has been performed, and the data to be written is overwritten at the address.
Fig. 6 is a schematic diagram (iv) of data migration according to an embodiment of the present invention. During the migration process, if the second volume V2 already has data, the content of the address corresponding to the already existing data in the first volume V1 is not migrated to the second volume V2. For example, new data Z already exists at the address where data C should originally be written to the second volume V2, and therefore, data C in the first volume V1 is not migrated to the second volume V2. On the other hand, if there is no address of data in the second volume V2, the data corresponding to the address in the first volume V1 is migrated to the second volume V2 (in this example, data A, B, D). Through the steps S301 to S304, the user is allowed to perform read/write operations during the data migration process, so that the user does not interrupt the operation behavior due to the data migration.
In one embodiment, after the step S304, the second volume V2 has all the data to be migrated from the first volume V1, so the execution unit 143 can delete the first volume V1.
In one embodiment, if the read/write operation is a read operation, the execution unit 143 reads the read address of the second volume V2 according to the received command. If no data is read at the read address of the second volume V2, it indicates that the data corresponding to the address of the first volume V1 has not been migrated or the address corresponding to the first volume V1 is empty, so the EU 143 to the first volume V1 reads the address corresponding to the read address. It should be noted that, although the execution unit 143 reads data from the first volume V1, the execution target of the read/write operation is not switched, and the subsequent read/write operation is still performed on the second volume. In another case, the execution unit 143 reads the data from the second volume V2 according to the received command, and the data may be migrated from the first volume V1 or newly written data, which is the latest data anyway, so that the correct data can be read.
In one embodiment, the volume may also contain an original volume and a clone volume of the original volume. Fig. 7 is a schematic diagram (v) illustrating data migration according to an embodiment of the present invention. The previous clone volume of first volume V1 (referred to herein as first original volume V1) is first clone volume V1 ', and first original volume V1 and first clone volume V1 ' share the same physical block PB1, i.e., first original volume V1 and first clone volume V1 ' have the same data, but only occupy a single copy of the data in physical block PB 1. Fig. 7 is a diagram for explaining that, in the process of migrating data (migration operation of data a is completed), if there is a new write command, data is written to the volume to be written according to the write command. Here, taking the example of writing the second original volume V2 as an example, the execution unit 143 writes the data E into the second original volume V2, and stores the data E corresponding to the physical block PB 2. The address corresponding to the second clone V2 'to which no data is written receives the data migration, and the data B stored in the first clone V1' at the corresponding address is also stored in the physical block PB 2. It can be seen that since the second address of the second original volume V2 is written with new data E, the second address of the second clone volume V2 'has no new data written, but stores data B migrated from the second address of the first clone volume V1'. Therefore, the second original volume V2 and the second address of the second clone volume V2' do not share the same physical address, and each of the physical blocks PB2 occupies an address for storing data.
Continuing to refer to fig. 8, a data migration diagram (vi) according to an embodiment of the present invention is shown. Another scenario in this example is the case where new data is written to the second clone volume V2' during migration. The execution unit 143 writes the data F to the second clone volume V2', which is stored corresponding to the physical block PB 2. The address corresponding to the second original volume V2, to which no data is written, receives the data migration, and the data C stored in the first original volume V1 at the corresponding address is also correspondingly stored in the physical block PB 2.
According to the method for executing data reading and writing in the data migration between the volumes and the electronic device, the data migration can be simultaneously carried out under the condition that the operation of a user is not influenced. Incidentally, although the user 'S read/write operation is temporarily blocked between step S301 and step S302, the time taken for the user is only a few milliseconds, and the user' S operation is not affected.

Claims (10)

1. A method for executing data read-write in data migration between volumes is characterized by comprising the following steps:
blocking read and write actions on the first volume;
switching the executing object of the read-write action to a brand new second volume, wherein the second volume comprises an original volume and a clone volume;
releasing the read-write action so that the read-write action is executed on the original volume or the clone volume of the second volume; and
and migrating the data of the first volume to the original volume or the clone volume of the second volume, wherein in the migration process, if the corresponding address of one of the original volume and the clone volume of the second volume has data, the content of the corresponding address in the first volume is migrated to the corresponding address of the other of the original volume and the clone volume.
2. The method of claim 1, wherein the read/write operation is a read operation, and the read address of the second volume is read.
3. The method as claimed in claim 2, wherein if no data is read from the read address of the second volume, reading the address corresponding to the read address from the first volume.
4. The method according to claim 1, wherein when the read/write operation is writing, the data is written into the second volume at an address corresponding to the write address of the first volume.
5. The method for performing data read/write in inter-volume data migration according to claim 1, wherein the first volume is a clone volume of an original volume.
6. An electronic device for performing data reading and writing in data migration between volumes, comprising:
a storage module comprising a plurality of volumes, the volumes comprising a first volume and a second volume; and
a control module electrically connected to the storage module, the control module comprising:
a locking unit for blocking the read-write action of the first volume;
the adjusting unit switches the execution object of the read-write action to a brand-new second volume, wherein the second volume comprises an original volume and a clone volume; and
the execution unit executes the read-write action;
after the execution object of the read-write action is switched to the second volume, the locking unit releases the read-write action, so that the execution unit executes the read-write action on the original volume or the clone volume of the second volume, and migrates the data of the first volume into the corresponding address of the original volume or the clone volume of the second volume.
7. The electronic device for performing data reading and writing in data migration between volumes as claimed in claim 6, wherein the execution unit reads the read address of the second volume when the reading and writing operation is performed as reading.
8. The electronic device for performing data reading and writing during inter-volume data migration according to claim 7, wherein if no data is read at the read address of the second volume, the execution unit reads the address corresponding to the read address from the first volume.
9. The electronic device for performing data reading and writing in data migration between volumes as claimed in claim 6, wherein when the reading and writing action is writing, the execution unit writes data in the second volume at an address corresponding to the write address of the first volume.
10. The electronic device for performing data reading and writing in data migration between volumes as claimed in claim 6, wherein the first volume is a clone volume of an original volume.
CN201810021349.1A 2018-01-10 2018-01-10 Method for executing data reading and writing in data migration between volumes and electronic device Active CN110018785B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810021349.1A CN110018785B (en) 2018-01-10 2018-01-10 Method for executing data reading and writing in data migration between volumes and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810021349.1A CN110018785B (en) 2018-01-10 2018-01-10 Method for executing data reading and writing in data migration between volumes and electronic device

Publications (2)

Publication Number Publication Date
CN110018785A CN110018785A (en) 2019-07-16
CN110018785B true CN110018785B (en) 2022-04-15

Family

ID=67187923

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810021349.1A Active CN110018785B (en) 2018-01-10 2018-01-10 Method for executing data reading and writing in data migration between volumes and electronic device

Country Status (1)

Country Link
CN (1) CN110018785B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1624670A (en) * 2003-12-03 2005-06-08 华为技术有限公司 Method of local data migration
CN104182184A (en) * 2014-08-27 2014-12-03 浪潮电子信息产业股份有限公司 Distributed block storing and cloning method
CN105549904A (en) * 2015-12-08 2016-05-04 华为技术有限公司 Data migration method applied in storage system and storage devices
CN106469084A (en) * 2016-08-30 2017-03-01 华为技术有限公司 A kind of link clone's parent roll management method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009211132A (en) * 2008-02-29 2009-09-17 Hitachi Ltd Storage system and data migration method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1624670A (en) * 2003-12-03 2005-06-08 华为技术有限公司 Method of local data migration
CN104182184A (en) * 2014-08-27 2014-12-03 浪潮电子信息产业股份有限公司 Distributed block storing and cloning method
CN105549904A (en) * 2015-12-08 2016-05-04 华为技术有限公司 Data migration method applied in storage system and storage devices
CN106469084A (en) * 2016-08-30 2017-03-01 华为技术有限公司 A kind of link clone's parent roll management method and device

Also Published As

Publication number Publication date
CN110018785A (en) 2019-07-16

Similar Documents

Publication Publication Date Title
US8863123B2 (en) Apparatus and method for virtualizing input/output devices using shared memory in host-based mobile terminal virtualization environment
US20120117555A1 (en) Method and system for firmware rollback of a storage device in a storage virtualization environment
US20110213954A1 (en) Method and apparatus for generating minimum boot image
US8650339B2 (en) Control of data transfer
US20080114923A1 (en) Apparatus and method for controlling operation processing in nonvolatile memory
JP2004127274A (en) Raid controller and data storage system management method
CN111989656A (en) Configurable recovery state
US9983826B2 (en) Data storage device deferred secure delete
US8327041B2 (en) Storage device and data transfer method for the same
US10152278B2 (en) Logical to physical sector size adapter
CN111158858B (en) Cloning method and device of virtual machine and computer readable storage medium
KR20080045833A (en) Method of controlling flash memory and flash memory system using the same
KR20170037017A (en) Memory Upgrade System And Method
KR20130090526A (en) Apparatus and method for memory overlay
US10761892B2 (en) Method and electronic device for executing data reading/writing in volume migration
KR20080066381A (en) Method for upgrading software
US9015385B2 (en) Data storage device and method of controlling data storage device
CN110018785B (en) Method for executing data reading and writing in data migration between volumes and electronic device
CN110531925B (en) Data reading method and device, electronic equipment and machine-readable storage medium
US20140059291A1 (en) Method for protecting storage device data integrity in an external operating environment
CN111868698B (en) Free space through
CN110704091A (en) Firmware upgrading method and device
JP2008129967A (en) Volume transition program and method
JP7522775B2 (en) Non-volatile storage partition identifier
US8918582B2 (en) Simulating EEPROM in virtual distributed switches

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200213

Address after: No. 5, 237, 1 Datong Road, Taiwan, Xinbei City, Xinbei City, China

Applicant after: INNODISK Corp.

Address before: Taiwan, Taipei, China, Nanhai District, 6 East section 465, 10

Applicant before: AccelStor, Inc.

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200611

Address after: 04-95, Fanglin building, 531a, upper section of Klaus street, Singapore

Applicant after: Jieding Singapore Pte Ltd

Address before: No. 5, 237, 1 Datong Road, Taiwan, Xinbei City, Xinbei City, China

Applicant before: INNODISK Corp.

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200810

Address after: Building C, No. 888, Huanhu West 2nd Road, Lingang New Area, Pudong New Area (Shanghai) pilot Free Trade Zone

Applicant after: Shanghai Chuanyuan Information Technology Co., Ltd

Address before: Fong Lam building, 531a upper cross street, Singapore 051531

Applicant before: Jieding Singapore Pte Ltd

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant