WO2019062102A1 - 磁盘阵列的挂载方法、Android设备和存储介质 - Google Patents

磁盘阵列的挂载方法、Android设备和存储介质 Download PDF

Info

Publication number
WO2019062102A1
WO2019062102A1 PCT/CN2018/084328 CN2018084328W WO2019062102A1 WO 2019062102 A1 WO2019062102 A1 WO 2019062102A1 CN 2018084328 W CN2018084328 W CN 2018084328W WO 2019062102 A1 WO2019062102 A1 WO 2019062102A1
Authority
WO
WIPO (PCT)
Prior art keywords
disk array
disk
raid0
information
android system
Prior art date
Application number
PCT/CN2018/084328
Other languages
English (en)
French (fr)
Inventor
杜伟
周伟明
张少龙
Original Assignee
深圳市华德安科技有限公司
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 深圳市华德安科技有限公司 filed Critical 深圳市华德安科技有限公司
Publication of WO2019062102A1 publication Critical patent/WO2019062102A1/zh

Links

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/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD
    • 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

Definitions

  • the present application relates to the technical field of the Android system, and in particular, to a mounting method of a disk array, an Android device, and a storage medium.
  • Redundant Array of Independent Disks Redundant Array technology
  • RIAD technology has multiple levels of methods, which is convenient for the system to customize the storage solution according to the needs.
  • RAID technology is widely used in large servers based on windows and Linux systems and some high data security occasions, the design of RAID-based support and mounting software based on Android is basically blank.
  • the main purpose of the present application is to provide a disk array mounting method, an Android device, and a storage medium, which are designed to implement RAID 0 support and mount in an Android system.
  • the present application provides a method for mounting a disk array.
  • the mounting method of the disk array is applied to an Android system.
  • the mounting method of the disk array includes the following steps:
  • the mounting method further includes:
  • the mounting method further includes:
  • the mounting method further includes:
  • the broadcast information includes the disk array RAID0 error information
  • adding the disk array RAID0 and the disk array RAID0 mounted broadcast information so that the application receives the disk array RAID0 error, increases the disk array
  • RAID0 or RAID 1 mounts the broadcast information of the information the corresponding processing is performed.
  • the mounting method further includes:
  • the broadcast information of the additional error data is transmitted, so that the application performs corresponding processing according to the broadcast information.
  • the mounting method further includes:
  • the current state information of the disk array is queried according to the query instruction and displayed.
  • the mounting method further includes:
  • the RAID0 format disk to be added based on the expansion command is expanded by the expansion command on the corresponding RAID0 interface;
  • the RAID0 interface determined by the disk deletion instruction deletes the RAID0 format disk corresponding to the disk deletion instruction in the corresponding RAID0 according to the disk deletion instruction, and deletes Rebuild RAID0 after the disk; or,
  • the RAID0 interface determined by the add/delete command adds/deletes the add/delete in the corresponding RAID0 according to the add/delete command.
  • the step of mounting the disk array to the Android system according to the disk array device file includes:
  • the disk in the Android system is mounted to the Android system according to the disk array device file through a vold mechanism in the Android system.
  • the present application further provides an Android device, where the Android device includes: a memory, a processor, and a mounting program of a disk array stored on the memory and operable on the processor, The steps of the method as described above are implemented when the mount program of the disk array is executed by the processor.
  • the present application further provides a storage medium on which a mount program of a disk array is stored, and the mount program of the disk array is implemented by the processor as described above. The steps of the mounting method of the disk array.
  • the application receives the disk array RAID0 configuration information input by the user, generates corresponding disk array information, and obtains information about the disk in the Android system; when the number of disks corresponding to the disk information is greater than or equal to 2, according to the disk Array information is used to create a corresponding disk array interface.
  • the disk array interface controls the driver to map the disk set to the corresponding disk array device file according to the disk array information, and according to the disk array device file,
  • the disk in the Android system is mounted to the Android system.
  • the application generates the corresponding disk array information according to the information of the disk array RAID0 that needs to be mounted by the user, and obtains the information of the disk in the Android system, where the number of disks corresponding to the disk information is greater than or equal to 2, create a corresponding array interface according to the disk array information, and then use the created array interface to control the driver to map the disk array information to the disk array device file by using the system call, and the Android system is in the Android system, thereby the Android system
  • the disk array RAID0 can be mounted according to the disk array device file. After the disk array RAID0 is mounted, the application software in the Android system can be operated in the Android system like the U disk device.
  • FIG. 1 is a schematic structural diagram of an apparatus of a hardware operating environment involved in an embodiment of the present application
  • FIG. 2 is a schematic flow chart of a first implementation of a mounting method of a disk array according to the present application
  • FIG. 3 is a schematic diagram of modules in an Android system according to an embodiment of the present application.
  • FIG. 4 is a schematic flow chart of a second implementation of a mounting method of a disk array according to the present application.
  • FIG. 5 is a schematic flowchart of a third implementation of a mounting method of a disk array according to the present application.
  • FIG. 6 is a schematic flow chart of a fourth implementation of a mounting method of a disk array according to the present application.
  • FIG. 7 is a schematic flow chart of a fifth implementation of a mounting method of a disk array according to the present application.
  • the present application provides a disk array mounting method, an Android device, and a storage medium.
  • the disk array information of the disk array input by the user is received, the corresponding disk array information is generated, and the disk in the Android system is obtained.
  • the information about the disk information is greater than or equal to 2, and the corresponding disk array interface is created according to the disk array information; and the disk array interface is used to control the driver according to the disk array in a system call manner.
  • the information maps the disk set to a corresponding disk array device file, and mounts the disk in the Android system to the Android system according to the disk array device file.
  • the application generates the corresponding disk array information according to the information of the disk array RAID0 that needs to be mounted by the user, and obtains the information of the disk in the Android system, where the number of disks corresponding to the disk information is greater than or equal to 2, create a corresponding array interface according to the disk array information, and then use the created array interface to control the driver to map the disk array information to the disk array device file by using the system call, and the Android system is in the Android system, thereby the Android system
  • the disk array RAID0 can be mounted according to the disk array device file. After the disk array RAID0 is mounted, the application software in the Android system can be operated in the Android system like the U disk device.
  • FIG. 1 is a schematic structural diagram of a device in a hardware operating environment according to an embodiment of the present application.
  • the terminal in the embodiment of the present application may be a PC, or may be a smart phone, a tablet computer, an e-book reader, and an MP3 (Moving Picture). Experts Group Audio Layer III, Motion Picture Expert Compress Standard Audio Level 3) Player, MP4 (Moving Picture Experts Group Audio Layer IV, dynamic video experts compress standard audio layers 4) Players, portable computers and other portable terminal devices with display functions.
  • MP3 Motion Picture Expert Compress Standard Audio Level 3
  • MP4 Moving Picture Experts Group Audio Layer IV, dynamic video experts compress standard audio layers 4
  • Players Portable computers and other portable terminal devices with display functions.
  • the terminal may include a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005.
  • the communication bus 1002 is used to implement connection communication between these components.
  • the user interface 1003 can include a display, an input unit such as a keyboard, and the optional user interface 1003 can also include a standard wired interface, a wireless interface.
  • the network interface 1004 can optionally include a standard wired interface, a wireless interface (such as a WI-FI interface).
  • the memory 1005 may be a high speed RAM memory or a stable memory (non-volatile) Memory), such as disk storage.
  • the memory 1005 can also optionally be a storage device independent of the aforementioned processor 1001.
  • the terminal may further include a camera, RF (Radio) Frequency, RF) circuits, sensors, audio circuits, WiFi modules, and more.
  • sensors such as light sensors, motion sensors, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display according to the brightness of the ambient light, and the proximity sensor may turn off the display and/or when the mobile terminal moves to the ear. Backlighting.
  • the gravity acceleration sensor can detect the magnitude of acceleration in each direction (usually three axes), and can detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the mobile terminal (such as horizontal and vertical screen switching, Related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; of course, the mobile terminal can also be equipped with other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. No longer.
  • terminal structure shown in FIG. 1 does not constitute a limitation to the terminal, and may include more or less components than those illustrated, or a combination of certain components, or different component arrangements.
  • an operating system may be included in the memory 1005 as a computer storage medium.
  • a network communication module may be included in the memory 1005 as a computer storage medium.
  • a user interface module may be included in the memory 1005 as a computer storage medium.
  • a network operation control application may be included in the memory 1005 as a computer storage medium.
  • the network interface 1004 is mainly used to connect to the background server and perform data communication with the background server;
  • the user interface 1003 is mainly used to connect the client (user end), and perform data communication with the client;
  • the processor 1001 can be used to call the mount program of the disk array stored in the memory 1005 and perform the following operations:
  • processor 1001 can call the mount program of the disk array stored in the memory 1005, and also perform the following operations:
  • processor 1001 can call the mount program of the disk array stored in the memory 1005, and also perform the following operations:
  • processor 1001 can call the mount program of the disk array stored in the memory 1005, and also perform the following operations:
  • the broadcast information includes the disk array RAID0 error information
  • adding the disk array RAID0 and the disk array RAID0 mounted broadcast information so that the application receives the disk array RAID0 error, increases the disk array
  • RAID0 or RAID 1 mounts the broadcast information of the information the corresponding processing is performed.
  • processor 1001 can call the mount program of the disk array stored in the memory 1005, and also perform the following operations:
  • the broadcast information of the additional error data is transmitted, so that the application performs corresponding processing according to the broadcast information.
  • processor 1001 can call the mount program of the disk array stored in the memory 1005, and also perform the following operations:
  • the current status information of the RAID array of the disk array is queried according to the query instruction, and displayed.
  • processor 1001 can call the mount program of the disk array stored in the memory 1005, and also perform the following operations:
  • the RAID0 format disk to be added based on the expansion command is expanded by the expansion command on the corresponding RAID0 interface;
  • the RAID0 interface determined by the disk deletion instruction deletes the RAID0 format disk corresponding to the disk deletion instruction in the corresponding RAID0 according to the disk deletion instruction, and deletes Rebuild RAID0 after the disk; or,
  • the RAID0 interface determined by the add/delete command adds/deletes the add/delete in the corresponding RAID0 according to the add/delete command.
  • processor 1001 can call the mount program of the disk array stored in the memory 1005, and also perform the following operations:
  • the disk in the Android system is mounted to the Android system according to the disk array device file through a vold mechanism in the Android system.
  • the specific embodiment of the mounting device of the disk array of the present application is substantially the same as the embodiment of the mounting method of the disk array described below, and details are not described herein.
  • a schematic flowchart of a first implementation manner of a mounting method of a disk array of the present application, the method for mounting a disk array includes:
  • Step S10 receiving RAID ID configuration information input by the user, generating corresponding disk array information, and obtaining information about the disk in the Android system;
  • step S20 when the number of disks corresponding to the disk information is greater than or equal to 2, a corresponding disk array interface is created according to the disk array information;
  • step S30 the disk array interface is used to control the driver to map the disk set to the corresponding disk array device file according to the disk array information, and the disk in the Android system is determined according to the disk array device file. Mount to the Android system.
  • the present application is applied to an Android system.
  • the Android system can be as shown in FIG. 3.
  • the Android system can include a configuration module, an array creation module, and a RAID controller.
  • the foregoing steps can be implemented by each module.
  • RAID technology is the core processing technology of storage disk arrays, and its purpose is to improve the efficiency and fault tolerance of data processing.
  • the storage system generally adopts the necessary means to ensure the performance of the system.
  • the usual method is to set the cache system.
  • the caching system is a virtualized system that works by efficiently processing I/O requests to improve performance.
  • RAID0's stripe access technology distributes data blocks on each disk. Separate the physical disks first. When RAID0 is formed, the RAID of this mode will divide each disk into equal chunks.
  • RAID0 distributes data to different disks. For example, there are 9 data block size (4K) data, and the same size of disk sda, sdb and sdc. When writing, these 9 pieces of data will be 0, 3, 6 Store on the sda disk, 1, 4, 7 to the sdb disk, 2, 5, 8 to the sdc disk. If the capacity of the three disks is different, each disk will use the capacity of the smallest disk size; when the capacity is small, the remaining space of the large capacity disk will be used. RAID0 performs data block operations on member disks simultaneously with its efficient read and write capabilities.
  • the configuration module is configured to receive the configuration information of the RAID 0 of the disk array input by the user, where the configuration information of the RAID array of the disk array includes an array level configuration, a disk configuration, and the like, wherein when the user inputs the configuration information of the RAID 0 of the disk array, the user may enter the Android first.
  • Device in the system Driver enter the submenu
  • select Mutiple devices driver support enters the RAID level selection menu, selects RAID-0 in the RAID level selection menu, and completes the configuration information of the input disk array RAID0.
  • the corresponding disk array information is generated according to the configuration information of the disk array, and the disk configuration file is imported into the array creation module in the Android system; the array creation module creates an interface corresponding to the RAID0 in the Android system according to the disk array information generated by the configuration module. Then the controller calls the interface created on the Android system to control the underlying driver to perform the mounting operation by using a system call.
  • the driver maps the disk connected to the Android system to the disk array device according to the RAID0 level information. File, and then hang the disk in the Android system on the Android system according to the disk array device file.
  • the step of mounting the disk array to the Android system according to the disk array device file includes:
  • the disk in the Android system is mounted to the Android system according to the disk array device file through a vold mechanism in the Android system.
  • vold volume Daemon. In fact, it is responsible for completing the daemon of the system's CDROM, USB mass storage, MMC card and other extended storage mount tasks. The main feature it provides is support for hot plugging of these storage peripherals. It is roughly divided into three steps: 1. Creating a link: In vold as a daemon, on one hand, it accepts the driven information and passes the information to the application layer; on the other hand, it accepts the upper layer command and completes the corresponding. So there are two links here: (1)vold Socket: responsible for vold and application layer information transfer; (2) access to udev socket: responsible for vold and the underlying information transfer; these two links are created at the beginning of the process. 2.
  • Boot This is mainly the processing of existing peripheral storage devices when vold is started. First, load and parse vold.conf and check if the mount point has been mounted. Second, perform an MMC card mount; finally, handle USB mass storage. 3. Event processing: Here, by monitoring the two links, completing the processing of the dynamic event, and responding to the upper application operation, the disk in the Android system is mounted to the Android system in the above manner.
  • the application receives the disk array RAID0 configuration information input by the user, generates corresponding disk array information, and obtains information about the disk in the Android system; when the number of disks corresponding to the disk information is greater than or equal to 2, according to the disk Array information is used to create a corresponding disk array interface.
  • the disk array interface controls the driver to map the disk set to the corresponding disk array device file according to the disk array information, and according to the disk array device file,
  • the disk in the Android system is mounted to the Android system.
  • the application generates the corresponding disk array information according to the information of the disk array RAID0 that needs to be mounted by the user, and obtains the information of the disk in the Android system, where the number of disks corresponding to the disk information is greater than or equal to 2, create a corresponding array interface according to the disk array information, and then use the created array interface to control the driver to map the disk array information to the disk array device file by using the system call, and the Android system is in the Android system, thereby the Android system
  • the disk array RAID0 can be mounted according to the disk array device file. After the disk array RAID0 is mounted, the application software in the Android system can be operated in the Android system like the U disk device.
  • FIG. 4 is a schematic flowchart of a second implementation of a method for mounting a disk array according to the present application. Based on the embodiment shown in FIG. 2, the host of the disk array in the embodiment includes:
  • Step S40 receiving a read and write instruction sent by the application
  • Step S50 performing read and write operations on the disk array device file by the driver according to the read/write command.
  • the disks in the Android system form a mapping relationship with the disk array, so that the application reads and writes the disk array file as if the U disk is read or written.
  • the user can operate through the application program or the application itself generates a read/write instruction, and then reads and writes the disk array device file through the driver, thereby performing read and write operations on the disk.
  • FIG. 5 is a schematic flowchart of a third implementation of the mounting method of the disk array of the present application. According to the embodiment shown in FIG. 2, the mounting method further includes:
  • Step S60 detecting the state of the RAID 0 of the disk array, and obtaining state information of the corresponding RAID 0 of the disk array;
  • Step S70 When the preset status information is detected, the report is reported to the Android system.
  • a monitoring module is configured in the Android system for performing the steps in this embodiment, and the monitoring module can detect the state of the RAID 0 of the disk array in real time or periodically, and detects When the status of the disk array RAID0 is reported to the Android system, the status of the disk array is reported.
  • the manner in which the status of the disk array is reported to the Android system may be performed by using the information reported in the Android system, and is not described in detail in this embodiment.
  • FIG. 6 is a schematic flowchart of a fourth implementation of a method for mounting a disk array according to the present application, where the mounting method further includes:
  • Step S80 Send broadcast information of the Android system, where the broadcast information includes disk array RAID0 error information, increase disk array RAID0, and disk array RAID0 mounted broadcast information, so that the application receives the disk array RAID0 error, When the broadcast information of the disk array RAID0 or disk array RAID0 mount information is added, the corresponding processing is performed;
  • step S90 when the abnormality occurs in the disk in the RAID 0 of the disk array, the corresponding disk array interface is automatically reconstructed.
  • Step S100 When the disk array RAID0 reconstruction condition is not satisfied, the broadcast information of the additional error data is sent, so that the application performs corresponding processing according to the broadcast information.
  • the Android system When the Android system receives the status information of the disk array, it can determine the status of each disk in the disk array RAID0, determine whether each disk has an error or abnormality, and the Android system broadcasts the status information of each disk array RAID0 in real time or periodically. If the application receives the disk array RAID0 error or increases the broadcast information, the corresponding processing is performed. Specifically, if the broadcast information of the disk array RAID0 error is received, the corresponding RAID 13 level of the disk array is used.
  • Processing specifically: if the current RAID level of the disk array is RAID0, and the broadcast information of a disk error in the disk array is received, at this time, because other disks can continue to be used, the corresponding prompt information can be displayed, thereby prompting the user to replace Disk; if you receive the broadcast of the disk array, re-synchronize, that is, the disk will be synchronized to the normal use of the disk; if you receive the broadcast of the disk array RAID0, the corresponding mount information is displayed. Further, if an abnormal broadcast of all the disks in the RAID 0 is received, the RAID 0 interface of the disk array is rebuilt. If the reconstruction of the RAID 0 is not satisfied, the broadcast information with the additional error is sent. The application is caused to perform corresponding processing when receiving the broadcast information, such as displaying corresponding prompt information to prompt the user.
  • FIG. 7 is a schematic flowchart of a fifth implementation of a method for mounting a disk array according to the present application. According to the embodiment shown in FIG. 2 , the mounting method further includes:
  • Step S110 receiving a query instruction input by a user
  • Step S120 Query the current state information of the RAID array of the disk array according to the query instruction, and display the information.
  • the present embodiment also provides a view function of the disk array.
  • the user can perform a query operation on the operation interface, and the Android device generates a corresponding query instruction according to the user operation. Then, according to the query instruction triggered by the user, the current state information of the RAID 0 of the disk array is queried and displayed on the Android device, thereby implementing the query function.
  • the mounting method further includes:
  • step S130 when receiving the expansion command input by the user through the application, the RAID0 format disk to be added based on the expansion instruction is expanded by the expansion instruction on the corresponding RAID0 interface; or
  • Step S140 When receiving a disk deletion command input by the user through the application, the RAID0 interface determined by the disk deletion instruction deletes the RAID0 format disk corresponding to the disk deletion instruction in the corresponding RAID0 according to the disk deletion instruction. And rebuilding RAID0 after deleting the disk; or,
  • Step S150 When receiving an add/delete command of the hot spare disk input by the user through the application, the RAID0 interface determined by the add/delete command adds/delete the corresponding RAID0 according to the add/delete command. Add/delete the RAID0 format hot spare disk corresponding to the instruction.
  • a management function is also provided in the embodiment, specifically, when receiving the expansion command triggered based on the operation interface.
  • the RAID0 and the RAID0 format disk corresponding to the expansion command are obtained, and the RAID0 interface to be added is added to the RAID0 through the RAID0 interface corresponding to the expansion command to implement RAID0 expansion.
  • the RAID0 to be added is obtained.
  • the format disk determines whether the expanded RAID0 meets the requirements of the RAID0 level according to the number of disks to be added in the RAID0 format. If the requirements are met, the capacity expansion operation is performed. Otherwise, the error message is output.
  • the RAID0 format disk corresponding to the disk deletion instruction is determined, and the RAID0 interface corresponding to the disk deletion instruction is deleted in the RAID0 corresponding to the disk deletion instruction.
  • the RAID0 after the disk is deleted is rebuilt.
  • the reconstruction may be directly performed, or the RAID 0 format disk with the same number of disks to be deleted may be selected to reconstruct the RAID 0 after the disk is deleted.
  • the present application implements the mounting and management of the disk array by adding corresponding functions in the system, including status information reporting, rebuilding disk array, query and management functions.
  • the embodiment of the present application further provides an Android device, where the Android device includes: a memory, a processor, and a mounting program of a disk array stored on the memory and operable on the processor, the disk
  • the Android device includes: a memory, a processor, and a mounting program of a disk array stored on the memory and operable on the processor, the disk
  • the specific embodiment of the Android device of the present application is substantially the same as the embodiment of the mounting method of the foregoing disk array, and details are not described herein.
  • the embodiment of the present application further provides a computer readable storage medium, where the mounting program of the disk array is stored, and the mounting program of the disk array is executed by the processor to implement the above embodiment.
  • the steps of the mounting method of the disk array is executed by the processor to implement the above embodiment.
  • the technical solution of the present application which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM as described above). , a disk, an optical disk, including a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in the various embodiments of the present application.
  • a terminal device which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.

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

本申请公开了一种磁盘阵列的挂载方法,该磁盘阵列的挂载方法应用于Android系统,包括:接收用户输入的磁盘阵列RAID0配置信息,生成对应的磁盘阵列信息,并获得所述Android系统中磁盘的信息;在所述磁盘信息对应的磁盘数量大于或等于2时,根据所述磁盘阵列信息创建对应的磁盘阵列接口;采用系统调用的方式通过所述磁盘阵列接口控制驱动程序根据所述磁盘阵列信息将磁盘集映射为对应的磁盘阵列设备文件,并根据所述磁盘阵列设备文件将所述Android系统中磁盘挂载至所述Android系统。本申请还公开了一种Android设备和存储介质。本申请能够在Android系统实现RAID0的支持和挂载。

Description

磁盘阵列的挂载方法、Android设备和存储介质
技术领域
本申请涉及Android系统技术领域,尤其涉及一种磁盘阵列的挂载方法、Android设备和存储介质。
背景技术
随着互联网技术的不断发展,互联网应用的用户不断增加,全球范围内每天产生的信息数据越来越多,数据增加速度越来越快。在这种环境下,各种存储技术以及存储方案应运而生。其中RAID(Redundant Array of Independent Disks)冗余阵列技术凭借其高可靠性、大数据容量、适应强以及高带宽等优点,在大型服务器得到了广泛的应用。其中RIAD技术拥有多种等级方式,方便系统根据需求定制适合需求的存储方案。然而,虽然RAID技术在基于windows和linux系统的大型服务器和一些较高的数据安全场合得到广泛应用,但在基于Android系统对RAID的支持和挂载软件的设计基本上是空白。
上述内容仅用于辅助理解本申请的技术方案,并不代表承认上述内容是现有技术。
发明内容
本申请的主要目的在于提供一种磁盘阵列的挂载方法、Android设备和存储介质,旨在在Android系统实现RAID0的支持和挂载。
为实现上述目的,本申请提供一种磁盘阵列的挂载方法,所述磁盘阵列的挂载方法应用于Android系统,所述磁盘阵列的挂载方法包括以下步骤:
接收用户输入的磁盘阵列RAID0配置信息,生成对应的磁盘阵列信息,并获得所述Android系统中磁盘的信息;
在所述磁盘信息对应的磁盘数量大于或等于2时,根据所述磁盘阵列信息创建对应的磁盘阵列接口;
采用系统调用的方式通过所述磁盘阵列接口控制驱动程序根据所述磁盘阵列信息将磁盘集映射为对应的磁盘阵列设备文件,并根据所述磁盘阵列设备文件将所述Android系统中磁盘挂载至所述Android系统。
其中,所述挂载方法还包括:
接收应用程序发送的读写指令;
根据所述读写指令通过所述驱动程序对所述磁盘阵列设备文件进行读写操作。
其中,所述挂载方法还包括:
检测磁盘阵列的状态,获得磁盘阵列RAID0的状态信息;
在检测到预设的状态信息时,上报至所述Android系统。
其中,所述挂载方法还包括:
发送Android系统的广播信息,其中所述广播信息包括磁盘阵列RAID0出错信息、增加磁盘阵列RAID0和磁盘阵列RAID0挂载的广播信息,以使得所述应用程序在接收到磁盘阵列RAID0出错、增加磁盘阵列RAID0或磁盘阵列RAID0挂载信息的广播信息时,进行对应的处理。
其中,所述挂载方法还包括:
在检测到磁盘阵列RAID0中磁盘发生异常时,自动进行重建对应的磁盘阵列接口;
在不满足磁盘阵列RAID0重建条件时,发送附加错误数据的广播信息,以使得所述应用程序根据所述广播信息进行对应的处理。
其中,所述挂载方法还包括:
接收用户输入的查询指令;
根据所述查询指令查询磁盘阵列当前的状态信息,并显示。
其中,所述挂载方法还包括:
在接收用户通过应用程序输入的扩容指令时,基于所述扩容指令确定的待添加RAID0格式磁盘,通过所述扩容指令在对应的RAID0接口进行扩容操作;或者,
在接收用户通过应用程序输入的磁盘删除指令时,通过所述磁盘删除指令确定的RAID0接口,根据所述磁盘删除指令在对应的RAID0中删除所述磁盘删除指令对应的RAID0格式磁盘,并对删除磁盘后的RAID0进行重建;或者,
在接收用户通过应用程序输入的热备盘的添加/删除指令时,通过所述添加/删除指令确定的RAID0接口,根据所述添加/删除指令在对应的RAID0中添加/删除所述添加/删除指令对应的RAID0格式热备盘。
其中,所述根据所述磁盘阵列设备文件将磁盘阵列挂载至所述Android系统的步骤包括:
根据所述磁盘阵列设备文件通过Android系统中vold机制将所述Android系统中磁盘挂载至所述Android系统。
此外,为实现上述目的,本申请还提供一种Android设备,所述Android设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的磁盘阵列的挂载程序,所述磁盘阵列的挂载程序被所述处理器执行时实现如上所述的方法的步骤。
此外,为实现上述目的,本申请还提供一种存储介质,所述计算机可读存储介质上存储有磁盘阵列的挂载程序,所述磁盘阵列的挂载程序被处理器执行时实现如上所述的磁盘阵列的挂载方法的步骤。
本申请通过接收用户输入的磁盘阵列RAID0配置信息,生成对应的磁盘阵列信息,并获得所述Android系统中磁盘的信息;在所述磁盘信息对应的磁盘数量大于或等于2时,根据所述磁盘阵列信息创建对应的磁盘阵列接口;采用系统调用的方式通过所述磁盘阵列接口控制驱动程序根据所述磁盘阵列信息将磁盘集映射为对应的磁盘阵列设备文件,并根据所述磁盘阵列设备文件将所述Android系统中磁盘挂载至所述Android系统。通过上述方式,本申请根据用户输入需要挂载的磁盘阵列RAID0的信息,生成对应的磁盘阵列信息,并并获得所述Android系统中磁盘的信息,在所述磁盘信息对应的磁盘数量大于或等于2时,根据所述磁盘阵列信息创建对应的阵列接口,然后采用系统调用的方式使用创建的阵列接口控制驱动程序将磁盘阵列信息将磁盘映射为磁盘阵列设备文件,存在Android系统中,从而Android系统可以根据磁盘阵列设备文件挂载磁盘阵列RAID0,挂载磁盘阵列RAID0后,则可以在Android系统中实现Android系统中应用软件像操作U盘设备那样操作磁盘阵列RAID0。
附图说明
图1是本申请实施例方案涉及的硬件运行环境的装置结构示意图;
图2为本申请磁盘阵列的挂载方法第一实施的流程示意图;
图3为本申请实施例中Android系统中的模块示意图;
图4为本申请磁盘阵列的挂载方法第二实施的流程示意图;
图5为本申请磁盘阵列的挂载方法第三实施的流程示意图;
图6为本申请磁盘阵列的挂载方法第四实施的流程示意图;
图7为本申请磁盘阵列的挂载方法第五实施的流程示意图。
本申请目的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请实施例的主要解决方案是:
由于现有技术基于Android系统对RAID的支持和挂载软件的设计基本上是空白。
为了解决上述技术问题,本申请提供一种磁盘阵列的挂载方法、Android设备和存储介质,通过接收用户输入的磁盘阵列RAID0配置信息,生成对应的磁盘阵列信息,并获得所述Android系统中磁盘的信息;在所述磁盘信息对应的磁盘数量大于或等于2时,根据所述磁盘阵列信息创建对应的磁盘阵列接口;采用系统调用的方式通过所述磁盘阵列接口控制驱动程序根据所述磁盘阵列信息将磁盘集映射为对应的磁盘阵列设备文件,并根据所述磁盘阵列设备文件将所述Android系统中磁盘挂载至所述Android系统。通过上述方式,本申请根据用户输入需要挂载的磁盘阵列RAID0的信息,生成对应的磁盘阵列信息,并并获得所述Android系统中磁盘的信息,在所述磁盘信息对应的磁盘数量大于或等于2时,根据所述磁盘阵列信息创建对应的阵列接口,然后采用系统调用的方式使用创建的阵列接口控制驱动程序将磁盘阵列信息将磁盘映射为磁盘阵列设备文件,存在Android系统中,从而Android系统可以根据磁盘阵列设备文件挂载磁盘阵列RAID0,挂载磁盘阵列RAID0后,则可以在Android系统中实现Android系统中应用软件像操作U盘设备那样操作磁盘阵列RAID0。
如图1所示,图1是本申请实施例方案涉及的硬件运行环境的装置结构示意图。
本申请实施例终端可以是PC,也可以是智能手机、平板电脑、电子书阅读器、MP3(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)播放器、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、便携计算机等具有显示功能的可移动式终端设备。
如图1所示,该终端可以包括:处理器1001,例如CPU,通信总线1002,用户接口1003,网络接口1004,存储器1005。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选的用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。
可选地,终端还可以包括摄像头、RF(Radio Frequency,射频)电路,传感器、音频电路、WiFi模块等等。其中,传感器比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示屏的亮度,接近传感器可在移动终端移动到耳边时,关闭显示屏和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别移动终端姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;当然,移动终端还可配置陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。
本领域技术人员可以理解,图1中示出的终端结构并不构成对终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
如图1所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及网络操作控制应用程序。
在图1所示的终端中,网络接口1004主要用于连接后台服务器,与后台服务器进行数据通信;用户接口1003主要用于连接客户端(用户端),与客户端进行数据通信;而处理器1001可以用于调用存储器1005中存储的磁盘阵列的挂载程序,并执行以下操作:
接收用户输入的磁盘阵列RAID0配置信息,生成对应的磁盘阵列信息,并获得所述Android系统中磁盘的信息;
在所述磁盘信息对应的磁盘数量大于或等于2时,根据所述磁盘阵列信息创建对应的磁盘阵列接口;
采用系统调用的方式通过所述磁盘阵列接口控制驱动程序根据所述磁盘阵列信息将磁盘集映射为对应的磁盘阵列设备文件,并根据所述磁盘阵列设备文件将所述Android系统中磁盘挂载至所述Android系统。
进一步地,处理器1001可以调用存储器1005中存储的磁盘阵列的挂载程序,还执行以下操作:
接收应用程序发送的读写指令;
根据所述读写指令通过所述驱动程序对所述磁盘阵列设备文件进行读写操作。
进一步地,处理器1001可以调用存储器1005中存储的磁盘阵列的挂载程序,还执行以下操作:
检测磁盘阵列RAID0的状态,获得磁盘阵列RAID0的状态信息;
在检测到预设的状态信息时,上报至所述Android系统。
进一步地,处理器1001可以调用存储器1005中存储的磁盘阵列的挂载程序,还执行以下操作:
发送Android系统的广播信息,其中所述广播信息包括磁盘阵列RAID0出错信息、增加磁盘阵列RAID0和磁盘阵列RAID0挂载的广播信息,以使得所述应用程序在接收到磁盘阵列RAID0出错、增加磁盘阵列RAID0或磁盘阵列RAID0挂载信息的广播信息时,进行对应的处理。
进一步地,处理器1001可以调用存储器1005中存储的磁盘阵列的挂载程序,还执行以下操作:
在检测到磁盘阵列RAID0中磁盘发生异常时,自动进行重建对应的磁盘阵列接口;
在不满足磁盘阵列RAID0重建条件时,发送附加错误数据的广播信息,以使得所述应用程序根据所述广播信息进行对应的处理。
进一步地,处理器1001可以调用存储器1005中存储的磁盘阵列的挂载程序,还执行以下操作:
接收用户输入的查询指令;
根据所述查询指令查询磁盘阵列RAID0当前的状态信息,并显示。
进一步地,处理器1001可以调用存储器1005中存储的磁盘阵列的挂载程序,还执行以下操作:
在接收用户通过应用程序输入的扩容指令时,基于所述扩容指令确定的待添加RAID0格式磁盘,通过所述扩容指令在对应的RAID0接口进行扩容操作;或者,
在接收用户通过应用程序输入的磁盘删除指令时,通过所述磁盘删除指令确定的RAID0接口,根据所述磁盘删除指令在对应的RAID0中删除所述磁盘删除指令对应的RAID0格式磁盘,并对删除磁盘后的RAID0进行重建;或者,
在接收用户通过应用程序输入的热备盘的添加/删除指令时,通过所述添加/删除指令确定的RAID0接口,根据所述添加/删除指令在对应的RAID0中添加/删除所述添加/删除指令对应的RAID0格式热备盘。
进一步地,处理器1001可以调用存储器1005中存储的磁盘阵列的挂载程序,还执行以下操作:
根据所述磁盘阵列设备文件通过Android系统中vold机制将所述Android系统中磁盘挂载至所述Android系统。
本申请磁盘阵列的挂载设备的具体实施例与下述磁盘阵列的挂载方法各实施例基本相同,在此不作赘述。
参照图2,本申请磁盘阵列的挂载方法第一实施的流程示意图,所述磁盘阵列的挂载方法方法包括:
步骤S10,接收用户输入的磁盘阵列RAID0配置信息,生成对应的磁盘阵列信息,并获得所述Android系统中磁盘的信息;
步骤S20,在所述磁盘信息对应的磁盘数量大于或等于2时,根据所述磁盘阵列信息创建对应的磁盘阵列接口;
步骤S30,采用系统调用的方式通过所述磁盘阵列接口控制驱动程序根据所述磁盘阵列信息将磁盘集映射为对应的磁盘阵列设备文件,并根据所述磁盘阵列设备文件将所述Android系统中磁盘挂载至所述Android系统。
具体地,本申请应用于Android系统中,本实施例中Android系统可以如图3所示,Android系统可以包括配置模块、阵列创建模块和RAID控制器等,上述各步骤可以由各模块实现。RAID技术是存储磁盘阵列的核心处理技术,其目的是提高数据处理的效率和容错能力。存储系统在实现上一般都会采用必要手段来保证系统的性能,通常的办法是设置缓存系统。缓存系统是一个虚拟化的系统,其原理是通过高效的处理I/O请求来提高性能。RAID0的条带化存取技术将数据区块分布在每个磁盘上。先分隔物理磁盘,在组成RAID0时,该模式的RAID会把每块磁盘分隔成等量的区块(chunk);另外,当有数据要写入RAID时,数据会被分割成与区块等量大小,并且同时对多个磁盘做写动作,然后依序放置到各个的磁盘里面去。接下来的所有数据都将被写入到最大的那块磁盘中去,此时的性能相比之前会变差,因为少了一块可以存放数据的磁盘。RAID0是将数据分散存放到不同磁盘上,比如有9个数据块大小(4K)的数据,同时有同样大小的磁盘sda、sdb和sdc,写的时候这9块数据会将0,3,6存放到sda盘上,1,4,7存放到sdb盘上,2,5,8存放到sdc盘上。如果这3块盘的容量不一样,则每块盘会使用最小磁盘大小的容量;容量小的写满后会使用容量大的盘余下的空间。RAID0以其高效的读写能力同时对成员盘进行数据区块操作。
具体地,配置模块用于接收用户输入的磁盘阵列RAID0的配置信息,其中磁盘阵列RAID0的配置信息包括阵列等级配置、磁盘配置等,其中用户在输入磁盘阵列RAID0的配置信息时,可以先进入Android系统中Device Driver,进入子菜单,在子菜单中选择Mutiple devices driver support(RAID and LVM)进入RAID等级选择菜单,在RAID等级选择菜单把RAID-0选上,从而完成输入的磁盘阵列RAID0的配置信息。
然后根据磁盘阵列的配置信息生成对应的磁盘阵列信息,并导入磁盘配置文件至Android系统中的阵列创建模块;阵列创建模块则根据配置模块生成的磁盘阵列信息在Android系统中创建对应RAID0的接口,然后控制器则调用Android系统上所创建的接口采用系统调用的方式控制底层驱动程序执行挂载操作,具体地,驱动程序根据RAID0的等级信息,将连接在Android系统中的磁盘映射为磁盘阵列设备文件,然后根据磁盘阵列设备文件将Android系统中磁盘挂在载Android系统中。进一步地,根据所述磁盘阵列设备文件将磁盘阵列挂载至所述Android系统的步骤包括:
根据所述磁盘阵列设备文件通过Android系统中vold机制将所述Android系统中磁盘挂载至所述Android系统。
vold的全称是volume daemon。实际上是负责完成系统的CDROM、USB大容量存储、MMC卡等扩展存储的挂载任务自动完成的守护进程。它提供的主要特点是支持这些存储外设的热插拔。大致分为3步:1、创建链接:在vold作为一个守护进程,一方面接受驱动的信息,并把信息传给应用层;另一方面接受上层的命令并完成相应。所以这里的链接一共有两条:(1)vold socket:负责vold与应用层的信息传递;(2)访问udev的socket:负责vold与底层的信息传递;这两个链接都是在进程的一开始完成创建的。2.引导:这里主要是在vold启动时,对现有外设存储设备的处理。首先,要加载并解析vold.conf,并检查挂载点是否已经被挂载;其次,执行MMC卡挂载;最后,处理USB大容量存储。3.事件处理:这里通过对两个链接的监听,完成对动态事件的处理,以及对上层应用操作的响应,经过上述方式将Android系统中磁盘挂载至所述Android系统。
本申请通过接收用户输入的磁盘阵列RAID0配置信息,生成对应的磁盘阵列信息,并获得所述Android系统中磁盘的信息;在所述磁盘信息对应的磁盘数量大于或等于2时,根据所述磁盘阵列信息创建对应的磁盘阵列接口;采用系统调用的方式通过所述磁盘阵列接口控制驱动程序根据所述磁盘阵列信息将磁盘集映射为对应的磁盘阵列设备文件,并根据所述磁盘阵列设备文件将所述Android系统中磁盘挂载至所述Android系统。通过上述方式,本申请根据用户输入需要挂载的磁盘阵列RAID0的信息,生成对应的磁盘阵列信息,并并获得所述Android系统中磁盘的信息,在所述磁盘信息对应的磁盘数量大于或等于2时,根据所述磁盘阵列信息创建对应的阵列接口,然后采用系统调用的方式使用创建的阵列接口控制驱动程序将磁盘阵列信息将磁盘映射为磁盘阵列设备文件,存在Android系统中,从而Android系统可以根据磁盘阵列设备文件挂载磁盘阵列RAID0,挂载磁盘阵列RAID0后,则可以在Android系统中实现Android系统中应用软件像操作U盘设备那样操作磁盘阵列RAID0。
进一步的,参照图4,图4为本申请磁盘阵列的挂载方法第二实施的流程示意图,基于上述图2所示的实施例,在本实施例中该磁盘阵列的挂载方包括:
步骤S40,接收应用程序发送的读写指令;
步骤S50,根据所述读写指令通过所述驱动程序对所述磁盘阵列设备文件进行读写操作。
在步骤S30实现挂载之后,Android系统中各磁盘,则会与磁盘阵列形成对应的映射关系,从而使得应用程序在进行读写操作时,像读写U盘一样对磁盘阵列文件进行读写,具体地,用户可以通过应用程序进行操作或者应用程序本身生成读写指令,然后通过驱动程序对磁盘阵列设备文件进行读写操作,进而实现对磁盘进行读写操作。
进一步地,参照图5,图5为本申请磁盘阵列的挂载方法第三实施的流程示意图,基于上述图2所示的实施例,所述挂载方法还包括:
步骤S60,检测磁盘阵列RAID0的状态,获得对应的磁盘阵列RAID0的状态信息;
步骤S70,在检测到预设的状态信息时,上报至所述Android系统。
具体地,为方便使用,本实施例在实际使用过程中,在Android系统中设置有监控模块用于执行本实施例中步骤,该监控模块可以实时或者定时检测磁盘阵列RAID0的状态,在检测到磁盘阵列RAID0的状态时,向Android系统上报磁盘阵列的状态。其中向Android系统上报磁盘阵列的状态的方式可以采用Android系统中上报信息的方式进行,本实施例中不做多于赘述。
进一步地,参阅图6,图6为本申请磁盘阵列的挂载方法第四实施的流程示意图,所述挂载方法还包括:
步骤S80,发送Android系统的广播信息,其中所述广播信息包括磁盘阵列RAID0出错信息、增加磁盘阵列RAID0和磁盘阵列RAID0挂载的广播信息,以使得所述应用程序在接收到磁盘阵列RAID0出错、增加磁盘阵列RAID0或磁盘阵列RAID0挂载信息的广播信息时,进行对应的处理;
步骤S90,在检测到磁盘阵列RAID0中磁盘发生异常时,自动进行重建对应的磁盘阵列接口。
步骤S100,在不满足磁盘阵列RAID0重建条件时,发送附加错误数据的广播信息,以使得所述应用程序根据所述广播信息进行对应的处理。
在Android系统接收到磁盘阵列的状态信息时,可以对磁盘阵列RAID0中各磁盘的状态进行判断,确定各磁盘是否出现出错、异常等情况,Android系统会实时或者定时广播各磁盘阵列RAID0的状态信息,如果应用程序接收到磁盘阵列RAID0出错或者增加等广播信息时,进行对应的处理,具体的,如果接收到磁盘阵列RAID0出错的广播信息,则根据当前使用的磁盘阵列RAID0的等级,进行对应的处理,具体地:如果当前磁盘阵列RAID的等级为RAID0,且接收到磁盘阵列中一磁盘出错的广播信息,此时因为有其他磁盘可以继续用,因此可以显示对应的提示信息,从而提醒用户更换磁盘;如果收到增加磁盘阵列的广播,则重新进行同步,即将新增磁盘同步正常使用磁盘的内容;如果收到磁盘阵列RAID0挂载的广播,则显示对应的挂载信息。进一步地,如果接收到磁盘阵列RAID0中全部磁盘出现异常的广播,则进行磁盘阵列RAID0接口的重建,在进行重建时,如果当前不满足磁盘阵列RAID0的重建,则发送附加错误的广播信息,以使得应用程序在接收到该广播信息时进行对应的处理,比如显示对应的提示信息以提示用户。
进一步地,参阅图7,图7为本申请磁盘阵列的挂载方法第五实施的流程示意图,基于上述图2所示的实施例,所述挂载方法还包括:
步骤S110,接收用户输入的查询指令;
步骤S120,根据所述查询指令查询磁盘阵列RAID0当前的状态信息,并显示。
为方便用户查看磁盘阵列的数据,及时掌控磁盘的情况,本实施例中还提供磁盘阵列的查看功能,具体地,用户可以在操作界面进行查询操作,Android设备根据用户操作产生对应的查询指令,然后根据用户触发的查询指令,查询磁盘阵列RAID0的当前状态信息,并在Android设备中显示,从而实现查询功能。
进一步地,基于上述图2所示的实施例,所述挂载方法还包括:
步骤S130,在接收用户通过应用程序输入的扩容指令时,基于所述扩容指令确定的待添加RAID0格式磁盘,通过所述扩容指令在对应的RAID0接口进行扩容操作;或者,
步骤S140,在接收用户通过应用程序输入的磁盘删除指令时,通过所述磁盘删除指令确定的RAID0接口,根据所述磁盘删除指令在对应的RAID0中删除所述磁盘删除指令对应的RAID0格式磁盘,并对删除磁盘后的RAID0进行重建;或者,
步骤S150,在接收用户通过应用程序输入的热备盘的添加/删除指令时,通过所述添加/删除指令确定的RAID0接口,根据所述添加/删除指令在对应的RAID0中添加/删除所述添加/删除指令对应的RAID0格式热备盘。
为了避免有些磁盘使用时间比较长,磁盘老化,或者磁盘存储空间不足的情况,在实际使用中本实施例中还提供有管理功能,具体地,在接收到基于所述操作界面触发的扩容指令时,获取该扩容指令对应的RAID0及待添加RAID0格式磁盘,通过该扩容指令对应的RAID0接口将该待添加RAID0格式磁盘添加至该RAID0中,以实现RAID0的扩容,优选地,在得到待添加RAID0格式磁盘,根据该待添加RAID0格式磁盘的数量确定扩容后的RAID0是否满足该RAID0的等级对应的要求,在满足要求时进行扩容操作,否则输出错误提示信息。
在接收到基于所述操作界面触发的磁盘删除指令时,确定磁盘删除指令对应的待删除RAID0格式磁盘,通过所述磁盘删除指令对应的RAID0接口,在所述磁盘删除指令对应的RAID0中删除该待删除RAID0格式磁盘,在删除该待删除RAID0格式磁盘后,对删除磁盘后的RAID0进行重建。优选地,在删除磁盘后的RAID0满足该RAID0的等级对应的要求时,可直接进行重建,也可选择与待删除RAID0格式磁盘的数量相同的其他RAID0格式磁盘对该删除磁盘后的RAID0进行重建,以保证该删除磁盘后的RAID0的容量不变;在删除磁盘后的RAID0不满足该RAID0的等级对应的要求时,选择与待删除RAID0格式磁盘的数量相同的其他RAID0格式磁盘对该删除磁盘后的RAID0进行重建。
在接收到基于所述操作界面触发的热备盘的添加/删除指令时,确定添加/删除指令对应的热备盘,通过所述添加/删除指令对应的RAID0接口,在所述添加/删除指令对应的RAID0中删除该热备盘。
根据上述描述,本申请通过在系统中增加对应的功能,包括状态信息上报、重建磁盘阵列、查询和管理等功能,从而实现了磁盘阵列的挂载和管理。
此外,本申请实施例还提出一种Android设备,所述Android设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的磁盘阵列的挂载程序,所述磁盘阵列的挂载程序被所述处理器执行时实现如上实施例所述的方法的步骤。
本申请Android设备的具体实施例与上述磁盘阵列的挂载方法各实施例基本相同,在此不作赘述。
此外,本申请实施例还提出一种计算机可读存储介质,所述计算机可读存储介质上存储有磁盘阵列的挂载程序,所述磁盘阵列的挂载程序被处理器执行时实现如上实施例所述的磁盘阵列的挂载方法的步骤。
本申请计算机可读存储介质的具体实施例与上述磁盘阵列的挂载方法各实施例基本相同,在此不作赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种磁盘阵列的挂载方法,其特征在于,所述磁盘阵列的挂载方法应用于Android系统,所述磁盘阵列的挂载方法包括以下步骤:
    接收用户输入的磁盘阵列RAID0配置信息,生成对应的磁盘阵列信息,并获得所述Android系统中磁盘的信息;
    在所述磁盘信息对应的磁盘数量大于或等于2时,根据所述磁盘阵列信息创建对应的磁盘阵列接口;
    采用系统调用的方式通过所述磁盘阵列接口控制驱动程序根据所述磁盘阵列信息将磁盘集映射为对应的磁盘阵列设备文件,并根据所述磁盘阵列设备文件将所述Android系统中磁盘挂载至所述Android系统。
  2. 如权利要求1所述的磁盘阵列的挂载方法,其特征在于,所述挂载方法还包括:
    接收应用程序发送的读写指令;
    根据所述读写指令通过所述驱动程序对所述磁盘阵列设备文件进行读写操作。
  3. 如权利要求1所述的磁盘阵列的挂载方法,其特征在于,所述挂载方法还包括:
    检测磁盘阵列RAID0的状态,获得磁盘阵列RAID0的状态信息;
    在检测到预设的状态信息时,上报至所述Android系统。
  4. 如权利要求3所述的磁盘阵列的挂载方法,其特征在于,所述挂载方法还包括:
    发送Android系统的广播信息,其中所述广播信息包括磁盘阵列RAID0出错信息、增加磁盘阵列RAID0和磁盘阵列RAID0挂载的广播信息,以使得所述应用程序在接收到磁盘阵列RAID0出错、增加磁盘阵列RAID0或磁盘阵列RAID0挂载信息的广播信息时,进行对应的处理。
  5. 如权利要求3所述的磁盘阵列的挂载方法,其特征在于,所述挂载方法还包括:
    在检测到磁盘阵列RAID0中磁盘发生异常时,自动进行重建对应的磁盘阵列接口;
    在不满足磁盘阵列RAID0重建条件时,发送附加错误数据的广播信息,以使得所述应用程序根据所述广播信息进行对应的处理。
  6. 如权利要求1所述的磁盘阵列的挂载方法,其特征在于,所述挂载方法还包括:
    接收用户输入的查询指令;
    根据所述查询指令查询磁盘阵列RAID0当前的状态信息,并显示。
  7. 如权利要求1所述的磁盘阵列的挂载方法,其特征在于,所述挂载方法还包括:
    在接收用户通过应用程序输入的扩容指令时,基于所述扩容指令确定的待添加RAID0格式磁盘,通过所述扩容指令在对应的RAID0接口进行扩容操作;或者,
    在接收用户通过应用程序输入的磁盘删除指令时,通过所述磁盘删除指令确定的RAID0接口,根据所述磁盘删除指令在对应的RAID0中删除所述磁盘删除指令对应的RAID0格式磁盘,并对删除磁盘后的RAID0进行重建;或者,
    在接收用户通过应用程序输入的热备盘的添加/删除指令时,通过所述添加/删除指令确定的RAID0接口,根据所述添加/删除指令在对应的RAID0中添加/删除所述添加/删除指令对应的RAID0格式热备盘。
  8. 如权利要求1所述的磁盘阵列的挂载方法,其特征在于,所述根据所述磁盘阵列设备文件将磁盘阵列挂载至所述Android系统的步骤包括:
    根据所述磁盘阵列设备文件通过Android系统中vold机制将所述Android系统中磁盘挂载至所述Android系统。
  9. 一种Android设备,其特征在于,所述Android设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的磁盘阵列的挂载程序,所述磁盘阵列的挂载程序被所述处理器执行时实现如下步骤:
    接收用户输入的磁盘阵列RAID0配置信息,生成对应的磁盘阵列信息,并获得所述Android系统中磁盘的信息;
    在所述磁盘信息对应的磁盘数量大于或等于2时,根据所述磁盘阵列信息创建对应的磁盘阵列接口;
    采用系统调用的方式通过所述磁盘阵列接口控制驱动程序根据所述磁盘阵列信息将磁盘集映射为对应的磁盘阵列设备文件,并根据所述磁盘阵列设备文件将所述Android系统中磁盘挂载至所述Android系统。
  10. 如权利要求9所述的Android设备,其特征在于,所述挂载方法还包括:
    接收应用程序发送的读写指令;
    根据所述读写指令通过所述驱动程序对所述磁盘阵列设备文件进行读写操作。
  11. 如权利要求9所述的Android设备,其特征在于,所述挂载方法还包括:
    检测磁盘阵列RAID0的状态,获得磁盘阵列RAID0的状态信息;
    在检测到预设的状态信息时,上报至所述Android系统。
  12. 如权利要求11所述的Android设备,其特征在于,所述挂载方法还包括:
    发送Android系统的广播信息,其中所述广播信息包括磁盘阵列RAID0出错信息、增加磁盘阵列RAID0和磁盘阵列RAID0挂载的广播信息,以使得所述应用程序在接收到磁盘阵列RAID0出错、增加磁盘阵列RAID0或磁盘阵列RAID0挂载信息的广播信息时,进行对应的处理。
  13. 如权利要求11所述的Android设备,其特征在于,所述挂载方法还包括:
    在检测到磁盘阵列RAID0中磁盘发生异常时,自动进行重建对应的磁盘阵列接口;
    在不满足磁盘阵列RAID0重建条件时,发送附加错误数据的广播信息,以使得所述应用程序根据所述广播信息进行对应的处理。
  14. 如权利要求9所述的Android设备,其特征在于,所述挂载方法还包括:
    接收用户输入的查询指令;
    根据所述查询指令查询磁盘阵列RAID0当前的状态信息,并显示。
  15. 如权利要求9所述的Android设备,其特征在于,所述挂载方法还包括:
    在接收用户通过应用程序输入的扩容指令时,基于所述扩容指令确定的待添加RAID0格式磁盘,通过所述扩容指令在对应的RAID0接口进行扩容操作;或者,
    在接收用户通过应用程序输入的磁盘删除指令时,通过所述磁盘删除指令确定的RAID0接口,根据所述磁盘删除指令在对应的RAID0中删除所述磁盘删除指令对应的RAID0格式磁盘,并对删除磁盘后的RAID0进行重建;或者,
    在接收用户通过应用程序输入的热备盘的添加/删除指令时,通过所述添加/删除指令确定的RAID0接口,根据所述添加/删除指令在对应的RAID0中添加/删除所述添加/删除指令对应的RAID0格式热备盘。
  16. 如权利要求9所述的Android设备,其特征在于,所述根据所述磁盘阵列设备文件将磁盘阵列挂载至所述Android系统的步骤包括:
    根据所述磁盘阵列设备文件通过Android系统中vold机制将所述Android系统中磁盘挂载至所述Android系统。
  17. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有磁盘阵列的挂载程序,所述磁盘阵列的挂载程序被处理器执行时实现如下步骤:
    接收用户输入的磁盘阵列RAID0配置信息,生成对应的磁盘阵列信息,并获得所述Android系统中磁盘的信息;
    在所述磁盘信息对应的磁盘数量大于或等于2时,根据所述磁盘阵列信息创建对应的磁盘阵列接口;
    采用系统调用的方式通过所述磁盘阵列接口控制驱动程序根据所述磁盘阵列信息将磁盘集映射为对应的磁盘阵列设备文件,并根据所述磁盘阵列设备文件将所述Android系统中磁盘挂载至所述Android系统。
  18. 如权利要求17所述的计算机可读存储介质,其特征在于,所述磁盘阵列的挂载程序被处理器执行时还实现如下步骤:
    检测磁盘阵列RAID0的状态,获得磁盘阵列RAID0的状态信息;
    在检测到预设的状态信息时,上报至所述Android系统。
  19. 如权利要求18所述的计算机可读存储介质,其特征在于,所述磁盘阵列的挂载程序被处理器执行时还实现如下步骤:
    发送Android系统的广播信息,其中所述广播信息包括磁盘阵列RAID0出错信息、增加磁盘阵列RAID0和磁盘阵列RAID0挂载的广播信息,以使得所述应用程序在接收到磁盘阵列RAID0出错、增加磁盘阵列RAID0或磁盘阵列RAID0挂载信息的广播信息时,进行对应的处理。
  20. 如权利要求18所述的计算机可读存储介质,其特征在于,所述磁盘阵列的挂载程序被处理器执行时还实现如下步骤:
    在检测到磁盘阵列RAID0中磁盘发生异常时,自动进行重建对应的磁盘阵列接口;
    在不满足磁盘阵列RAID0重建条件时,发送附加错误数据的广播信息,以使得所述应用程序根据所述广播信息进行对应的处理。
PCT/CN2018/084328 2017-09-30 2018-04-25 磁盘阵列的挂载方法、Android设备和存储介质 WO2019062102A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710934379.7 2017-09-30
CN201710934379.7A CN107678693A (zh) 2017-09-30 2017-09-30 磁盘阵列的挂载方法、Android设备和存储介质

Publications (1)

Publication Number Publication Date
WO2019062102A1 true WO2019062102A1 (zh) 2019-04-04

Family

ID=61139126

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/084328 WO2019062102A1 (zh) 2017-09-30 2018-04-25 磁盘阵列的挂载方法、Android设备和存储介质

Country Status (2)

Country Link
CN (1) CN107678693A (zh)
WO (1) WO2019062102A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107817949A (zh) * 2017-09-30 2018-03-20 深圳市华德安科技有限公司 磁盘阵列的挂载方法、Android设备和存储介质
CN107678693A (zh) * 2017-09-30 2018-02-09 深圳市华德安科技有限公司 磁盘阵列的挂载方法、Android设备和存储介质
CN107748651A (zh) * 2017-09-30 2018-03-02 深圳市华德安科技有限公司 磁盘阵列的挂载方法、Android设备和存储介质
CN108833669A (zh) * 2018-04-27 2018-11-16 Oppo广东移动通信有限公司 关机方法及相关产品
CN112463045B (zh) * 2020-11-23 2023-01-10 苏州浪潮智能科技有限公司 磁盘冗余阵列多样性批量控制方法、装置、设备、产品

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202512557U (zh) * 2012-03-28 2012-10-31 山东超越数控电子有限公司 一种基于Linux系统的挂载远程磁盘阵列
US20120317356A1 (en) * 2011-06-09 2012-12-13 Advanced Micro Devices, Inc. Systems and methods for sharing memory between a plurality of processors
CN104699564A (zh) * 2013-12-09 2015-06-10 中国移动通信集团公司 一种采用Raid0磁盘组服务器的自动恢复方法及装置
CN107678693A (zh) * 2017-09-30 2018-02-09 深圳市华德安科技有限公司 磁盘阵列的挂载方法、Android设备和存储介质
CN107817949A (zh) * 2017-09-30 2018-03-20 深圳市华德安科技有限公司 磁盘阵列的挂载方法、Android设备和存储介质

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101984399B (zh) * 2010-10-29 2014-11-05 中兴通讯股份有限公司 一种软独立冗余磁盘阵列的管理方法和系统
CN103530186B (zh) * 2013-05-30 2017-11-10 Tcl集团股份有限公司 实现相机应用支持多位置存储的方法及系统
US9575853B2 (en) * 2014-12-12 2017-02-21 Intel Corporation Accelerated data recovery in a storage system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120317356A1 (en) * 2011-06-09 2012-12-13 Advanced Micro Devices, Inc. Systems and methods for sharing memory between a plurality of processors
CN202512557U (zh) * 2012-03-28 2012-10-31 山东超越数控电子有限公司 一种基于Linux系统的挂载远程磁盘阵列
CN104699564A (zh) * 2013-12-09 2015-06-10 中国移动通信集团公司 一种采用Raid0磁盘组服务器的自动恢复方法及装置
CN107678693A (zh) * 2017-09-30 2018-02-09 深圳市华德安科技有限公司 磁盘阵列的挂载方法、Android设备和存储介质
CN107817949A (zh) * 2017-09-30 2018-03-20 深圳市华德安科技有限公司 磁盘阵列的挂载方法、Android设备和存储介质

Also Published As

Publication number Publication date
CN107678693A (zh) 2018-02-09

Similar Documents

Publication Publication Date Title
WO2019062102A1 (zh) 磁盘阵列的挂载方法、Android设备和存储介质
WO2019062109A1 (zh) 磁盘阵列的挂载方法、Android设备和存储介质
WO2014082500A1 (zh) 页面加载方法及其系统、计算机存储介质
WO2017142293A1 (en) Electronic device and method of application data display therefor
WO2014000635A1 (zh) 阅读器提供服务的方法、阅读器、终端及计算机存储介质
WO2018161578A1 (zh) 动态调节屏幕刷新率的方法、装置、存储介质及电子设备
WO2016165556A1 (zh) 一种视频流的数据处理方法、装置和系统
WO2019062104A1 (zh) 磁盘阵列的挂载方法、Android设备和存储介质
WO2018155893A1 (en) Interface providing method for multitasking and electronic device implementing the same
WO2018143624A1 (ko) 디스플레이 제어 방법, 저장 매체 및 전자 장치
WO2019062099A1 (zh) 磁盘阵列的挂载方法、Android设备和存储介质
WO2016085253A1 (en) Screen configuration method, electronic device, and storage medium
WO2019062106A1 (zh) 磁盘阵列的挂载方法、Android设备和存储介质
WO2019062093A1 (zh) Raid管理方法、装置及计算机可读存储介质
WO2020246822A1 (en) Electronic device and method for switching electronic device between dual standby mode and single standby mode
WO2018056641A1 (ko) 전자 장치 및 그 제어 방법
WO2015127870A1 (en) Method and apparatus for recommending application
WO2019078595A1 (en) ELECTRONIC DEVICE AND METHOD FOR PERFORMING A FUNCTION USING AN INPUT INTERFACE DISPLAYED BY MEANS OF AT LEAST ONE PART OF CONTENT
WO2017018722A1 (en) Screen operating method and electronic device supporting the same
WO2018076864A1 (zh) 一种数据同步方法、装置、存储介质及电子设备
WO2015154639A1 (en) Method and apparatus for recording and replaying video of terminal
WO2020171571A1 (en) Electronic device and method for managing database
WO2016000560A1 (en) File transmission method, file transmission apparatus, and file transmission system
WO2015144052A1 (en) Method and apparatus for collecting statistics on network information
WO2017201943A1 (zh) 显示屏驱动方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18861866

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18861866

Country of ref document: EP

Kind code of ref document: A1