Movatterモバイル変換


[0]ホーム

URL:


CN115993929B - Storage device management method, storage device management device, electronic device and storage medium - Google Patents

Storage device management method, storage device management device, electronic device and storage medium
Download PDF

Info

Publication number
CN115993929B
CN115993929BCN202210550060.5ACN202210550060ACN115993929BCN 115993929 BCN115993929 BCN 115993929BCN 202210550060 ACN202210550060 ACN 202210550060ACN 115993929 BCN115993929 BCN 115993929B
Authority
CN
China
Prior art keywords
storage device
partition
target storage
target
public
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
CN202210550060.5A
Other languages
Chinese (zh)
Other versions
CN115993929A (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.)
Shenzhen Jimi Software Technology Co ltd
Original Assignee
Shenzhen Jimi Software Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Jimi Software Technology Co ltdfiledCriticalShenzhen Jimi Software Technology Co ltd
Priority to CN202210550060.5ApriorityCriticalpatent/CN115993929B/en
Publication of CN115993929ApublicationCriticalpatent/CN115993929A/en
Application grantedgrantedCritical
Publication of CN115993929BpublicationCriticalpatent/CN115993929B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The application discloses a storage device management method, a storage device management device, electronic equipment and a storage medium; when the target storage device is identified, a disk object corresponding to the target storage device is created, and the disk object is executed to read partition information corresponding to the partition of the target storage device; based on the partition information, creating a public volume object corresponding to the partition, and executing the public volume object to mount the corresponding partition to obtain a public mounting path; determining whether the target storage device is a storage device of the target type; when the target storage device is a storage device of the target type, a simulated volume object is created based on the common mount path, and the simulated volume object is executed to mount the corresponding partition so as to simulate the partition as built-in storage. In the application, the target type storage device can be simulated as built-in storage, thereby expanding the capacity of the built-in storage. Therefore, the scheme can improve the capacity of the built-in storage of the electronic equipment.

Description

Storage device management method, storage device management device, electronic device and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a storage device management method, a storage device management apparatus, an electronic device, and a storage medium.
Background
With the rapid development of internet technology, the data volume that needs to be cached of the terminal equipment is larger and larger, and especially, the requirements of users on watching, downloading and the like of high-definition videos are larger and larger, so that the requirements on the storage capacity of the built-in storage of the system are larger and larger. Currently built-in storage generally uses emmc, and the expandable capacity is very limited.
Disclosure of Invention
The application provides a storage device management method, a storage device management device, an electronic device and a storage medium, which can improve the capacity of built-in storage of the electronic device.
The application provides a storage device management method, which comprises the following steps:
when the target storage device is identified, creating a disk object corresponding to the target storage device, and executing the disk object to read partition information corresponding to a partition of the target storage device;
based on the partition information, creating a public volume object corresponding to the partition, and executing the public volume object to mount the corresponding partition to obtain a public mounting path;
determining whether the target storage device is a storage device of the target type;
when the target storage device is a storage device of the target type, a simulated volume object is created based on the common mount path, and the simulated volume object is executed to mount the corresponding partition so as to simulate the partition as built-in storage.
The application also provides a storage device management device, comprising:
the creating unit is used for creating a disk object corresponding to the target storage device when the target storage device is identified, and executing the disk object to read partition information corresponding to the partition of the target storage device;
the public mounting unit is used for creating a public volume object corresponding to the partition based on the partition information, and executing the public volume object to mount the corresponding partition to obtain a public mounting path;
a determining unit configured to determine whether the target storage device is a storage device of a target type;
and the simulation mounting unit is used for creating a simulation volume object based on the public mounting path when the target storage device is the storage device of the target type, and executing the simulation volume object to mount the corresponding partition so as to simulate the partition into built-in storage.
In some embodiments, the storage device management apparatus is further to:
when the target storage device or partition mounting abnormality cannot be identified, a formatting instruction is acquired;
if the formatting instruction comprises preset formatting parameters, obtaining a disk object corresponding to the target storage device;
when a disk object corresponding to the target storage device is obtained, formatting a file system of the target storage device into a file system of a preset type by adopting a preset instruction.
In some embodiments, the storage device management apparatus is further to:
determining whether the partition of the target storage device is mounted;
and unloading all the partitions of the target storage device when the partitions are mounted.
In some embodiments, the storage device management apparatus is further to:
outputting information which cannot identify the target storage device or information of abnormal partition mounting;
acquiring feedback information aiming at information which cannot identify target storage equipment or information of abnormal partition mounting;
and when the feedback information indicates to format the target storage device, acquiring a formatting instruction.
In some embodiments, the inability to identify the target storage device may include at least one of: the executing disk object cannot read partition information corresponding to the partition of the target storage device, cannot identify the file system of the target storage device, cannot detect the target storage device, and cannot read hardware information of the target storage device.
In some embodiments, the storage device management apparatus is further to:
and returning the information of partition mounting failure corresponding to the public volume object.
In some embodiments, the storage device management apparatus is further to:
when the target storage device is powered off, acquiring a removal instruction;
when a removal instruction is acquired, acquiring a disk object corresponding to the target storage device;
when a disk object corresponding to the target storage device is obtained, executing the disk object to call an unloading function in the public volume object to destroy the public volume object;
and after all the public volume objects are destroyed, destroying the disk objects corresponding to the target storage device.
In some embodiments, the storage device management apparatus is further to:
determining whether a partition corresponding to the public volume object is simulated as built-in storage;
when the partition is simulated as built-in storage, an unloading function in a simulated volume object corresponding to the partition is called to destroy the simulated volume object, and the corresponding partition is unloaded and the mounting point of the destroyed partition is unloaded.
In some embodiments, the determining unit is specifically configured to:
detecting whether the port path of the target storage device is identical to a preset port path;
acquiring a type of a file system of a target storage device
When the port path of the target storage device is the same as the preset port path, determining that the target storage device is the storage device of the target type when the type of the file system of the target storage device is the preset type, otherwise, determining that the target storage device is not the storage device of the target type.
In some embodiments, when the target storage device is identified, before creating the disk object corresponding to the target storage device, the storage device management apparatus is further configured to:
a step of creating an original simulation volume object based on/data/media in the shielding volume daemon;
or before creating the simulated volume object based on the public mounting path, further comprising:
destroying the original simulated volume object, which is created based on/data/media.
The application also provides an electronic device, which comprises a memory and a processor, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to perform steps in any of the storage device management methods provided by the present application.
The present application also provides a computer readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps of any of the storage device management methods provided by the present application.
When a target storage device is identified, the method can create a public volume object based on partition information of the device, mount a partition corresponding to the public volume object, and obtain a public mounting path; then creating a simulated volume object based on the public mounting path, mounting the corresponding partition, and simulating the partition into built-in storage, so that the capacity of the built-in storage is expanded; and the information of successful mounting is shielded, so that the user can feel no sense on the expanded built-in storage, and the user experience is improved. Therefore, the scheme can improve the capacity of the built-in storage of the electronic equipment.
Drawings
In order to more clearly illustrate the technical solutions of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a storage device management method provided by the application;
FIG. 2 is a schematic diagram of a storage device management apparatus according to the present application;
fig. 3 is a schematic structural diagram of an electronic device provided by the present application.
Detailed Description
The following description of the embodiments of the present application will be made more apparent and fully hereinafter with reference to the accompanying drawings, in which some, but not all embodiments of the application are shown. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to fall within the scope of the application.
The application provides a storage device management method, a storage device management device, electronic equipment and a storage medium.
The storage device management apparatus may be integrated in an electronic device, and the electronic device may be a terminal device, a server, or other devices. The terminal equipment can be a projector, an intelligent television, a laser television, a mobile phone, a tablet personal computer, intelligent Bluetooth equipment, a notebook computer, a desktop computer and other equipment; the server may be a single server or a server cluster composed of a plurality of servers. In some embodiments, the server may also be implemented in the form of a terminal device.
In some embodiments, the storage device management apparatus may be further integrated in a projector, and a target storage device may be built in the projector, and when the projector is turned on, the storage device management method of the present application may be performed. The Android system can be mounted in the projector and is based on an embedded Linux system, and the Linux system can comprise a Linux kernel Uevent space and a user space.
When the projector identifies the target storage device, a Disk object corresponding to the target storage device is created, and the Disk object is executed to read partition information corresponding to the partition of the target storage device; based on partition information, creating a public volume object corresponding to the partition, and executing the public volume object to mount the corresponding partition to obtain a public mounting path; determining whether the target storage device is a storage device of the target type; when the target storage device is a storage device of the target type, a simulated volume EmulatedVolume object is created based on the common mount path, and the simulated volume object is executed to mount the corresponding partition so as to simulate the partition as built-in storage.
In this embodiment, when the target storage device is identified, a public volume object may be created based on partition information of the device, and after the partition corresponding to the public volume object is mounted, a public mounting path is obtained; then creating a simulated volume object based on the public mounting path, mounting the corresponding partition, and simulating the partition into built-in storage, so that the capacity of the built-in storage is expanded; and the information of successful mounting is shielded, so that the user can feel no sense on the expanded built-in storage, and the user experience is improved. Therefore, the scheme can improve the capacity of the built-in storage of the electronic equipment.
The following will describe in detail. The numbers of the following examples are not intended to limit the preferred order of the examples.
In this embodiment, a storage device management method is provided, as shown in fig. 1, and a specific flow of the storage device management method may be as follows:
110. when the target storage device is identified, a disk object corresponding to the target storage device is created, and the disk object is executed to read partition information corresponding to the partition of the target storage device.
Wherein the target storage device may be a hard disk or the like.
One disk object corresponds to one storage device, and various information of the storage device can be stored in the disk object.
In some embodiments, after the Linux kernel space identifies the target storage device, the Uevent information is sent to the user space; after the NetlinkManager of the volume daemon vold (Volume Daemon) in the user space receives the Uevent information, creating a disk object corresponding to the target storage device; and executing the disk object to read partition information corresponding to the partition of the target storage device.
In some embodiments, when the target storage device is identified, before the disk object corresponding to the target storage device is created (such as during system initialization), the step of creating the simulated volume object based on/data/media in the volume daemon vold may be masked.
120. Based on the partition information, a public volume object corresponding to the partition is created, and the public volume object is executed to mount the corresponding partition, so that a public mounting path is obtained.
The public volume object can store information of a file system corresponding to the partition, information of a USB drive corresponding to the target storage device, a file path of the partition in a kernel space, a path of an application program in the electronic device after being mounted and capable of reading and writing the file, and the like.
In some embodiments, the disk object creates a public volume object corresponding to a partition based on partition information, sends creation information to StorageManagerService, storageManagerService through volldnative service, and after receiving the creation information, sends a mount instruction to vold, which calls the public volume object to mount the corresponding partition, so as to obtain a public mount path.
Optionally, when the partition mounting corresponding to the public volume object fails, information of partition mounting abnormality may be returned to the user space, so that a state of the target storage device is displayed to the user, and the user may determine whether to format the target storage device according to the information of partition mounting abnormality.
130. It is determined whether the target storage device is a storage device of the target type.
The target type may be a type of custom configuration. And determining whether the target storage device is a storage device of the target type or not in the process of carrying out the mounting of the corresponding partition by the vold calling public volume object. Alternatively, the target type of storage device may have only one partition.
In some embodiments, determining whether the target storage device is a target type of storage device may include, but is not limited to:
1) And detecting whether the port path of the target storage device is identical to the preset port path. The port path refers to a port where the target storage device is inserted into the projector, and may be, for example, a USB port. The preset port path may refer to a port path when the built-in storage device is in the projector.
2) The type of the file system of the target storage device is obtained. Specifically, vold may obtain the type of file system of the partition currently being mounted through blkid.
3) When the port path of the target storage device is the same as the preset port path, determining that the target storage device is the storage device of the target type when the type of the file system of the target storage device is the preset type, otherwise, determining that the target storage device is not the storage device of the target type.
Therefore, whether the target storage device needs to be simulated as the built-in storage is judged by adopting a port path and a file system type mode, and other external storage devices can be prevented from being simulated as the built-in storage by mistake.
140. When the target storage device is a storage device of the target type, a simulated volume object is created based on the common mount path, and the simulated volume object is executed to mount the corresponding partition so as to simulate the partition as built-in storage.
In some embodiments, after the simulated volume object is created, sending creation information to StorageManagerService, storageManagerService through volldnative service, and after receiving the creation information, sending a mount instruction to vold, where vold invokes the simulated volume object to mount the corresponding partition; the simulated volume object may feed back the mount path to the StorageManagerService. Optionally, when the partition corresponding to the simulated volume object fails to mount, information of the mounting failure may be returned to the user space, so as to display the state of the target storage device to the user.
In some embodiments, information of partition mounting failure corresponding to the public volume object may also be returned; namely, for the storage equipment which needs to be simulated as built-in storage, the information of successful mounting is shielded, and the information of mounting failure is returned to the storage manager service. Therefore, the information of successful mounting of the storage device which is simulated as the built-in storage is shielded, the storage device can not be seen after a user enters the file manager, the user can feel no sense of the expanded built-in storage, and misoperation can not be generated on the storage device, so that the user experience is improved.
In some embodiments, the original emulated volume object may also be destroyed prior to creating the emulated volume object based on the common mount path, the original emulated volume object being created based on/data/media.
Optionally, when the target storage device is not the target type storage device, the method may continue to execute according to the original flow of the Linux system and return an actual mount result (such as a mount path, whether the mount fails, etc.).
In some embodiments, repair of the target storage device is required when the target storage device is unrecognizable by file system corruption or internal device anomalies. Specific embodiments of repair may include, but are not limited to:
1) And when the target storage device or the partition mounting abnormality cannot be identified, acquiring a formatting instruction.
The mounting exception may be a mounting failure or a mounting read-only. Such as simulated volume objects and/or common volume object mount exceptions.
The unidentifiable target storage device may include at least one of: the partition information corresponding to the partition of the target storage device cannot be read by the executing disk object (for example, partition information cannot be read by a Linux kernel space, only disk information is available), a file system of the target storage device cannot be identified, the target storage device cannot be detected (for example, hardware information of the target storage device cannot be detected by a USB drive), and hardware information of the target storage device cannot be read (for example, the target storage device is detected by the USB drive, but the block state of the target storage device is abnormal, and the hardware information of the storage device is absent).
In some embodiments, when the target storage device or the partition mounted exception cannot be identified, information that the target storage device cannot be identified or the partition mounted exception may be output; acquiring feedback information aiming at information which cannot identify target storage equipment or information of abnormal partition mounting; and when the feedback information indicates to format the target storage device, acquiring a formatting instruction. Thus, formatting may be actively triggered by a user without the user being aware that active formatting results in corrupted data.
2) And if the formatting instruction comprises preset formatting parameters, acquiring a disk object corresponding to the target storage device.
The preset formatting parameter may be set in a user-defined manner according to the actual application situation, for example, may be set as scheduled. By presetting the formatting parameters, the problem that the corresponding vold cannot be found and the target storage equipment cannot be repaired can be avoided.
In some embodiments, disk objects corresponding to all devices in the projector may be traversed to obtain disk objects corresponding to the target storage device.
In some embodiments, after the disk object corresponding to the target storage device is acquired, the method may further include: determining whether the partition of the target storage device is mounted; and unloading all the partitions of the target storage device when the partitions are mounted.
In some embodiments, when a disk object corresponding to the target storage device cannot be obtained, the power of the target storage device is firstly turned off and then supplied through General-purpose input/output (GPIO), so as to reset and then identify the target storage device again.
3) When a disk object corresponding to the target storage device is obtained, formatting a file system of the target storage device into a file system of a preset type by adopting a preset instruction.
The preset instructions and preset types can be configured in a self-defined manner according to practical application conditions, for example, the preset instructions can be mke fs commands, and the preset types can be ext4 file system formats and file system formats of various versions which are developed later.
For example, a file node corresponding to a disk object under the block directory may be found, and the file system of the target storage device is formatted into a file system in an ext4 file system format using a mke fs command.
In some embodiments, the method of offloading may include:
1) When the target storage device is powered off, acquiring a removal instruction; for example, the kernel space driver sends a remove instruction uevent to Vold in user space.
2) When a removal instruction is acquired, acquiring a disk object corresponding to the target storage device; for example, after Vold's NetlinkManager receives the removal instruction, the corresponding disk object is obtained according to the hardware information of the target storage device.
3) When the disk object corresponding to the target storage device is obtained, executing the disk object to call an unloading function in the public volume object to destroy the public volume object corresponding to the partition.
In some embodiments, before destroying the common volume object, it may also be determined whether the partition corresponding to the common volume object is emulated as built-in storage; for example, when the target storage device is a storage device of the target type and the storage device has only one partition, it can be considered whether the partition corresponding to the common volume object is emulated as built-in storage. When the partition is simulated as built-in storage, an unloading function in a simulated volume object corresponding to the partition is called to destroy the simulated volume object, and the corresponding partition is unloaded and the mounting point of the destroyed partition is unloaded.
4) And after the common volume objects corresponding to all the partitions are destroyed, destroying the disk objects corresponding to the target storage equipment.
As can be seen from the above, when the target storage device is identified, the present application can create a public volume object based on the partition information of the device, and mount the partition corresponding to the public volume object to obtain a public mounting path; then creating an EmulatedVolume object based on the public mounting path, mounting the corresponding partition, and simulating the partition into built-in storage so as to expand the capacity of the built-in storage; and the information of successful mounting is shielded, so that the user can feel no sense on the expanded built-in storage, and the user experience is improved. Therefore, the scheme can improve the capacity of the built-in storage of the electronic equipment.
In order to better implement the above method, the present application further provides a storage device management apparatus, which may be specifically integrated in an electronic device, for example, in this embodiment, the method of the present application will be described in detail by taking the specific integration of the storage device management apparatus in a projector as an example.
For example, as shown in fig. 2, the storage device management apparatus may include a creation unit 201, a common mount unit 202, a determination unit 203, and an analog mount unit 204, as follows:
a creating unit 201, configured to create a disk object corresponding to a target storage device when the target storage device is identified, and execute the disk object to read partition information corresponding to a partition of the target storage device;
a public mount unit 202, configured to create a public volume object corresponding to a partition based on partition information, and execute the public volume object to mount the corresponding partition, so as to obtain a public mount path;
a determining unit 203, configured to determine whether the target storage device is a storage device of a target type;
and a simulation mount unit 204, configured to create a simulation volume object based on the common mount path when the target storage device is a storage device of the target type, and execute the simulation volume object to mount the corresponding partition so as to simulate the partition as a built-in storage.
In some embodiments, the storage device management apparatus is further to:
when the target storage device or partition mounting abnormality cannot be identified, a formatting instruction is acquired;
if the formatting instruction comprises preset formatting parameters, obtaining a disk object corresponding to the target storage device;
when a disk object corresponding to the target storage device is obtained, formatting a file system of the target storage device into a file system of a preset type by adopting a preset instruction.
In some embodiments, the storage device management apparatus is further to:
determining whether the partition of the target storage device is mounted;
and unloading all the partitions of the target storage device when the partitions are mounted.
In some embodiments, the storage device management apparatus is further to:
outputting information which cannot identify the target storage device or information of abnormal partition mounting;
acquiring feedback information aiming at information which cannot identify target storage equipment or information of abnormal partition mounting;
and when the feedback information indicates to format the target storage device, acquiring a formatting instruction.
In some embodiments, the inability to identify the target storage device may include at least one of: the executing disk object cannot read partition information corresponding to the partition of the target storage device, cannot identify the file system of the target storage device, cannot detect the target storage device, and cannot read hardware information of the target storage device.
In some embodiments, the storage device management apparatus is further to:
and returning the information of partition mounting failure corresponding to the public volume object.
In some embodiments, the storage device management apparatus is further to:
when the target storage device is powered off, acquiring a removal instruction;
when a removal instruction is acquired, acquiring a disk object corresponding to the target storage device;
when a disk object corresponding to the target storage device is obtained, executing the disk object to call an unloading function in the public volume object to destroy the public volume object;
and after all the public volume objects are destroyed, destroying the disk objects corresponding to the target storage device.
In some embodiments, the storage device management apparatus is further to:
determining whether a partition corresponding to the public volume object is simulated as built-in storage;
when the partition is simulated as built-in storage, an unloading function in a simulated volume object corresponding to the partition is called to destroy the simulated volume object, and the corresponding partition is unloaded and the mounting point of the destroyed partition is unloaded.
In some embodiments, when the target storage device is identified, before creating the disk object corresponding to the target storage device, the storage device management apparatus is further configured to:
a step of creating an original simulation volume object based on/data/media in the shielding volume daemon;
or before creating the simulated volume object based on the public mounting path, further comprising:
destroying the original simulated volume object, which is created based on/data/media.
In the implementation, each unit may be implemented as an independent entity, or may be implemented as the same entity or several entities in any combination, and the implementation of each unit may be referred to the foregoing method embodiment, which is not described herein again.
As can be seen from the above, when the storage device management apparatus of this embodiment identifies the target storage device, a public volume object may be created based on partition information of the device, and after the partition corresponding to the public volume object is mounted, a public mounting path is obtained; then creating an EmulatedVolume object based on the public mounting path, mounting the corresponding partition, and simulating the partition into built-in storage so as to expand the capacity of the built-in storage; and the information of successful mounting is shielded, so that the user can feel no sense on the expanded built-in storage, and the user experience is improved. Therefore, the scheme can improve the capacity of the built-in storage of the electronic equipment.
The present application further provides an electronic device, in this embodiment, the electronic device of this embodiment will be described in detail by taking an electronic device as an example, for example, as shown in fig. 3, which shows a schematic structural diagram of the electronic device according to the present application, specifically:
the electronic device may include one or more processing cores 'processors 301, one or more computer-readable storage media's memory 302, a power supply 303, an input module 304, and a communication module 305, among other components. Those skilled in the art will appreciate that the electronic device structure shown in fig. 3 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or may be arranged in different components. Wherein:
the processor 301 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 302, and invoking data stored in the memory 302. In some embodiments, processor 301 may include one or more processing cores; in some embodiments, processor 301 may integrate an application processor that primarily processes operating systems, user interfaces, applications, etc., with a modem processor that primarily processes wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 301.
The memory 302 may be used to store software programs and modules, and the processor 301 executes various functional applications and data processing by executing the software programs and modules stored in the memory 302. The memory 302 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the electronic device, etc. In addition, memory 302 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.
The electronic device also includes a power supply 303 that powers the various components, and in some embodiments, the power supply 303 may be logically connected to the processor 301 through a power management system to perform functions such as managing charging, discharging, and power consumption. The power supply 303 may also include one or more of any components, such as a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The electronic device may also include an input module 304, which input module 304 may be used to receive entered numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
The electronic device may also include a communication module 305, and in some embodiments the communication module 305 may include a wireless module, through which the electronic device may wirelessly transmit over a short distance, thereby providing wireless broadband internet access to the user. For example, the communication module 305 may be used to assist a user in e-mail, browsing web pages, accessing streaming media, and the like.
Although not shown, the electronic device may further include a display unit or the like, which is not described herein. In particular, in this embodiment, the processor 301 in the electronic device loads executable files corresponding to the processes of one or more application programs into the memory 302 according to the following instructions, and the processor 301 executes the application programs stored in the memory 302, so as to implement various functions as follows:
when the target storage device is identified, creating a disk object corresponding to the target storage device, and executing the disk object to read partition information corresponding to a partition of the target storage device;
based on the partition information, creating a public volume object corresponding to the partition, and executing the public volume object to mount the corresponding partition to obtain a public mounting path;
determining whether the target storage device is a storage device of the target type;
when the target storage device is a storage device of the target type, a simulated volume object is created based on the common mount path, and the simulated volume object is executed to mount the corresponding partition so as to simulate the partition as built-in storage.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
From the above, when the electronic device identifies the target storage device, the electronic device may create a public volume object based on partition information of the device, and mount a partition corresponding to the public volume object to obtain a public mount path; then creating an EmulatedVolume object based on the public mounting path, mounting the corresponding partition, and simulating the partition into built-in storage so as to expand the capacity of the built-in storage; and the information of successful mounting is shielded, so that the user can feel no sense on the expanded built-in storage, and the user experience is improved. Therefore, the scheme can improve the capacity of the built-in storage of the electronic equipment.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, the present application provides a computer readable storage medium having stored therein a plurality of instructions capable of being loaded by a processor to perform the steps of any of the storage device management methods provided by the present application. For example, the instructions may perform the steps of:
when the target storage device is identified, creating a disk object corresponding to the target storage device, and executing the disk object to read partition information corresponding to a partition of the target storage device;
based on the partition information, creating a public volume object corresponding to the partition, and executing the public volume object to mount the corresponding partition to obtain a public mounting path;
determining whether the target storage device is a storage device of the target type;
when the target storage device is a storage device of the target type, a simulated volume object is created based on the common mount path, and the simulated volume object is executed to mount the corresponding partition so as to simulate the partition as built-in storage.
Wherein the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
According to one aspect of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the storage device management method provided in the above-described embodiment.
The steps of any storage device management method provided by the present application can be executed by the instructions stored in the storage medium, so that the beneficial effects of any storage device management method provided by the present application can be achieved, and detailed descriptions of the foregoing embodiments are omitted herein.
The foregoing has outlined rather broadly the principles and embodiments of the present application in order that the detailed description of the application that follows may be better understood, and in order that the present application may be better suited to the implementation and use contemplated; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, the present description should not be construed as limiting the present application.

Claims (11)

CN202210550060.5A2022-05-202022-05-20Storage device management method, storage device management device, electronic device and storage mediumActiveCN115993929B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202210550060.5ACN115993929B (en)2022-05-202022-05-20Storage device management method, storage device management device, electronic device and storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202210550060.5ACN115993929B (en)2022-05-202022-05-20Storage device management method, storage device management device, electronic device and storage medium

Publications (2)

Publication NumberPublication Date
CN115993929A CN115993929A (en)2023-04-21
CN115993929Btrue CN115993929B (en)2023-09-05

Family

ID=85994218

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202210550060.5AActiveCN115993929B (en)2022-05-202022-05-20Storage device management method, storage device management device, electronic device and storage medium

Country Status (1)

CountryLink
CN (1)CN115993929B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103065102A (en)*2012-12-262013-04-24中国人民解放军国防科学技术大学Data encryption mobile storage management method based on virtual disk
CN103748545A (en)*2011-08-262014-04-23威睿公司Data storage system and data storage control method
CN114489512A (en)*2022-02-102022-05-13京东科技信息技术有限公司Method and device for limiting container capacity, electronic equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20160162209A1 (en)*2014-12-052016-06-09Hybrid Logic LtdData storage controller
US20160259573A1 (en)*2015-03-032016-09-08International Business Machines CorporationVirtual tape storage using inter-partition logical volume copies

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103748545A (en)*2011-08-262014-04-23威睿公司Data storage system and data storage control method
CN103065102A (en)*2012-12-262013-04-24中国人民解放军国防科学技术大学Data encryption mobile storage management method based on virtual disk
CN114489512A (en)*2022-02-102022-05-13京东科技信息技术有限公司Method and device for limiting container capacity, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
巧招管好虚拟硬盘分区;卡片;;个人电脑(第07期);全文*

Also Published As

Publication numberPublication date
CN115993929A (en)2023-04-21

Similar Documents

PublicationPublication DateTitle
CN108509215B (en)System software replacing method and device, terminal equipment and storage medium
CN105847446B (en)Method, device and system for acquiring network data
CN115967618B (en)Multi-item BMC sensor configuration management method and device
CN110908837A (en)Application program exception handling method and device, electronic equipment and storage medium
CN107766177A (en) Boot optimization method, device, storage medium and terminal equipment
CN113672340A (en) Incremental backup method, system, device and readable storage medium for virtual machine
CN116149752A (en) Baseboard management controller control method, device, electronic equipment and storage medium
CN113076225B (en)External storage medium detection method, device and equipment and storage medium
CN115993929B (en)Storage device management method, storage device management device, electronic device and storage medium
KR20210016913A (en)Electronic device for prohibiting loss of data in database and method for the same
CN113934453B (en)Risk detection method, risk detection device and storage medium
KR20100050098A (en)Image processing apparatus and control method thereof
CN112286804B (en) System debugging method, device, equipment and medium
CN114168284A (en) Coroutine running method, device, storage medium and electronic device
CN112328423A (en) A processing method, device and storage medium for searching service loopholes
CN115203252A (en)Cache function control method and device, computer equipment and storage medium
CN112426722A (en)Node map hot updating method and device, storage medium and computer equipment
CN119690420B (en)User interface component expression method, device, terminal and medium
CN103309691A (en)Information processing equipment and quick startup method thereof
CN110968399A (en)Virtual machine reloading method and device and computer readable storage medium
CN210166772U (en)Computing system
CN114124665A (en) Application program exception processing method, device, computer equipment and storage medium
CN119847776A (en)Process control method, device, equipment and storage medium
CN119536778A (en) Application hot update processing method, terminal device and readable storage medium
CN116775063A (en)EMMC self-adaptive upgrading method, device, computer equipment and storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp