CN111930707A - Method and system for correcting drive letter of windows cloud migration - Google Patents

Method and system for correcting drive letter of windows cloud migration Download PDF

Info

Publication number
CN111930707A
CN111930707A CN202010666389.9A CN202010666389A CN111930707A CN 111930707 A CN111930707 A CN 111930707A CN 202010666389 A CN202010666389 A CN 202010666389A CN 111930707 A CN111930707 A CN 111930707A
Authority
CN
China
Prior art keywords
drive letter
windows
logical volume
logical
original
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.)
Granted
Application number
CN202010666389.9A
Other languages
Chinese (zh)
Other versions
CN111930707B (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.)
Jiangsu Anchao Cloud Software Co Ltd
Original Assignee
Jiangsu Anchao Cloud Software 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 Jiangsu Anchao Cloud Software Co Ltd filed Critical Jiangsu Anchao Cloud Software Co Ltd
Priority to CN202010666389.9A priority Critical patent/CN111930707B/en
Publication of CN111930707A publication Critical patent/CN111930707A/en
Application granted granted Critical
Publication of CN111930707B publication Critical patent/CN111930707B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • G06F16/1824Distributed file systems implemented using Network-attached Storage [NAS] architecture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1435Saving, restoring, recovering or retrying at system level using file system or storage system metadata
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44594Unloading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45575Starting, stopping, suspending or resuming virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Library & Information Science (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method and a system for correcting a drive letter of windows cloud migration, wherein the method comprises the following steps: acquiring a disk identifier corresponding to each logical volume in the original windows; recording the drive letter to a file system corresponding to the logical volume; when the original windows cloud is migrated to the target end, mounting the system partition of the original windows, starting a virtual machine of the target end, and when mounting each logical volume, acquiring a new disk identifier corresponding to the logical volume; judging whether the new drive letter is consistent with the drive letter recorded in the file system; and when the new drive letter is inconsistent with the drive letter recorded in the file system, unloading the logical volume, and re-mounting the logical volume according to the drive letter recorded in the file system until all the logical reel letters are corrected. By implementing the method and the device, the disorder of the drive letter after the windows cloud migration is automatically corrected without human intervention, the normal operation of the original application program is ensured, the drive letter correction efficiency is improved, the reliability is high, and the original application program is not influenced.

Description

Method and system for correcting drive letter of windows cloud migration
Technical Field
The invention relates to the technical field of data migration, in particular to a drive letter correction method and system for windows cloud migration.
Background
With the development of information technology, cloud migration, which refers to migration of an enterprise from a traditional platform to a cloud platform, becomes a new development trend, because compared with a traditional application platform, a cloud computing platform has the advantages of strong computing capability, storage capability, diversified services and high cost performance. Cloud migration may help users migrate X86 physical servers, or virtual machines, onto a private or public cloud. Because the cloud disk has the characteristic of data redundancy function, the migrated Windows system does not need to use a mirror image volume, namely a raid5 volume for data protection any more, so that only file system data need to be migrated when migrating the window system cloud, but since each file system is an independent cloud disk at the migrated target end, the disk identifier information recorded in the registry and the disk identifier of the cloud disk actually allocated may be inconsistent, and finally the target system disk identifier and the original system may be inconsistent, resulting in that the application program cannot be used.
For the above problems, in the prior art, the manual modification of the drive letter or the manual intervention of the application program is usually adopted to solve the problem, but the manual modification of the drive letter is complicated in a scene with many logical volumes, and has a large workload and low efficiency; and the mode of modifying the application program is to make the application program adapt to a new drive letter, and the mode has great modification difficulty when facing complex application programs. Therefore, a method for automatically correcting the drive letter in the windows cloud migration scene is urgently needed.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and a system for correcting a drive letter of windows cloud migration, so as to overcome the problems of low efficiency and great difficulty in solving the problem of confusion of the drive letter by using a manual intervention manner in the prior art.
The embodiment of the invention provides a drive letter correction method for windows cloud migration, which comprises the following steps: acquiring a disk identifier corresponding to each logical volume in the original windows; recording the drive letter to a file system corresponding to the logical volume; when an original windows cloud is migrated to a target end, mounting a system partition of the original windows, starting a virtual machine of the target end, and acquiring a new disk character corresponding to each logical volume when each logical volume is mounted; judging whether the new drive letter is consistent with the drive letter recorded in the file system; and when the new drive letter is inconsistent with the drive letter recorded in the file system, unloading the logical volume, and re-mounting the logical volume according to the drive letter recorded in the file system until all the logical reel letters are corrected.
Optionally, the method for modifying a drive letter migrated by a windows cloud further includes: acquiring the total number of the logical volumes in the original windows; and recording the total number to the system partition of the original windows.
Optionally, before obtaining a new drive corresponding to the logical volume, the method for correcting a drive of windows cloud migration further includes: judging whether the number of the mounted logical volumes is consistent with the total number; and when the number of the mounted logical volumes is consistent with the total number, acquiring a new drive letter corresponding to the logical volume.
Optionally, the method for modifying a drive letter migrated by a windows cloud further includes: and when the number of the mounted logical volumes is inconsistent with the total number, returning to the step of judging whether the number of the mounted logical volumes is consistent with the total number after a preset time interval until the mounting of all the logical volumes is finished.
Optionally, the method for modifying a drive letter migrated by a windows cloud further includes: when the original windows cloud is migrated to a target end, writing a repair mark into a preset modified drive letter service file, wherein the preset modified drive letter service file is a modified drive letter service installed in the original windows and is used for storing the repair mark.
Optionally, before obtaining a new drive corresponding to the logical volume, the method for correcting a drive of windows cloud migration further includes: judging whether the preset correction drive letter service file stores the repair mark or not; and when the repair mark is stored in the preset modified drive letter service file, acquiring a new drive letter corresponding to the logical volume.
Optionally, after all logical reel letter correction is completed, the method for reel letter correction by windows cloud migration further includes: and clearing the repair mark stored in the preset modified drive letter service file.
The embodiment of the invention also provides a system for correcting the drive letter of the windows cloud migration, which comprises the following steps: the first acquisition module is used for acquiring the corresponding disk identifier of each logical volume in the original windows; the recording module is used for recording the drive letter to a file system corresponding to the logical volume; the second obtaining module is used for mounting a system partition of an original window when the original window cloud is migrated to a target end, starting a virtual machine of the target end, and obtaining a new disk identifier corresponding to each logical volume when each logical volume is mounted; the judging module is used for judging whether the new drive letter is consistent with the drive letter recorded in the file system; and the correction module is used for unloading the logical volume and re-mounting the logical volume according to the drive letter recorded in the file system until all the logical reel letters are corrected.
Optionally, the system for modifying a drive letter migrated by a windows cloud further includes: the second recording module is used for acquiring the total number of the logical volumes in the original windows; and recording the total number to the system partition of the original windows.
Optionally, the system for modifying a drive letter migrated by a windows cloud further includes: the second judging module is used for judging whether the number of the mounted logical volumes is consistent with the total number; and when the number of the mounted logical volumes is consistent with the total number, acquiring a new drive letter corresponding to the logical volume.
Optionally, the second determining module is further configured to, when the number of the mounted logical volumes is inconsistent with the total number, return to the step of determining whether the number of the mounted logical volumes is consistent with the total number after a preset time interval until all the logical volumes are mounted.
Optionally, the system for modifying a drive letter migrated by a windows cloud further includes: and the repair mark module is used for writing a repair mark into a preset modified drive letter service file when the original windows cloud is migrated to the target end, wherein the preset modified drive letter service file is a modified drive letter service installed in the original windows and is used for storing the repair mark.
Optionally, the system for modifying a drive letter migrated by a windows cloud further includes: a third judging module, configured to judge whether the preset modified drive letter service file stores the repair flag; and when the repair mark is stored in the preset modified drive letter service file, acquiring a new drive letter corresponding to the logical volume.
Optionally, the system for modifying a drive letter migrated by a windows cloud further includes: and the repair mark clearing module is used for clearing the repair mark stored in the preset modified drive letter service file.
An embodiment of the present invention further provides an electronic device, including: the device comprises a memory and a processor, wherein the memory and the processor are in communication connection with each other, the memory stores computer instructions, and the processor executes the computer instructions to execute the drive letter correction method for windows cloud migration provided by the embodiment of the invention.
The embodiment of the invention also provides a computer-readable storage medium, which stores a computer instruction, wherein the computer instruction is used for enabling the computer to execute the method for correcting the drive letter of the windows cloud migration provided by the embodiment of the invention.
The technical scheme of the invention has the following advantages:
the embodiment of the invention provides a method and a system for correcting a drive letter of windows cloud migration.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flowchart of a method for modifying a drive letter of windows cloud migration according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a specific application example of the drive letter correction method for windows cloud migration in the embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a drive letter correction system for windows cloud migration according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device in an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The technical features mentioned in the different embodiments of the invention described below can be combined with each other as long as they do not conflict with each other.
An embodiment of the present invention further provides a method for correcting a drive letter of windows cloud migration, where as shown in fig. 1, the method for correcting a drive letter of windows cloud migration includes:
step S101: and acquiring the corresponding disk identifier of each logical volume in the original windows. Specifically, each logical volume in the original windows corresponds to its own drive letter, which is an identifier of the disk storage device corresponding to the logical volume.
Step S102: and recording the drive letter into a file system corresponding to the logical volume. Specifically, to solve the problem of disheveled disk identifier after the migration of the Windows cloud, the disk identifier of each logical volume of the original Windows is recorded first, for example, a wmic command (Windows Management instruction) may be used on the original Windows to collect the disk identifier of the logical volume and record the disk identifier to a respective file system, where the advantage of recording to the respective file system instead of recording to a specific file system is that no additional hard disk serial number modification tool (volumeid) needs to be recorded because the volumeid changes after the Windows is migrated to the target end, and the file system always corresponds to the logical volume before and after migration.
In practical application, after recording the drive letter to the file system corresponding to the logical volume, the drive letter corresponding to each logical volume in the original Windows can be confirmed by creating a vss consistency snapshot, and then the file system recorded with the drive letter is synchronously migrated to the target end, which is only the cloud platform after cloud migration of the original Windows.
Step S103: and when the original windows cloud is migrated to the target end, mounting the system partition of the original windows, starting the virtual machine of the target end, and when each logical volume is mounted, acquiring a new disk identifier corresponding to the logical volume. Specifically, after the original windows cloud is migrated to the target end, i.e., the cloud platform, the file system is written into the cloud hard disk, the virtual machine of the target end of the system partition of the original windows is mounted, the logical volume is mounted to start the windows system, and then the new disk identifier actually corresponding to the mounted logical volume in the cloud hard disk is obtained.
Step S104: and judging whether the new drive letter is consistent with the drive letter recorded in the file system. Specifically, the method comprises the steps of reading a drive letter recorded in a file system and judging whether the new drive letter is the same with the drive letter, namely judging whether the drive letter corresponding to the logical volume has the problem of disorder of the drive letter, if so, judging that the drive letter of the logical volume in the windows after migration is accurate, and if not, judging that the drive letter has the problem of disorder.
Step S105: and when the new drive letter is inconsistent with the drive letter recorded in the file system, unloading the logical volume, and re-mounting the logical volume according to the drive letter recorded in the file system until all the logical reel letters are corrected. Specifically, when a logical volume has a disk identifier that is wrong, the logical volume is unloaded first, and then the logical volume is mounted again according to the original disk identifier until all the logical disk identifiers are corrected, that is, the disk identifiers of all the logical volumes are consistent with the disk identifier in the original windows, so as to ensure that all the application programs can run normally.
By executing the steps S101 to S105, the drive letter correction method for windows cloud migration provided by the embodiment of the present invention records the drive letter corresponding to each logical volume in the original windows to the corresponding file system, obtains the new drive letter corresponding to each logical volume when the new windows mount each logical volume and starts up after the original windows cloud is migrated to the target end, and unloads the logical volume with the wrong drive letter and re-mounts the logical volume according to the original drive letter by comparing the new drive letter with the drive letter recorded in the file system corresponding to the logical volume, so that the drive letter disorder occurring after the windows cloud migration is automatically corrected without human intervention, and the normal operation of the original application program can be ensured.
Specifically, in an embodiment, before obtaining a new drive corresponding to the logical volume, the method for correcting a drive for windows cloud migration further includes the following steps:
step S201: and acquiring the total number of the logical volumes in the original windows. Specifically, when a user selects to perform cloud migration on an original windows, it is first required to select migration content of the original windows, that is, which system disks and system files stored therein are migrated, for example: and migrating the C disk, the D disk and the E disk cloud of the original windows to a target end, wherein the total number of the logical volumes is the sum of the number of the logical volumes stored in the C disk, the D disk and the E disk, and the total number can be directly calculated according to a migration disk selected by a user.
Step S202: and recording the total number to the system partition of the original windows. Specifically, because the system partition is a partition for starting a window and does not change before and after cloud migration, the total number of the logical volumes in the original window is recorded in the system partition, and when the window is restarted after cloud migration, the total number of the logical volumes can be directly obtained. The total number indicates that the original windows cloud migration is the total number of the migrated logical volumes, so that whether the drive letter correction service of all the logical volumes is completed or not can be judged conveniently in the follow-up process, the accuracy of the drive letter of each logical volume of the windows after migration is ensured, and the windows after migration can be started normally.
Step S203: and judging whether the number of the mounted logical volumes is consistent with the total number. In practical application, a drive letter is continuously occupied in the process of mounting each logical volume on line, if a drive letter correction operation is performed in the process, a situation that the corrected drive letter is occupied by other logical volumes mounted on line may occur, so that delay or failure occurs in the drive letter correction, and the efficiency of the drive letter correction is affected, therefore, it is necessary to determine whether all the logical volumes are mounted completely, and the drive letter correction is started only when all the logical volumes are mounted completely, specifically, whether all the logical volumes are on line is determined by scanning whether a system disk on line is consistent with a migration disk selected by a user at a target end, for example: and scanning whether all the logical volumes of the C disk, the D disk and the E disk exist at a target end, so as to judge whether the mounted logical volume number is consistent with the logical volumes stored in the C disk, the D disk and the E disk.
Step S204: and when the number of the mounted logical volumes is consistent with the total number, acquiring a new drive letter corresponding to the logical volume. Specifically, if the number and the total number of the mounted logical volumes are consistent, it is described that all the logical volumes are mounted on line, and at this time, the disk identifier correction is started, so that the situation that the disk identifiers are occupied mutually does not occur, and therefore, a new disk identifier corresponding to the logical volume starts to be acquired, and the disk identifier correction service is performed.
Step S205: when the number of the mounted logical volumes is inconsistent with the total number, the process returns to step S203 after a preset time interval until the mounting of all the logical volumes is completed. In practical application, if the number of the mounted logical volumes is inconsistent with the total number of all the logical volumes, it is indicated that there is no logical volume online, a certain time needs to be waited for, and all the logical volumes are online.
The above steps are processes for avoiding that when a drive letter of a certain logical volume is corrected, the corrected drive letter is occupied by a newly mounted logical volume, and therefore it is necessary to judge whether all the logical volumes are mounted completely, that is, after all the logical volumes are on-line, the new drive letter of the logical volume is obtained, and the drive letter of the logical volume is corrected.
Accordingly, in another alternative embodiment of the present invention, in the above step S105, when the new drive letter is inconsistent with the drive letter recorded in the file system, all the logical volumes are unloaded to avoid the situation that the logical volumes occupy the drive letter with each other, and then all the logical volumes are re-mounted according to the drive letter recorded in the file system, and the optical disc drive can be floppy-mounted these last times to avoid occupying the drive letter when the logical volumes are re-mounted.
Specifically, in an embodiment, before obtaining a new drive corresponding to the logical volume, the method for correcting a drive for windows cloud migration further includes the following steps:
step S301: and when the original windows cloud is migrated to the target end, writing the repair mark into a preset modified drive letter service file, wherein the preset modified drive letter service file is a modified drive letter service installed in the original windows and is used for storing the repair mark. Specifically, since the original windows does not need to modify the drive letter before cloud migration, the preset modified drive letter service file has no repair mark, that is, the preset modified drive letter service file is empty, and the installed modified drive letter service exits after detecting that no repair mark exists, so that the start of the original system is not affected. Step S302: and judging whether the preset correction drive letter service file stores a repair mark or not. Specifically, the original windows, the target windows started by the target end for the first time and the target windows started by the target group for the non-first time can be distinguished by judging whether the preset disc character correcting service file stores the repairing marks or not, disc character correcting service is performed only when the target windows started by the target end for the first time, and if the target end is not started for the first time, disc character correction is completed after cloud migration, so that disc character correcting service is not required, and normal starting of a system is not influenced.
Step S303: and when the preset correction drive symbol service file stores the repair mark, acquiring a new drive symbol corresponding to the logical volume. Specifically, if the preset modified drive letter service file stores the repair mark, it indicates that this time starting of the system is the first time starting after the original windows is migrated to the target end, and at this time, the migrated system may store the problem that the drive letter is messy, so that the drive letter modification needs to be performed before starting the system to ensure normal operation of the system.
Specifically, in practical application, the drive letter needs to be corrected only when the windows cloud is started for the first time after being migrated to the target end, and the problem of confusion of the drive letter does not exist when the original windows is started or when the windows cloud is restarted after being migrated, so that the original windows is provided with the modified drive letter service file, that is, the original windows and the target windows started at the target end for the first time are distinguished, and because the original windows do not have the repair mark in the modified drive letter service file before the cloud is migrated, the installed modified drive letter service can exit after detecting that no repair mark exists, the start of the original system cannot be influenced, and the drive letter modified service can be started only at the target windows, that is, the new drive letter corresponding to the logical volume is obtained.
Specifically, in an embodiment, after all logical reel letter correction is completed, the method for correcting a reel letter for windows cloud migration further includes the following steps:
step S401: and clearing the repair mark stored in the preset modified drive letter service file. Specifically, after all logical reel letters are corrected, if windows is restarted at the target end, since the disordered reel letters of the windows are already corrected, the problem of disordered reel letters does not exist, and therefore, the repair mark stored in the preset modified reel letter service file needs to be cleared, and at this time, the installed modified reel letter service exits after detecting that no repair mark exists, so that the start of a new system is prevented from being influenced. In practical application, by means of clearing the repair flag in the preset modified disk service file, if the system is not started for the first time at the target end, it indicates that the disk letter modification is completed after cloud migration, there is no repair flag in the preset modified disk letter service file, the installed modified disk letter service exits after detecting that there is no repair flag, and the restart of the system is not affected,
the method for correcting the drive letter of windows cloud migration provided by the embodiment of the present invention will be described in detail with reference to specific application examples.
As shown in fig. 2, in a scenario that a windows is migrated from a source cloud to a cloud, cloud migration software may deploy an agent on each logical volume vm of a source (i.e., an original window), then collect and record corresponding information on the source through the agent, that is, a file system corresponding to each logical volume in the original window, where a drive letter of the corresponding logical volume and a system partition recording the total number of all logical volumes to be migrated are recorded in the source, then create a vss consistency snapshot for all file systems and system partitions and synchronize data to a transport receiving end corresponding to the cloud, where a cloud hard disk having the same size as that of the original window partition is already mounted on the transport, the transport writes all received data into the cloud hard disk and then injects a correction flag into a preset correction drive letter service file, and after detecting that a virtual machine exists in the cloud hard disk, first determine whether all logical volumes to be migrated are all online, and acquiring new disk identifiers of all the logical volumes until all the logical volumes to be migrated are mounted on line, then judging whether the new disk identifiers are consistent with the disk identifiers recorded in the file system of the original windows, if the disk identifiers are inconsistent, starting a disk identifier correction service, unloading all the logical volumes, and re-mounting all the logical volumes according to the disk identifiers recorded in the file system to repair the disk identifiers of the cloud host, so that the problem that the disk identifiers are disordered when the original windows cloud is migrated to a target end and started for the first time is solved, and the normal starting of the cloud host is ensured.
By executing the above steps, the drive letter correction method for windows cloud migration provided by the embodiment of the present invention records the drive letter corresponding to each logical volume in the original windows to the respective corresponding file system, obtains the new drive letter corresponding to each logical volume when the new windows mount each logical volume and starts up after the original windows cloud is migrated to the target end, and unloads the logical volume with the wrong drive letter and re-mounts the logical volume according to the original drive letter by comparing the new drive letter with the drive letter recorded in the file system corresponding to the logical volume, thereby automatically correcting the drive letter disorder after the windows cloud migration without human intervention, and ensuring that the original application program can normally run.
An embodiment of the present invention further provides a system for correcting a drive letter of windows cloud migration, where as shown in fig. 3, the system for correcting a drive letter of windows cloud migration includes:
a first obtaining module 1, configured to obtain a drive letter corresponding to each logical volume in an original window. For details, refer to the related description of step S101 in the above method embodiment, and no further description is provided here.
And the recording module 2 is used for recording the drive letter to a file system corresponding to the logical volume. For details, refer to the related description of step S102 in the above method embodiment, and no further description is provided here.
And the second obtaining module 3 is configured to, when the original windows cloud is migrated to the target end, mount the system partition of the original windows, start the virtual machine of the target end, and mount each logical volume, obtain a new disk identifier corresponding to the logical volume. For details, refer to the related description of step S103 in the above method embodiment, and no further description is provided here.
And the judging module 4 is used for judging whether the new drive letter is consistent with the drive letter recorded in the file system. For details, refer to the related description of step S104 in the above method embodiment, and no further description is provided here.
And the correction module 5 is used for unloading the logical volume when the new drive letter is inconsistent with the drive letter recorded in the file system, and re-mounting the logical volume according to the drive letter recorded in the file system until all the logical reel letters are corrected. For details, refer to the related description of step S105 in the above method embodiment, and no further description is provided here.
Specifically, in an embodiment, the above system for modifying a drive letter migrated by a windows cloud further includes: the second recording module is used for acquiring the total number of the logical volumes in the original windows; and recording the total number to the system partition of the original windows. For details, reference is made to the related description in the above method embodiments, and details are not repeated herein.
Specifically, in an embodiment, the above system for modifying a drive letter migrated by a windows cloud further includes: the second judging module is used for judging whether the number of the mounted logical volumes is consistent with the total number; and when the number of the mounted logical volumes is consistent with the total number, acquiring a new drive letter corresponding to the logical volume. For details, reference is made to the related description in the above method embodiments, and details are not repeated herein.
Specifically, in an embodiment, the second determining module is further configured to, when the number of the mounted logical volumes is inconsistent with the total number, return to the step of determining whether the number of the mounted logical volumes is consistent with the total number after a preset time interval until all the logical volumes are mounted. For details, reference is made to the related description in the above method embodiments, and details are not repeated herein.
Specifically, in an embodiment, the above system for modifying a drive letter migrated by a windows cloud further includes: and the repair mark module is used for writing the repair mark into a preset modified drive letter service file when the original windows cloud is migrated to the target end, wherein the preset modified drive letter service file is a modified drive letter service installed in the original windows and is used for storing the repair mark. For details, reference is made to the related description in the above method embodiments, and details are not repeated herein.
Specifically, in an embodiment, the above system for modifying a drive letter migrated by a windows cloud further includes: the third judging module is used for judging whether the preset correction drive letter service file stores a repair mark or not; and when the preset correction drive symbol service file stores the repair mark, acquiring a new drive symbol corresponding to the logical volume. For details, reference is made to the related description in the above method embodiments, and details are not repeated herein.
Specifically, in an embodiment, the above system for modifying a drive letter migrated by a windows cloud further includes: and the repair mark clearing module is used for clearing the repair mark stored in the preset modified drive letter service file. For details, reference is made to the related description in the above method embodiments, and details are not repeated herein.
Through the cooperative cooperation of the above components, the drive letter correction system for windows cloud migration provided by the embodiment of the present invention records the drive letter corresponding to each logical volume in the original windows to the corresponding file system, and when a new windows mounts each logical volume and starts up after the original windows cloud is migrated to a target end, obtains the new drive letter corresponding to each logical volume, and compares the new drive letter with the drive letter recorded in the file system corresponding to the logical volume, unloads the logical volume with the wrong drive letter and re-mounts the logical volume according to the original drive letter, thereby achieving automatic correction of the drive letter disorder after the windows cloud migration without human intervention, and ensuring that the original application program can normally run.
There is also provided an electronic device according to an embodiment of the present invention, as shown in fig. 4, the electronic device may include a processor 901 and a memory 902, where the processor 901 and the memory 902 may be connected by a bus or in another manner, and fig. 4 takes the example of being connected by a bus as an example.
Processor 901 may be a Central Processing Unit (CPU). The Processor 901 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or combinations thereof.
The memory 902, which is a non-transitory computer readable storage medium, may be used for storing non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the methods in the method embodiments of the present invention. The processor 901 executes various functional applications and data processing of the processor by executing non-transitory software programs, instructions and modules stored in the memory 902, that is, implements the methods in the above-described method embodiments.
The memory 902 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor 901, and the like. Further, the memory 902 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 902 may optionally include memory located remotely from the processor 901, which may be connected to the processor 901 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
One or more modules are stored in the memory 902, which when executed by the processor 901 performs the methods in the above-described method embodiments.
The specific details of the electronic device may be understood by referring to the corresponding related descriptions and effects in the above method embodiments, and are not described herein again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, and the program can be stored in a computer readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD) or a Solid State Drive (SSD), etc.; the storage medium may also comprise a combination of memories of the kind described above.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.

Claims (10)

1. A method for correcting a drive letter of windows cloud migration is characterized by comprising the following steps:
acquiring a disk identifier corresponding to each logical volume in the original windows;
recording the drive letter to a file system corresponding to the logical volume;
when an original windows cloud is migrated to a target end, mounting a system partition of the original windows, starting a virtual machine of the target end, and acquiring a new disk character corresponding to each logical volume when each logical volume is mounted;
judging whether the new drive letter is consistent with the drive letter recorded in the file system;
and when the new drive letter is inconsistent with the drive letter recorded in the file system, unloading the logical volume, and re-mounting the logical volume according to the drive letter recorded in the file system until all the logical reel letters are corrected.
2. The method for modifying a drive letter of windows cloud migration according to claim 1, further comprising:
acquiring the total number of the logical volumes in the original windows;
and recording the total number to the system partition of the original windows.
3. The method of claim 2, wherein before obtaining the new drive corresponding to the logical volume, the method further comprises:
judging whether the number of the mounted logical volumes is consistent with the total number;
and when the number of the mounted logical volumes is consistent with the total number, acquiring a new drive letter corresponding to the logical volume.
4. The method for modifying a drive letter of windows cloud migration according to claim 3, further comprising:
and when the number of the mounted logical volumes is inconsistent with the total number, returning to the step of judging whether the number of the mounted logical volumes is consistent with the total number after a preset time interval until the mounting of all the logical volumes is finished.
5. The method for modifying a drive letter of windows cloud migration according to claim 1, further comprising:
when the original windows cloud is migrated to a target end, writing a repair mark into a preset modified drive letter service file, wherein the preset modified drive letter service file is a modified drive letter service installed in the original windows and is used for storing the repair mark.
6. The method of claim 5, wherein before obtaining the new drive corresponding to the logical volume, the method further comprises:
judging whether the preset correction drive letter service file stores the repair mark or not;
and when the repair mark is stored in the preset modified drive letter service file, acquiring a new drive letter corresponding to the logical volume.
7. The method of claim 5, wherein after all logical reel credit corrections are completed, the method further comprises:
and clearing the repair mark stored in the preset modified drive letter service file.
8. A drive letter correction system for windows cloud migration is characterized by comprising:
the first acquisition module is used for acquiring the corresponding disk identifier of each logical volume in the original windows;
the recording module is used for recording the drive letter to a file system corresponding to the logical volume;
the second obtaining module is used for mounting a system partition of an original window when the original window cloud is migrated to a target end, starting a virtual machine of the target end, and obtaining a new disk identifier corresponding to each logical volume when each logical volume is mounted;
the judging module is used for judging whether the new drive letter is consistent with the drive letter recorded in the file system;
and the correction module is used for unloading the logical volume and re-mounting the logical volume according to the drive letter recorded in the file system until all the logical reel letters are corrected.
9. An electronic device, comprising:
a memory and a processor, the memory and the processor being communicatively coupled to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the method for diskdalty correction for windows cloud migration of any of claims 1-7.
10. A computer-readable storage medium having stored thereon computer instructions for causing a computer to thereby perform the method for driver modification of windows cloud migration of any of claims 1-7.
CN202010666389.9A 2020-07-10 2020-07-10 Method and system for correcting drive letter of windows cloud migration Active CN111930707B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010666389.9A CN111930707B (en) 2020-07-10 2020-07-10 Method and system for correcting drive letter of windows cloud migration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010666389.9A CN111930707B (en) 2020-07-10 2020-07-10 Method and system for correcting drive letter of windows cloud migration

Publications (2)

Publication Number Publication Date
CN111930707A true CN111930707A (en) 2020-11-13
CN111930707B CN111930707B (en) 2022-08-02

Family

ID=73312452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010666389.9A Active CN111930707B (en) 2020-07-10 2020-07-10 Method and system for correcting drive letter of windows cloud migration

Country Status (1)

Country Link
CN (1) CN111930707B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113448688A (en) * 2021-06-29 2021-09-28 华云数据控股集团有限公司 Method, system and computer medium for automatically correcting network configuration in cloud migration scene

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004350185A (en) * 2003-05-26 2004-12-09 Seiko Epson Corp Image processing apparatus, image processing method and program for image processing
CN101945131A (en) * 2010-09-16 2011-01-12 华中科技大学 Storage virtualization-based data migration method
CN104035887A (en) * 2014-05-22 2014-09-10 中国科学院计算技术研究所 Block device caching device and method based on simplification configuration system
CN104468521A (en) * 2014-11-13 2015-03-25 华为技术有限公司 Online migration method, device and system
CN105589690A (en) * 2015-12-11 2016-05-18 浪潮电子信息产业股份有限公司 Method for binding hard disk mounting sequence under Linux system
CN106030500A (en) * 2014-04-22 2016-10-12 株式会社日立制作所 Data migration method of storage system
CN106815068A (en) * 2016-12-09 2017-06-09 中电科华云信息技术有限公司 The method that Hyperv live migration of virtual machine is realized based on Openstack
CN107273257A (en) * 2017-06-23 2017-10-20 郑州云海信息技术有限公司 A kind of automatic method for carrying out the out of order inspection of hard disk under linux system
CN108681468A (en) * 2018-05-21 2018-10-19 郑州云海信息技术有限公司 A kind of linux system disk unit binding method, device and server
CN108733501A (en) * 2017-04-14 2018-11-02 优估(上海)信息科技有限公司 A kind of drive bearing calibration, device, equipment and computer readable storage medium
CN108874317A (en) * 2018-06-07 2018-11-23 郑州云海信息技术有限公司 The automatic flash chamber of logical volume subregion and method under a kind of linux system
CN111104201A (en) * 2019-12-11 2020-05-05 中国联合网络通信集团有限公司 System migration method and device, electronic equipment and storage medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004350185A (en) * 2003-05-26 2004-12-09 Seiko Epson Corp Image processing apparatus, image processing method and program for image processing
CN101945131A (en) * 2010-09-16 2011-01-12 华中科技大学 Storage virtualization-based data migration method
CN106030500A (en) * 2014-04-22 2016-10-12 株式会社日立制作所 Data migration method of storage system
CN104035887A (en) * 2014-05-22 2014-09-10 中国科学院计算技术研究所 Block device caching device and method based on simplification configuration system
CN104468521A (en) * 2014-11-13 2015-03-25 华为技术有限公司 Online migration method, device and system
CN105589690A (en) * 2015-12-11 2016-05-18 浪潮电子信息产业股份有限公司 Method for binding hard disk mounting sequence under Linux system
CN106815068A (en) * 2016-12-09 2017-06-09 中电科华云信息技术有限公司 The method that Hyperv live migration of virtual machine is realized based on Openstack
CN108733501A (en) * 2017-04-14 2018-11-02 优估(上海)信息科技有限公司 A kind of drive bearing calibration, device, equipment and computer readable storage medium
CN107273257A (en) * 2017-06-23 2017-10-20 郑州云海信息技术有限公司 A kind of automatic method for carrying out the out of order inspection of hard disk under linux system
CN108681468A (en) * 2018-05-21 2018-10-19 郑州云海信息技术有限公司 A kind of linux system disk unit binding method, device and server
CN108874317A (en) * 2018-06-07 2018-11-23 郑州云海信息技术有限公司 The automatic flash chamber of logical volume subregion and method under a kind of linux system
CN111104201A (en) * 2019-12-11 2020-05-05 中国联合网络通信集团有限公司 System migration method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
漆靖 等: ""一种逻辑卷有效数据的数据一致性检测方法"", 《信息安全》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113448688A (en) * 2021-06-29 2021-09-28 华云数据控股集团有限公司 Method, system and computer medium for automatically correcting network configuration in cloud migration scene
CN113448688B (en) * 2021-06-29 2024-02-06 华云数据控股集团有限公司 Method, system and computer medium for automatically correcting network configuration of cloud migration scene

Also Published As

Publication number Publication date
CN111930707B (en) 2022-08-02

Similar Documents

Publication Publication Date Title
US10817386B2 (en) Virtual machine recovery method and virtual machine management device
US20150378849A1 (en) Method and device for backing up, restoring a virtual machine
CN109445861B (en) System starting method, device, computer device and storage medium
US20170286234A1 (en) System and method for live virtual incremental restoring of data from cloud storage
CN104572229A (en) Firmware upgrade method and firmware upgrade device for embedded system
CN108595119B (en) Data synchronization method and distributed system
CN104915226A (en) Network device software starting method, device and network device
US10990312B2 (en) Method, apparatus, device and storage medium for processing data location of storage device
CN108475201B (en) Data acquisition method in virtual machine starting process and cloud computing system
CN110716845B (en) Log information reading method of Android system
JP2007133544A (en) Failure information analysis method and its implementation device
CN107203480B (en) Data prefetching method and device
CN111158945B (en) Kernel fault processing method, device, network security equipment and readable storage medium
CN111930707B (en) Method and system for correcting drive letter of windows cloud migration
CN110888769B (en) Data processing method and computer equipment
CN111124294B (en) Sector mapping information management method and device, storage medium and equipment
US11210024B2 (en) Optimizing read-modify-write operations to a storage device by writing a copy of the write data to a shadow block
CN117131014A (en) Database migration method, device, equipment and storage medium
CN111913753A (en) Method and system for changing starting mode in cloud migration of windows system
US20220413733A1 (en) mon service migration method, apparatus, and device, and readable storage medium
CN110262875B (en) Communication method and system of Windows virtual machine and KVM host based on patch mechanism
CN111597066A (en) SSD (solid State disk) repairing method and device, computer equipment and storage medium
US11775395B2 (en) Withdrawing a point-in-time snapshot copy operation within a data consistency application
CN109324809B (en) Data processing method and device
CN115576705B (en) Data synchronization method, device and medium for redundant firmware

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
GR01 Patent grant
GR01 Patent grant