CN106959827B - Information processing method, information processing apparatus, and server - Google Patents

Information processing method, information processing apparatus, and server Download PDF

Info

Publication number
CN106959827B
CN106959827B CN201710203383.6A CN201710203383A CN106959827B CN 106959827 B CN106959827 B CN 106959827B CN 201710203383 A CN201710203383 A CN 201710203383A CN 106959827 B CN106959827 B CN 106959827B
Authority
CN
China
Prior art keywords
storage device
data
storage
read
copying
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
CN201710203383.6A
Other languages
Chinese (zh)
Other versions
CN106959827A (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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201710203383.6A priority Critical patent/CN106959827B/en
Publication of CN106959827A publication Critical patent/CN106959827A/en
Application granted granted Critical
Publication of CN106959827B publication Critical patent/CN106959827B/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/0604Improving or facilitating administration, e.g. storage management
    • 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/0629Configuration or reconfiguration of storage systems
    • 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/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices

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 embodiment of the invention discloses an information processing method, an information processing device and a server, wherein the method comprises the following steps: detecting the storage capacity of a second storage device currently inserted in the server; when the storage capacity of the second storage device is larger than the storage capacity of the first storage device in the original storage devices of the server, prompting whether the first storage device is replaced by the second storage device; generating a data copy instruction upon receiving an indication to replace the first storage device with the second storage device; and copying the data in the first storage device to the second storage device in response to the data copying instruction, and generating and storing copy record information in the second storage device. The method can replace the disk with smaller capacity of the online server with the disk with larger capacity, and supports the storage of more data.

Description

Information processing method, information processing apparatus, and server
Technical Field
The present invention relates to the field of data storage technologies, and in particular, to an information processing method, an information processing apparatus, and a server.
Background
With the rapid development of magnetic disk technology, the density of magnetic disks is higher and higher, and large-capacity magnetic disks are continuously coming out to meet the ever-increasing data storage requirements of people. However, for the server which is already online, a large amount of data is already stored in the server, and how to replace the disk with smaller capacity in the server with the disk with larger capacity to support the storage of more data becomes a technical problem to be solved in the field.
Disclosure of Invention
In order to solve the above technical problem, embodiments of the present invention provide an information processing method, an information processing apparatus, and a server, so as to replace a disk with a smaller capacity in the server with a disk with a larger capacity, thereby supporting the storage of more data.
In order to solve the above problems, the embodiments of the present invention provide the following technical solutions:
an information processing method is applied to a server, and comprises the following steps:
detecting the storage capacity of a second storage device currently inserted in the server;
when the storage capacity of the second storage device is larger than the storage capacity of the first storage device in the original storage devices of the server, prompting whether the first storage device is replaced by the second storage device;
generating a data copy instruction upon receiving an indication to replace the first storage device with the second storage device;
and copying the data in the first storage device to the second storage device in response to the data copying instruction, and generating and storing copy record information in the second storage device.
Optionally, the copying the record information includes: copy progress, copied data, and storage location of copied data.
Optionally, the method further includes:
and deleting the copy record information after all the data in the first storage equipment is copied to the second storage equipment.
Optionally, the first storage device is a storage device with the least stored data or a storage device with the least service life in the original storage devices of the server.
Optionally, the method further includes:
in the data copying process, when a data writing instruction is received, whether a writing position of data to be written is located on the first storage device is judged;
when the writing position of the data to be written is located on the first storage device, judging whether the first storage device has data corresponding to the data to be written;
when the first storage device does not have data corresponding to the data to be written, writing the data to be written into the second storage device;
when the first storage device has data corresponding to the data to be written, judging whether the data corresponding to the data to be written on the first storage device is copied to the second storage device or not;
when the data corresponding to the data to be written on the first storage device is copied to the second storage device, modifying the data corresponding to the data to be written on the second storage device;
when the data corresponding to the data to be written on the first storage device is not copied to the second storage device, writing the data to be written into the second storage device, and abandoning the copying of the data corresponding to the data to be written on the first storage device.
Optionally, the method further includes:
in the data copying process, when a data reading instruction is received, judging whether the storage position of data to be read is located on the first storage device;
when the storage position of the data to be read is located on the first storage device, judging whether the second storage device has data corresponding to the data to be read or not, when the second storage device has the data corresponding to the data to be read, reading the data from the second storage device, and when the second storage device does not have the data corresponding to the data to be read, reading the data from the first storage device.
Optionally, determining whether the second storage device has data corresponding to the data to be read, reading data from the second storage device when the second storage device has data corresponding to the data to be read, and reading data from the first storage device when the second storage device does not have data corresponding to the data to be read includes:
judging whether the data to be read is copied to a second storage device or not;
when the data to be read is copied to a second storage device, reading the data from the second storage device;
when the data to be read is not copied to the second storage device, judging whether the data to be read is updated in the process of copying the data on the first storage device to the second storage device;
if the data to be read is updated in the process of copying the data on the first storage device to the second storage device, reading the data from the second storage device;
and if the data to be read is not updated in the process of copying the data on the first storage device to the second storage device, reading the data from the first storage device.
Optionally, the method further includes:
and when a preset phenomenon occurs in the data copying process, generating a prompt instruction to prompt a user to select subsequent operation.
A server comprising a plurality of storage devices and a processor, wherein the processor is configured to:
detecting the storage capacity of a second storage device currently inserted in the server;
when the storage capacity of the second storage device is larger than the storage capacity of the first storage device in the original storage devices of the server, prompting whether the first storage device is replaced by the second storage device;
generating a data copy instruction after receiving that the first storage device is replaced by the second storage device;
and copying the data in the first storage device to the second storage device in response to the data copying instruction, and generating and storing copy record information in the second storage device.
Optionally, the copying the record information includes: copy progress, copied data, and storage location of copied data.
Optionally, the first storage device is a storage device with the least stored data or a storage device with the least service life in the original storage devices of the server.
Optionally, the processor is further configured to:
and deleting the copy record information after all the data in the first storage equipment is copied to the second storage equipment.
Optionally, the processor is further configured to:
in the data copying process, when a data writing instruction is received, whether a writing position of data to be written is located on the first storage device is judged;
when the writing position of the data to be written is located on the first storage device, judging whether the first storage device has data corresponding to the data to be written;
when the first storage device does not have data corresponding to the data to be written, writing the data to be written into the second storage device;
when the first storage device has data corresponding to the data to be written, judging whether the data corresponding to the data to be written on the first storage device is copied to the second storage device or not;
when the data corresponding to the data to be written on the first storage device is copied to the second storage device, modifying the data corresponding to the data to be written on the second storage device;
when the data corresponding to the data to be written on the first storage device is not copied to the second storage device, writing the data to be written into the second storage device, and abandoning the copying of the data corresponding to the data to be written on the first storage device.
Optionally, the processor is further configured to:
in the data copying process, when a data reading instruction is received, judging whether the storage position of data to be read is located on the first storage device;
when the storage position of the data to be read is located on the first storage device, judging whether the second storage device has data corresponding to the data to be read or not, when the second storage device has the data corresponding to the data to be read, reading the data from the second storage device, and when the second storage device does not have the data corresponding to the data to be read, reading the data from the first storage device.
Optionally, the processor is configured to determine whether the second storage device has data corresponding to the data to be read, read data from the second storage device when the second storage device has data corresponding to the data to be read, and when the second storage device does not have data corresponding to the data to be read, specifically:
judging whether the data to be read is copied to a second storage device or not;
when the data to be read is copied to a second storage device, reading the data from the second storage device;
when the data to be read is not copied to the second storage device, judging whether the data to be read is updated in the process of copying the data on the first storage device to the second storage device;
if the data to be read is updated in the process of copying the data on the first storage device to the second storage device, reading the data from the second storage device;
and if the data to be read is not updated in the process of copying the data on the first storage device to the second storage device, reading the data from the first storage device.
Optionally, the processor is further configured to:
and when a preset phenomenon occurs in the data copying process, generating a prompt instruction to prompt a user to select subsequent operation.
An information processing apparatus applied to a server including a plurality of storage devices, comprising:
the disk replacement control module is used for detecting the storage capacity of a second storage device currently inserted into the server, prompting whether to replace the first storage device by using the second storage device when the storage capacity of the second storage device is larger than the storage capacity of the first storage device in the original storage device of the server, and generating a data copy instruction after receiving an instruction of replacing the first storage device by using the second storage device;
and the data copying module is used for responding to the data copying instruction, copying the data in the first storage device to the second storage device, and sending the relevant information of the copying process to the disc-changing control module, so that the disc-changing control module generates the copying record information based on the relevant information of the copying process and stores the copying record information in the second storage device.
Compared with the prior art, the technical scheme has the following advantages:
in the information processing method provided by the embodiment of the invention, when detecting that the storage capacity of a second storage device currently inserted into the server is larger than the storage capacity of a first storage device in an original storage device of the server, a prompt is automatically generated to prompt a user whether to replace the first storage device with the second storage device; and after receiving an instruction of replacing the first storage device with the second storage device, generating a data copy instruction, and copying the data in the first storage device to the second storage device, so that a disk with smaller capacity of the online server is replaced by a disk with larger capacity, and further, storage of more data is supported.
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, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of an information processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of an information processing method according to another embodiment of the present invention;
FIG. 3 is a flow chart of an information processing method according to another embodiment of the invention;
FIG. 4 is a schematic structural diagram of an information processing apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an information processing apparatus according to another embodiment of the present invention;
fig. 6 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
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 only a part of the embodiments of the present invention, and not all of the embodiments. 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.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, but the present invention may be practiced in other ways than those specifically described and will be readily apparent to those of ordinary skill in the art without departing from the spirit of the present invention, and therefore the present invention is not limited to the specific embodiments disclosed below.
An embodiment of the present invention provides an information processing method, which is applied to a server, and as shown in fig. 1, the information processing method includes:
s1: detecting the storage capacity of a second storage device currently inserted in the server.
Specifically, in this embodiment of the present invention, the detecting a storage capacity of the second storage device currently inserted in the server includes: detecting whether a new storage device, namely a second storage device, is currently inserted into the server, and when detecting that the second storage device is currently inserted into the server, acquiring the storage capacity of the second storage device so as to compare the storage capacity of the second storage device with the storage capacity of the original storage device in the server subsequently.
S2: and when the storage capacity of the second storage equipment is larger than the storage capacity of the first storage equipment in the original storage equipment of the server, prompting whether to replace the first storage equipment by the second storage equipment.
Specifically, in the embodiment of the present invention, the storage capacity of the second storage device is compared with the storage capacity of the first storage device in the original storage devices of the server, and when the storage capacity of the second storage device is greater than the storage capacity of the first storage device, whether to replace the first storage device with the second storage device is prompted; when the storage capacity of the second storage device is less than or equal to the storage capacity of the first storage device, not generating a prompt to replace the first storage device with the second storage device.
On the basis of the above embodiment, in an embodiment of the present invention, the first storage device is a storage device that stores the least data in original storage devices of the server; in another embodiment of the present invention, the first storage device is a storage device with a minimum service life in the original storage devices of the server. In other embodiments of the present invention, the first storage device may also be another storage device in an original storage device of the server, which is not limited in the present invention, and is determined as the case may be.
S3: after receiving an instruction of replacing the first storage device with the second storage device, generating a data copy instruction, where the data copy instruction is used to instruct to copy data in the first storage device to the second storage device.
S4: and copying the data in the first storage device to the second storage device in response to the data copying instruction, and generating and storing copy record information in the second storage device.
Specifically, in an embodiment of the present invention, the copy recording information includes: the data copying process comprises the copying progress, the copied data and the storage position of the copied data, so that data reading and writing and copying progress inquiry in the data copying process are facilitated.
On the basis of any of the above embodiments, in an embodiment of the present invention, as shown in fig. 2, the information processing method further includes:
s5: and after all the data in the first storage device is copied to the second storage device, deleting the copy record information so as to save the storage space. However, the present invention is not limited thereto, as the case may be.
On the basis of any of the above embodiments, in an embodiment of the present invention, as shown in fig. 3, the information processing method further includes:
s6: after all the data in the first storage device is copied to the second storage device, a prompt for deleting the first storage device from the server is generated, so that the first storage device is deleted from the server and a new mass storage device is inserted.
When a data write event occurs during data copying, in an embodiment of the present invention, on the basis of any one of the above embodiments, the information processing method further includes:
in the data copying process, when a data writing instruction is received, whether a writing position of data to be written is located on a first storage device is judged; when the writing position of the data to be written is not on the first storage device, directly writing the data to be written into the corresponding storage device; when the writing position of the data to be written is located on the first storage device, judging whether the first storage device has data corresponding to the data to be written, namely judging whether the data to be written is newly written data or modifying original data; when the first storage device does not have data corresponding to the data to be written, writing the data to be written into the second storage device, and copying the data to be written from the first storage device to the second storage device after the data to be written is not required to be written into the first storage device; when the first storage device has data corresponding to the data to be written, judging whether the data corresponding to the data to be written on the first storage device is copied to the second storage device, and when the data corresponding to the data to be written on the first storage device is copied to the second storage device, modifying the data corresponding to the data to be written on the second storage device; when the data corresponding to the data to be written on the first storage device is not copied to the second storage device, writing the data to be written into the second storage device, and abandoning the copying of the data corresponding to the data to be written on the first storage device.
When a data reading event occurs during data copying, in an embodiment of the present invention, on the basis of any one of the above embodiments, the information processing method further includes:
in the data copying process, when a data reading instruction is received, judging whether the storage position of data to be read is located on the first storage device;
when the storage position of the data to be read is not on the first storage device, directly reading the data from the storage position of the data to be read;
when the storage position of the data to be read is located on the first storage device, judging whether the second storage device has data corresponding to the data to be read or not, when the second storage device has the data corresponding to the data to be read, reading the data from the second storage device, and when the second storage device does not have the data corresponding to the data to be read, reading the data from the first storage device.
Specifically, on the basis of the foregoing embodiment, in an embodiment of the present invention, determining whether the second storage device has data corresponding to the data to be read, when the second storage device has data corresponding to the data to be read, reading data from the second storage device, and when the second storage device does not have data corresponding to the data to be read, reading data from the first storage device includes:
judging whether the data to be read is copied to a second storage device or not;
when the data to be read is copied to a second storage device, reading the data from the second storage device;
when the data to be read is not copied to the second storage device, judging whether the data to be read is updated in the process of copying the data on the first storage device to the second storage device;
if the data to be read is updated in the process of copying the data on the first storage device to the second storage device, reading the data from the second storage device;
and if the data to be read is not updated in the process of copying the data on the first storage device to the second storage device, reading the data from the first storage device.
It should be noted that, in the embodiment of the present invention, when the second storage device has data corresponding to the data to be read, data is read from the second storage device regardless of whether the first storage device has data corresponding to the data to be read.
On the basis of any one of the above embodiments, in an embodiment of the present invention, the information processing method further includes:
and when a preset phenomenon occurs in the data copying process, generating a prompt instruction to prompt a user to select subsequent operation. And before the user selects the subsequent operation, the copy record information is reserved to ensure the integrity of the data.
It should be noted that, in the embodiment of the present invention, the preset phenomenon includes: the second storage device is unable to write data and/or read data. Specifically, in the embodiment of the present invention, when a preset phenomenon occurs in the data copying process, a prompt instruction is generated to prompt a user to select a subsequent operation, where the prompt instruction includes:
and when data cannot be written in and/or read from the second storage equipment in the data copying process, generating a prompt instruction to prompt a user to select subsequent operation. Optionally, the prompting includes prompting the user to choose to discard the current copy of the data, restart the copy of the data (similar to trying again) and discard the current copy of the data, and swap it for a second storage device. The present invention is not limited in this regard, as the case may be.
Correspondingly, an embodiment of the present invention further provides an information processing apparatus, which is applied to a server, where the server includes a plurality of storage devices, and as shown in fig. 4, the information processing apparatus includes:
a disk-changing control module 10, configured to detect a storage capacity of a second storage device currently inserted in the server, prompt whether to replace a first storage device with a second storage device when the storage capacity of the second storage device is greater than a storage capacity of the first storage device in an original storage device of the server, and generate a data copy instruction after receiving an instruction to replace the first storage device with the second storage device;
and the data copying module 20 is configured to copy, in response to the data copying instruction, the data in the first storage device to the second storage device, and send information related to a copying process to the disc changer control module, so that the disc changer control module 10 generates copy record information based on the information related to the copying process, and stores the copy record information in the second storage device.
On the basis of the foregoing embodiment, in an embodiment of the present invention, the disk-changing control module 10, when performing the detection of the storage capacity of the second storage device currently inserted in the server, is specifically configured to: detecting whether a new storage device, namely a second storage device, is currently inserted into the server, and when detecting that the second storage device is currently inserted into the server, acquiring the storage capacity of the second storage device so as to compare the storage capacity of the second storage device with the storage capacity of the original storage device in the server subsequently. When the storage capacity of the second storage device is larger than that of the first storage device in the original storage devices in the server, prompting whether to replace the first storage device with the second storage device; when the storage capacity of the second storage device is less than or equal to the storage capacity of the first storage device, not generating a prompt to replace the first storage device with the second storage device.
On the basis of any of the foregoing embodiments, in an embodiment of the present invention, the first storage device is a storage device that stores data least in original storage devices of the server; in another embodiment of the present invention, the first storage device is a storage device with a minimum service life in the original storage devices of the server. In other embodiments of the present invention, the first storage device may also be another storage device in an original storage device of the server, which is not limited in the present invention, and is determined as the case may be.
On the basis of any one of the above embodiments, in an embodiment of the present invention, the copy recording information includes: the data copying process comprises the copying progress, the copied data and the storage position of the copied data, so that data reading and writing and copying progress inquiry in the data copying process are facilitated.
On the basis of any of the above embodiments, in an embodiment of the present invention, the disc changer control module 10 is further configured to: and after all the data in the first storage device is copied to the second storage device, deleting the copy record information so as to save the storage space. However, the present invention is not limited thereto, as the case may be.
On the basis of any one of the above embodiments, in an embodiment of the present invention, the disc-changing control module 10 is further configured to: after all data in the first storage device is copied to the second storage device, a prompt for deleting the first storage device from the server is generated, so that the first storage device is deleted from the server, and a free space is reserved for inserting a new mass storage device.
On the basis of any of the above embodiments, in an embodiment of the present invention, as shown in fig. 5, the server further includes a data reading and writing module 40, and the information processing apparatus further includes: and a data read-write control module 30. In this embodiment of the present invention, the disc changer control module 10 is further configured to, in a data copying process, determine whether a writing position of data to be written is located on the first storage device when receiving a data writing instruction sent by the data reading and writing module 40; when the writing position of the data to be written is positioned on the first storage device, generating a data writing instruction; the data read-write control module 30 is configured to respond to the data write instruction, and determine whether the first storage device has data corresponding to the data to be written, that is, determine whether the data to be written is newly written data or modifies original data; when the first storage device does not have data corresponding to the data to be written, writing the data to be written into the second storage device, and copying the data to be written from the first storage device to the second storage device after the data to be written is not required to be written into the first storage device; when the first storage device has data corresponding to the data to be written, judging whether the data corresponding to the data to be written on the first storage device is copied to the second storage device, and when the data corresponding to the data to be written on the first storage device is copied to the second storage device, modifying the data corresponding to the data to be written on the second storage device; when the data corresponding to the data to be written on the first storage device is not copied to the second storage device, writing the data to be written into the second storage device, and abandoning the copying of the data corresponding to the data to be written on the first storage device.
On the basis of the foregoing embodiment, in an embodiment of the present invention, in the data copying process, when receiving a data reading instruction sent by the data reading and writing module 40, the disc changer control module 10 is further configured to determine whether a storage location of data to be read is located on the first storage device, and when the storage location of the data to be read is located on the first storage device, generate a data reading instruction; the data read-write control module 30 is configured to respond to the data reading instruction, determine whether the second storage device has data corresponding to the data to be read, read data from the second storage device when the second storage device has data corresponding to the data to be read, and read data from the first storage device when the second storage device does not have data corresponding to the data to be read.
Specifically, on the basis of the above embodiment, in an embodiment of the present invention, the data read/write control module 30, when performing the determination on whether the second storage device has data corresponding to the data to be read, reads data from the second storage device when the second storage device has data corresponding to the data to be read, and reads data from the first storage device when the second storage device does not have data corresponding to the data to be read, specifically:
judging whether the data to be read is copied to a second storage device or not;
when the data to be read is copied to a second storage device, reading the data from the second storage device;
when the data to be read is not copied to the second storage device, judging whether the data to be read is updated in the process of copying the data on the first storage device to the second storage device;
if the data to be read is updated in the process of copying the data on the first storage device to the second storage device, reading the data from the second storage device;
and if the data to be read is not updated in the process of copying the data on the first storage device to the second storage device, reading the data from the first storage device.
On the basis of any of the above embodiments, in an embodiment of the present invention, the disc changer control module 10 is further configured to generate a prompt instruction to prompt a user to select a subsequent operation when a preset phenomenon occurs in a data copying process. And before the user selects the subsequent operation, the copy record information is reserved to ensure the integrity of the data.
It should be noted that, in the embodiment of the present invention, the preset phenomenon includes: the second storage device is unable to write input and/or read data.
As can be seen from the above, in the information processing method and the information processing apparatus provided in the embodiments of the present invention, when it is detected that the storage capacity of the second storage device currently inserted in the server is greater than the storage capacity of the first storage device in the original storage device of the server, a prompt is automatically generated to prompt a user whether to replace the first storage device with the second storage device; and after receiving an instruction of replacing the first storage device with the second storage device, generating a data copy instruction, and copying the data in the first storage device to the second storage device, so that a disk with smaller capacity of the online server is replaced by a disk with larger capacity, and further, storage of more data is supported.
Furthermore, an embodiment of the present invention further provides a server, as shown in fig. 6, where the server includes a plurality of storage devices and a processor 100, where the plurality of storage devices includes a first storage device 200 and a second storage device 300, where the processor 100 is configured to:
detecting the storage capacity of a second storage device 300 currently inserted in the server;
when the storage capacity of the second storage device 300 is larger than the storage capacity of the first storage device 200 in the original storage devices of the server, prompting whether to replace the first storage device 200 with the second storage device 300;
generating a data copy instruction after receiving a replacement of the first storage device 200 with the second storage device 300;
in response to the data copy instruction, the data in the first storage device 200 is copied to the second storage device 300, and copy record information is generated and stored in the second storage device 300.
On the basis of the foregoing embodiment, in an embodiment of the present invention, the processor 100, when performing the detection of the storage capacity of the second storage device 300 currently inserted in the server, is specifically configured to: detecting whether a new storage device, namely a second storage device 300, is currently inserted into the server, and when detecting that the second storage device 300 is currently inserted into the server, acquiring the storage capacity of the second storage device 300 so as to compare the storage capacity of the second storage device 300 with the storage capacity of the original storage device in the server subsequently.
On the basis of any of the foregoing embodiments, in an embodiment of the present invention, when the storage capacity of the second storage device 300 is greater than the storage capacity of the first storage device 200 in the original storage device of the server, the processor 100 is specifically configured to, when prompting whether to replace the first storage device 200 with the second storage device 300, perform: comparing the storage capacity of the second storage device 300 with the storage capacity of the first storage device 200 in the original storage devices of the server, and prompting whether to replace the first storage device 200 with the second storage device 300 when the storage capacity of the second storage device 300 is larger than the storage capacity of the first storage device 200; when the storage capacity of the second storage device 300 is less than or equal to the storage capacity of the first storage device 200, a prompt to replace the first storage device 200 with the second storage device 300 is not generated.
On the basis of any of the above embodiments, in an embodiment of the present invention, the first storage device 200 is a storage device that stores the least data among original storage devices of the server; in another embodiment of the present invention, the first storage device 200 is the storage device with the smallest service life among the original storage devices of the server. In other embodiments of the present invention, the first storage device 200 may also be another storage device in an original storage device of the server, which is not limited in the present invention, as the case may be.
Specifically, in an embodiment of the present invention, the copy recording information includes: the data copying process comprises the copying progress, the copied data and the storage position of the copied data, so that data reading and writing and copying progress inquiry in the data copying process are facilitated.
On the basis of any of the above embodiments, in an embodiment of the present invention, the processor 100 is further configured to: after all the data in the first storage device 200 is copied to the second storage device 300, a prompt for deleting the first storage device 200 from the server is generated, so that the first storage device 200 is deleted from the server and a new mass storage device is inserted.
When a data write event occurs during the data copy process, in an embodiment of the present invention, on the basis of any of the above embodiments, the processor 100 is further configured to:
in the data copying process, when a data writing instruction is received, whether a writing position of data to be written is located on the first storage device 200 is judged; when the writing position of the data to be written is not on the first storage device 200, directly writing the data to be written into the corresponding storage device; when the writing position of the data to be written is located on the first storage device 200, determining whether the first storage device 200 has data corresponding to the data to be written, that is, determining whether the data to be written is newly written data or modifies original data; when the first storage device 200 does not have data corresponding to the data to be written, writing the data to be written into the second storage device 300, without copying the data to be written from the first storage device 200 to the second storage device 300 after writing the data to be written into the first storage device 200; when the first storage device 200 has data corresponding to the data to be written, determining whether the data corresponding to the data to be written on the first storage device 200 has been copied onto the second storage device 300, and when the data corresponding to the data to be written on the first storage device 200 has been copied onto the second storage device 300, modifying the data corresponding to the data to be written on the second storage device 300; when the data corresponding to the data to be written on the first storage device 200 is not copied to the second storage device 300, writing the data to be written into the second storage device 300, and abandoning the copying of the data corresponding to the data to be written on the first storage device 200.
When a data read event occurs during the data copy process, in an embodiment of the present invention, on the basis of any of the above embodiments, the processor 100 is further configured to:
in the data copying process, when a data reading instruction is received, whether the storage position of data to be read is located on the first storage device 200 is judged;
when the storage location of the data to be read is not on the first storage device 200, directly reading the data from the storage location of the data to be read;
when the storage location of the data to be read is located on the first storage device 200, determining whether the second storage device 300 has data corresponding to the data to be read, when the second storage device 300 has data corresponding to the data to be read, reading the data from the second storage device 300, and when the second storage device 300 does not have data corresponding to the data to be read, reading the data from the first storage device 200.
Specifically, on the basis of the above embodiment, in an embodiment of the present invention, the processor 100 is configured to perform the determination whether the second storage device 300 has data corresponding to the data to be read, when the second storage device 300 has data corresponding to the data to be read, read data from the second storage device 300, and when the second storage device 300 does not have data corresponding to the data to be read, read data from the first storage device 200, specifically:
determining whether the data to be read has been copied to the second storage device 300;
reading data from the second storage device 300 when the data to be read has been copied onto the second storage device 300;
when the data to be read is not copied to the second storage device 300, judging whether the data to be read is updated in the process of copying the data on the first storage device 200 to the second storage device 300;
if the data to be read is updated in the process of copying the data on the first storage device 200 to the second storage device 300, reading the data from the second storage device 300;
if the data to be read is not updated in the process of copying the data on the first storage device 200 to the second storage device 300, reading the data from the first storage device 200.
It should be noted that, in the embodiment of the present invention, when the second storage device 300 has data corresponding to the data to be read, the data is read from the second storage device 300 regardless of whether the first storage device 200 has data corresponding to the data to be read.
On the basis of any of the above embodiments, in an embodiment of the present invention, the processor 100 is further configured to:
and when a preset phenomenon occurs in the data copying process, generating a prompt instruction to prompt a user to select subsequent operation. And before the user selects the subsequent operation, the copy record information is reserved to ensure the normal copy of the data.
It should be noted that, in the embodiment of the present invention, the preset phenomenon includes: the second storage device 300 cannot write input and/or read data. Specifically, in the embodiment of the present invention, when the processor 100 executes a preset phenomenon occurring in the data copying process, a prompt instruction is generated to prompt the user to specifically:
when data cannot be written and/or read in the second storage device 300 in the data copying process, a prompt instruction is generated to prompt a user to select a subsequent operation. Optionally, the prompting includes prompting the user to choose to discard the current copy of the data, restart the copy of the data (similar to trying again) and discard the current copy of the data, and swap it for a second storage device. The present invention is not limited in this regard, as the case may be.
In summary, the server provided in the embodiment of the present invention may detect whether a second storage device is inserted online, and automatically generate a prompt to prompt a user whether to replace a first storage device with a second storage device when detecting that a storage capacity of the second storage device currently inserted in the server is greater than a storage capacity of the first storage device in an original storage device of the server; and after receiving an instruction of replacing the first storage device with the second storage device, generating a data copy instruction, and copying the data in the first storage device to the second storage device, so that a disk with smaller capacity of the online server is replaced by a disk with larger capacity, and further, storage of more data is supported.
In the description, each part is described in a progressive manner, each part is emphasized to be different from other parts, and the same and similar parts among the parts are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (12)

1. An information processing method applied to a server is characterized by comprising the following steps:
detecting the storage capacity of a second storage device currently inserted in the server;
when the storage capacity of the second storage device is larger than the storage capacity of the first storage device in the original storage devices of the server, prompting whether the first storage device is replaced by the second storage device;
generating a data copy instruction upon receiving an indication to replace the first storage device with the second storage device;
and copying all data in the first storage device to the second storage device in response to the data copying instruction, generating copy record information, and storing the copy record information in the second storage device.
2. The information processing method according to claim 1, wherein the copying of the record information includes: copy progress, copied data, and storage location of copied data.
3. The information processing method according to claim 1, characterized by further comprising:
and deleting the copy record information after all the data in the first storage equipment is copied to the second storage equipment.
4. The information processing method according to claim 1, wherein the first storage device is a storage device that stores data least among original storage devices of the server or a storage device that has a minimum lifetime.
5. The information processing method according to any one of claims 1 to 4, characterized by further comprising:
in the data copying process, when a data writing instruction is received, whether a writing position of data to be written is located on the first storage device is judged;
when the writing position of the data to be written is located on the first storage device, judging whether the first storage device has data corresponding to the data to be written;
when the first storage device does not have data corresponding to the data to be written, writing the data to be written into the second storage device;
when the first storage device has data corresponding to the data to be written, judging whether the data corresponding to the data to be written on the first storage device is copied to the second storage device or not;
when the data corresponding to the data to be written on the first storage device is copied to the second storage device, modifying the data corresponding to the data to be written on the second storage device;
when the data corresponding to the data to be written on the first storage device is not copied to the second storage device, writing the data to be written into the second storage device, and abandoning the copying of the data corresponding to the data to be written on the first storage device.
6. The information processing method according to claim 5, characterized by further comprising:
in the data copying process, when a data reading instruction is received, judging whether the storage position of data to be read is located on the first storage device;
when the storage position of the data to be read is located on the first storage device, judging whether the second storage device has data corresponding to the data to be read or not, when the second storage device has the data corresponding to the data to be read, reading the data from the second storage device, and when the second storage device does not have the data corresponding to the data to be read, reading the data from the first storage device.
7. The information processing method according to claim 6, wherein determining whether the second storage device has data corresponding to the data to be read, reading data from the second storage device when the second storage device has data corresponding to the data to be read, and reading data from the first storage device when the second storage device does not have data corresponding to the data to be read comprises:
judging whether the data to be read is copied to a second storage device or not;
when the data to be read is copied to a second storage device, reading the data from the second storage device;
when the data to be read is not copied to the second storage device, judging whether the data to be read is updated in the process of copying the data on the first storage device to the second storage device;
if the data to be read is updated in the process of copying the data on the first storage device to the second storage device, reading the data from the second storage device;
and if the data to be read is not updated in the process of copying the data on the first storage device to the second storage device, reading the data from the first storage device.
8. The information processing method according to any one of claims 1 to 4, characterized by further comprising:
and when a preset phenomenon occurs in the data copying process, generating a prompt instruction to prompt a user to select subsequent operation.
9. A server, comprising a plurality of storage devices and a processor, wherein the processor is configured to:
detecting the storage capacity of a second storage device currently inserted in the server;
when the storage capacity of the second storage device is larger than the storage capacity of the first storage device in the original storage devices of the server, prompting whether the first storage device is replaced by the second storage device;
generating a data copy instruction after receiving that the first storage device is replaced by the second storage device;
and copying all data in the first storage device to the second storage device in response to the data copying instruction, generating copy record information, and storing the copy record information in the second storage device.
10. The server according to claim 9, wherein the copying record information includes: copy progress, copied data, and storage location of copied data.
11. The server according to claim 9, wherein the first storage device is a storage device with the least data stored in an original storage device of the server or a storage device with the least service life.
12. An information processing apparatus applied to a server including a plurality of storage devices, the information processing apparatus comprising:
the disk replacement control module is used for detecting the storage capacity of a second storage device currently inserted into the server, prompting whether to replace the first storage device by using the second storage device when the storage capacity of the second storage device is larger than the storage capacity of the first storage device in the original storage device of the server, and generating a data copy instruction after receiving an instruction of replacing the first storage device by using the second storage device;
and the data copying module is used for responding to the data copying instruction, copying all data in the first storage device to the second storage device, and sending the relevant information of the copying process to the disc-changing control module, so that the disc-changing control module generates copy record information based on the relevant information of the copying process and stores the copy record information in the second storage device.
CN201710203383.6A 2017-03-30 2017-03-30 Information processing method, information processing apparatus, and server Active CN106959827B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710203383.6A CN106959827B (en) 2017-03-30 2017-03-30 Information processing method, information processing apparatus, and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710203383.6A CN106959827B (en) 2017-03-30 2017-03-30 Information processing method, information processing apparatus, and server

Publications (2)

Publication Number Publication Date
CN106959827A CN106959827A (en) 2017-07-18
CN106959827B true CN106959827B (en) 2020-02-21

Family

ID=59470593

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710203383.6A Active CN106959827B (en) 2017-03-30 2017-03-30 Information processing method, information processing apparatus, and server

Country Status (1)

Country Link
CN (1) CN106959827B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102063473A (en) * 2010-12-21 2011-05-18 南京壹进制信息技术有限公司 Method for expanding storage space on line
CN103605484A (en) * 2013-11-26 2014-02-26 华为技术有限公司 Data storage method and storage server
CN103902233A (en) * 2012-12-27 2014-07-02 中国电信股份有限公司 Virtual machine system on-line storage migration method and device and server
CN105162859A (en) * 2015-08-20 2015-12-16 湖南亿谷科技发展股份有限公司 Dynamic server dilatation system and method
CN105281937A (en) * 2014-06-25 2016-01-27 纬创资通股份有限公司 Server, service management system, and service management method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102063473A (en) * 2010-12-21 2011-05-18 南京壹进制信息技术有限公司 Method for expanding storage space on line
CN103902233A (en) * 2012-12-27 2014-07-02 中国电信股份有限公司 Virtual machine system on-line storage migration method and device and server
CN103605484A (en) * 2013-11-26 2014-02-26 华为技术有限公司 Data storage method and storage server
CN105281937A (en) * 2014-06-25 2016-01-27 纬创资通股份有限公司 Server, service management system, and service management method
CN105162859A (en) * 2015-08-20 2015-12-16 湖南亿谷科技发展股份有限公司 Dynamic server dilatation system and method

Also Published As

Publication number Publication date
CN106959827A (en) 2017-07-18

Similar Documents

Publication Publication Date Title
CN103700387A (en) Device and method for monitoring and repairing damaged sector of hard disc
JP2008205525A (en) Recording and reproducing device
KR100673376B1 (en) Contents recording medium compensation system, contents recording and playback devices, and contents recording and playback methods
CN114371814B (en) Data processing method and device and solid state disk
US6169710B1 (en) Optical disc recording/reproducing method and apparatus
CN111078151A (en) Solid state disk data re-reading method and device and solid state disk
CN106959827B (en) Information processing method, information processing apparatus, and server
JP2006343923A (en) Disk recording device
CN111130856A (en) Server configuration method, system, equipment and computer readable storage medium
US7664914B2 (en) Hierarchical control apparatus of hierarchical storage system and method for maintaining and managing duplexed media
CN105357462B (en) A kind of PVR subregion method for recording and system
CN112162699B (en) Data reading and writing method, device, equipment and computer readable storage medium
CN108038035A (en) A kind of detection method and relevant apparatus of flash reading and writing state
MXPA05004703A (en) Information recording medium, recording/reproducing method and apparatus, and host apparatus.
CN110767258B (en) Data erasure command test method and related device
CN111190549A (en) Method, device, equipment and medium for acquiring available capacity of shared volume
JP2010109493A5 (en) Content recording apparatus, control method therefor, computer program, and storage medium
CN110008064A (en) A kind of RAID restoration methods, device, equipment and medium
JP6205909B2 (en) Information processing apparatus and program
JP6079868B2 (en) Error analysis method, information processing apparatus, and error analysis program
CN112784101B (en) Video data storage method and device and data storage equipment
JP2003067259A (en) Information recording apparatus
JP2010135034A (en) Information recording/reproducing device
JP2008262673A (en) Non-chronological av-stream recording
JPH0660550A (en) Disk device

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