WO2019062106A1 - 磁盘阵列的挂载方法、Android设备和存储介质 - Google Patents
磁盘阵列的挂载方法、Android设备和存储介质 Download PDFInfo
- Publication number
- WO2019062106A1 WO2019062106A1 PCT/CN2018/084532 CN2018084532W WO2019062106A1 WO 2019062106 A1 WO2019062106 A1 WO 2019062106A1 CN 2018084532 W CN2018084532 W CN 2018084532W WO 2019062106 A1 WO2019062106 A1 WO 2019062106A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- disk array
- disk
- information
- raid4
- raid
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0604—Improving or facilitating administration, e.g. storage management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0604—Improving or facilitating administration, e.g. storage management
- G06F3/0607—Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0629—Configuration or reconfiguration of storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0683—Plurality of storage devices
- G06F3/0689—Disk arrays, e.g. RAID, JBOD
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 4 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:
- broadcast information of the Android system where the broadcast information includes disk array RAID4 error information, adding disk array RAID4 and disk array RAID4 mounted broadcast information, so that the application receives the disk array RAID4 error, increases the disk array Corresponding processing is performed when the broadcast information of the RAID4 or RAID array RAID4 is mounted.
- the mounting method further includes:
- the broadcast information of the additional erroneous 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 RAID 4 format disk to be added based on the expansion command is expanded by the expansion command on the corresponding RAID 4 interface;
- the RAID4 interface determined by the disk deletion instruction deletes the RAID4 format disk corresponding to the disk deletion instruction in the corresponding RAID 4 according to the disk deletion instruction, and deletes the disk. Rebuild RAID4 after the disk; or,
- the RAID4 interface determined by the add/delete command adds/deletes the add/delete in the corresponding RAID 4 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 RAID4 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 3, 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 RAID 4 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 3, according to the disk array information to create a corresponding array interface, and then use the system call to use the created array interface control driver to map the disk array information to the disk array device file, in the Android system, thus the Android system
- the disk array RAID4 can be mounted according to the disk array device file. After the disk array RAID4 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. If the number of disks corresponding to the disk information is greater than or equal to 3, a 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 RAID 4 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 3, according to the disk array information to create a corresponding array interface, and then use the system call to use the created array interface control driver to map the disk array information to the disk array device file, in the Android system, thus the Android system
- the disk array RAID4 can be mounted according to the disk array device file. After the disk array RAID4 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:
- broadcast information of the Android system where the broadcast information includes disk array RAID4 error information, adding disk array RAID4 and disk array RAID4 mounted broadcast information, so that the application receives the disk array RAID4 error, increases the disk array Corresponding processing is performed when the broadcast information of the RAID4 or RAID array RAID4 is mounted.
- 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 erroneous 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 state information of the RAID array 4 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 RAID 4 format disk to be added based on the expansion command is expanded by the expansion command on the corresponding RAID 4 interface;
- the RAID4 interface determined by the disk deletion instruction deletes the RAID4 format disk corresponding to the disk deletion instruction in the corresponding RAID 4 according to the disk deletion instruction, and deletes the disk. Rebuild RAID4 after the disk; or,
- the RAID4 interface determined by the add/delete command adds/deletes the add/delete in the corresponding RAID 4 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 application security vulnerability detection device of the present application is substantially the same as the embodiment of the application security vulnerability detection method 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 Receive RAID4 configuration information input by the user, generate corresponding disk array information, and obtain 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.
- RAID 4 is to divide the data into multiple "blocks", according to a certain fault-tolerant algorithm, stored on N+1 hard disks, the effective space occupied by the actual data is the sum of the space of N hard disks, and the storage on the N+1th hard disk
- the data is to verify the fault-tolerant information.
- the data from the other N hard disks can also recover the original data, so that only the N hard disks can be used to continue the injury.
- Work (such as collecting and playing back material), when a new hard disk is replaced, the system can restore the complete verification fault tolerance information. Since the probability of failure rate of more than one hard disk in a hard disk array is small, in general, using RAID 4, security can be guaranteed.
- the RAID4 data is sequentially stored on multiple hard disks, and the parity code is stored on a separate parity disk. In data segmentation, RAID4 accesses data in units of data blocks.
- the configuration module is configured to receive configuration information of the disk array RAID4 input by the user, wherein 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 RAID 4 configuration information of the disk array, the user may enter the Android first.
- Device in the system Driver enter the submenu, select Mutiple devices driver support (RAID and in the submenu) LVM) Enter the RAID level selection menu and select RAID-4 in the RAID level selection menu to complete the configuration information of the input disk array RAID4.
- 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 RAID 4 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 level information of the RAID4. 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 RAID4 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 3, 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 RAID 4 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 3, according to the disk array information to create a corresponding array interface, and then use the system call to use the created array interface control driver to map the disk array information to the disk array device file, in the Android system, thus the Android system
- the disk array RAID4 can be mounted according to the disk array device file. After the disk array RAID4 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 4 of the disk array, and obtaining state information of the corresponding RAID 4 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 4 of the disk array in real time or periodically, and detects When the state of the disk array RAID4 is reported, the status of the disk array is reported to the Android system.
- 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 RAID4 error information, increase disk array RAID4, and disk array RAID4 mounted broadcast information, so that the application receives the disk array RAID4 error, When the broadcast information of the RAID 4 or RAID 4 mount information of the disk array is increased, the corresponding processing is performed;
- step S90 when it is detected that an abnormality occurs in the disk array RAID4, the corresponding disk array interface is automatically reconstructed;
- Step S100 When the disk array RAID4 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 RAID4, determine whether each disk has an error or abnormality, and the Android system broadcasts the status information of each disk array RAID4 in real time or periodically. If the application receives the disk array RAID4 error or increases the broadcast information, the corresponding processing is performed. Specifically, if the broadcast information of the disk array RAID4 error is received, the corresponding data is performed according to the level of the currently used disk array RAID4.
- the RAID 4 interface of the disk array is rebuilt, and if the reconstruction of the RAID 4 is not satisfied, the additional error broadcast information is sent to 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 4 according to the query instruction, and display the status 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 4 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 RAID 4 format disk to be added based on the expansion command is expanded by the expansion command on the corresponding RAID4 interface; or
- Step S140 When receiving a disk deletion command input by the user through the application, the RAID4 interface determined by the disk deletion instruction deletes the RAID4 format disk corresponding to the disk deletion instruction in the corresponding RAID4 according to the disk deletion instruction. And rebuild RAID4 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 RAID4 interface determined by the add/delete command adds/delete the corresponding RAID4 according to the add/delete command. Add/delete the RAID4 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 RAID 4 and the RAID 4 format disk corresponding to the expansion command are obtained, and the RAID 4 format disk to be added is added to the RAID 4 through the RAID 4 interface corresponding to the expansion instruction, so as to implement RAID 4 expansion, preferably, the RAID 4 to be added is obtained.
- the format disk determines whether the expanded RAID 4 meets the requirements of the RAID 4 level according to the number of disks to be added in the RAID 4 format. If the requirements are met, the capacity expansion operation is performed. Otherwise, the error message is output.
- the RAID 4 format disk corresponding to the disk deletion instruction is determined, and the RAID 4 interface corresponding to the disk deletion instruction is deleted in the RAID 4 corresponding to the disk deletion instruction.
- the RAID4 after the disk is deleted is rebuilt.
- the reconstruction may be directly performed, or the RAID 4 formatted disk with the same number of disks in the RAID 4 format to be deleted may be selected to reconstruct the RAID 4 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)
- Stored Programmes (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本申请公开了一种磁盘阵列的挂载方法,该磁盘阵列的挂载方法应用于Android系统,包括:接收用户输入的磁盘阵列RAID4配置信息,生成对应的磁盘阵列信息,并获得所述Android系统中磁盘的信息;在所述磁盘信息对应的磁盘数量大于或等于3时,根据所述磁盘阵列信息创建对应的磁盘阵列接口;采用系统调用的方式通过所述磁盘阵列接口控制驱动程序根据所述磁盘阵列信息将磁盘集映射为对应的磁盘阵列设备文件,并根据所述磁盘阵列设备文件将所述Android系统中磁盘挂载至所述Android系统。本申请还公开了一种Android设备和存储介质。本申请能够在Android系统实现RAID4的支持和挂载。
Description
技术领域
本申请涉及Android系统技术领域,尤其涉及一种磁盘阵列的挂载方法、Android设备和存储介质。
背景技术
随着互联网技术的不断发展,互联网应用的用户不断增加,全球范围内每天产生的信息数据越来越多,数据增加速度越来越快。在这种环境下,各种存储技术以及存储方案应运而生。其中RAID(Redundant
Array of Independent
Disks)冗余阵列技术凭借其高可靠性、大数据容量、适应强以及高带宽等优点,在大型服务器得到了广泛的应用。其中RIAD技术拥有多种等级方式,方便系统根据需求定制适合需求的存储方案。然而,虽然RAID技术在基于windows和linux系统的大型服务器和一些较高的数据安全场合得到广泛应用,但在基于Android系统对RAID的支持和挂载软件的设计基本上是空白。
上述内容仅用于辅助理解本申请的技术方案,并不代表承认上述内容是现有技术。
发明内容
本申请的主要目的在于提供一种磁盘阵列的挂载方法、Android设备和存储介质,旨在在Android系统实现RAID4的支持和挂载。
为实现上述目的,本申请提供一种磁盘阵列的挂载方法,所述磁盘阵列的挂载方法应用于Android系统,所述磁盘阵列的挂载方法包括以下步骤:
接收用户输入的磁盘阵列RAID4配置信息,生成对应的磁盘阵列信息,并获得所述Android系统中磁盘的信息;
在所述磁盘信息对应的磁盘数量大于或等于3时,根据所述磁盘阵列信息创建对应的磁盘阵列接口;
采用系统调用的方式通过所述磁盘阵列接口控制驱动程序根据所述磁盘阵列信息将磁盘集映射为对应的磁盘阵列设备文件,并根据所述磁盘阵列设备文件将所述Android系统中磁盘挂载至所述Android系统。
其中,所述挂载方法还包括:
接收应用程序发送的读写指令;
根据所述读写指令通过所述驱动程序对所述磁盘阵列设备文件进行读写操作。
其中,所述挂载方法还包括:
检测磁盘阵列的状态,获得磁盘阵列RAID4的状态信息;
在检测到预设的状态信息时,上报至所述Android系统。
其中,所述挂载方法还包括:
发送Android系统的广播信息,其中所述广播信息包括磁盘阵列RAID4出错信息、增加磁盘阵列RAID4和磁盘阵列RAID4挂载的广播信息,以使得所述应用程序在接收到磁盘阵列RAID4出错、增加磁盘阵列RAID4或磁盘阵列RAID4挂载信息的广播信息时,进行对应的处理。
其中,所述挂载方法还包括:
在检测到磁盘阵列RAID4中磁盘发生异常时,自动进行重建对应的磁盘阵列接口;
在不满足磁盘阵列RAID4重建条件时,发送附加错误数据的广播信息,以使得所述应用程序根据所述广播信息进行对应的处理。
其中,所述挂载方法还包括:
接收用户输入的查询指令;
根据所述查询指令查询磁盘阵列当前的状态信息,并显示。
其中,所述挂载方法还包括:
在接收用户通过应用程序输入的扩容指令时,基于所述扩容指令确定的待添加RAID4格式磁盘,通过所述扩容指令在对应的RAID4接口进行扩容操作;或者,
在接收用户通过应用程序输入的磁盘删除指令时,通过所述磁盘删除指令确定的RAID4接口,根据所述磁盘删除指令在对应的RAID4中删除所述磁盘删除指令对应的RAID4格式磁盘,并对删除磁盘后的RAID4进行重建;或者,
在接收用户通过应用程序输入的热备盘的添加/删除指令时,通过所述添加/删除指令确定的RAID4接口,根据所述添加/删除指令在对应的RAID4中添加/删除所述添加/删除指令对应的RAID4格式热备盘。
其中,所述根据所述磁盘阵列设备文件将磁盘阵列挂载至所述Android系统的步骤包括:
根据所述磁盘阵列设备文件通过Android系统中vold机制将所述Android系统中磁盘挂载至所述Android系统。
此外,为实现上述目的,本申请还提供一种Android设备,所述Android设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的磁盘阵列的挂载程序,所述磁盘阵列的挂载程序被所述处理器执行时实现如上所述的方法的步骤。
此外,为实现上述目的,本申请还提供一种存储介质,所述计算机可读存储介质上存储有磁盘阵列的挂载程序,所述磁盘阵列的挂载程序被处理器执行时实现如上所述的磁盘阵列的挂载方法的步骤。
本申请通过接收用户输入的磁盘阵列RAID4配置信息,生成对应的磁盘阵列信息,并获得所述Android系统中磁盘的信息;在所述磁盘信息对应的磁盘数量大于或等于3时,根据所述磁盘阵列信息创建对应的磁盘阵列接口;采用系统调用的方式通过所述磁盘阵列接口控制驱动程序根据所述磁盘阵列信息将磁盘集映射为对应的磁盘阵列设备文件,并根据所述磁盘阵列设备文件将所述Android系统中磁盘挂载至所述Android系统。通过上述方式,本申请根据用户输入需要挂载的磁盘阵列RAID4的信息,生成对应的磁盘阵列信息,并并获得所述Android系统中磁盘的信息,在所述磁盘信息对应的磁盘数量大于或等于3时,根据所述磁盘阵列信息创建对应的阵列接口,然后采用系统调用的方式使用创建的阵列接口控制驱动程序将磁盘阵列信息将磁盘映射为磁盘阵列设备文件,存在Android系统中,从而Android系统可以根据磁盘阵列设备文件挂载磁盘阵列RAID4,挂载磁盘阵列RAID4后,则可以在Android系统中实现Android系统中应用软件像操作U盘设备那样操作磁盘阵列RAID4。
附图说明
图1是本申请实施例方案涉及的硬件运行环境的装置结构示意图;
图2为本申请磁盘阵列的挂载方法第一实施的流程示意图;
图3为本申请实施例中Android系统中的模块示意图;
图4为本申请磁盘阵列的挂载方法第二实施的流程示意图;
图5为本申请磁盘阵列的挂载方法第三实施的流程示意图;
图6为本申请磁盘阵列的挂载方法第四实施的流程示意图;
图7为本申请磁盘阵列的挂载方法第五实施的流程示意图。
本申请目的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请实施例的主要解决方案是:
由于现有技术基于Android系统对RAID的支持和挂载软件的设计基本上是空白。
为了解决上述技术问题,本申请提供一种磁盘阵列的挂载方法、Android设备和存储介质,通过接收用户输入的磁盘阵列RAID4配置信息,生成对应的磁盘阵列信息,并获得所述Android系统中磁盘的信息;在所述磁盘信息对应的磁盘数量大于或等于3时,根据所述磁盘阵列信息创建对应的磁盘阵列接口;采用系统调用的方式通过所述磁盘阵列接口控制驱动程序根据所述磁盘阵列信息将磁盘集映射为对应的磁盘阵列设备文件,并根据所述磁盘阵列设备文件将所述Android系统中磁盘挂载至所述Android系统。通过上述方式,本申请根据用户输入需要挂载的磁盘阵列RAID4的信息,生成对应的磁盘阵列信息,并并获得所述Android系统中磁盘的信息,在所述磁盘信息对应的磁盘数量大于或等于3时,根据所述磁盘阵列信息创建对应的阵列接口,然后采用系统调用的方式使用创建的阵列接口控制驱动程序将磁盘阵列信息将磁盘映射为磁盘阵列设备文件,存在Android系统中,从而Android系统可以根据磁盘阵列设备文件挂载磁盘阵列RAID4,挂载磁盘阵列RAID4后,则可以在Android系统中实现Android系统中应用软件像操作U盘设备那样操作磁盘阵列RAID4。
如图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中存储的磁盘阵列的挂载程序,并执行以下操作:
接收用户输入的磁盘阵列RAID4配置信息,生成对应的磁盘阵列信息,并获得所述Android系统中磁盘的信息;
在所述磁盘信息对应的磁盘数量大于或等于3时,根据所述磁盘阵列信息创建对应的磁盘阵列接口;
采用系统调用的方式通过所述磁盘阵列接口控制驱动程序根据所述磁盘阵列信息将磁盘集映射为对应的磁盘阵列设备文件,并根据所述磁盘阵列设备文件将所述Android系统中磁盘挂载至所述Android系统。
进一步地,处理器1001可以调用存储器1005中存储的磁盘阵列的挂载程序,还执行以下操作:
接收应用程序发送的读写指令;
根据所述读写指令通过所述驱动程序对所述磁盘阵列设备文件进行读写操作。
进一步地,处理器1001可以调用存储器1005中存储的磁盘阵列的挂载程序,还执行以下操作:
检测磁盘阵列RAID4的状态,获得磁盘阵列RAID4的状态信息;
在检测到预设的状态信息时,上报至所述Android系统。
进一步地,处理器1001可以调用存储器1005中存储的磁盘阵列的挂载程序,还执行以下操作:
发送Android系统的广播信息,其中所述广播信息包括磁盘阵列RAID4出错信息、增加磁盘阵列RAID4和磁盘阵列RAID4挂载的广播信息,以使得所述应用程序在接收到磁盘阵列RAID4出错、增加磁盘阵列RAID4或磁盘阵列RAID4挂载信息的广播信息时,进行对应的处理。
进一步地,处理器1001可以调用存储器1005中存储的磁盘阵列的挂载程序,还执行以下操作:
在检测到磁盘阵列RAID4中磁盘发生异常时,自动进行重建对应的磁盘阵列接口;
在不满足磁盘阵列RAID4重建条件时,发送附加错误数据的广播信息,以使得所述应用程序根据所述广播信息进行对应的处理。
进一步地,处理器1001可以调用存储器1005中存储的磁盘阵列的挂载程序,还执行以下操作:
接收用户输入的查询指令;
根据所述查询指令查询磁盘阵列RAID4当前的状态信息,并显示。
进一步地,处理器1001可以调用存储器1005中存储的磁盘阵列的挂载程序,还执行以下操作:
在接收用户通过应用程序输入的扩容指令时,基于所述扩容指令确定的待添加RAID4格式磁盘,通过所述扩容指令在对应的RAID4接口进行扩容操作;或者,
在接收用户通过应用程序输入的磁盘删除指令时,通过所述磁盘删除指令确定的RAID4接口,根据所述磁盘删除指令在对应的RAID4中删除所述磁盘删除指令对应的RAID4格式磁盘,并对删除磁盘后的RAID4进行重建;或者,
在接收用户通过应用程序输入的热备盘的添加/删除指令时,通过所述添加/删除指令确定的RAID4接口,根据所述添加/删除指令在对应的RAID4中添加/删除所述添加/删除指令对应的RAID4格式热备盘。
进一步地,处理器1001可以调用存储器1005中存储的磁盘阵列的挂载程序,还执行以下操作:
根据所述磁盘阵列设备文件通过Android系统中vold机制将所述Android系统中磁盘挂载至所述Android系统。
本申请应用软件安全漏洞检测设备的具体实施例与下述应用软件安全漏洞检测方法各实施例基本相同,在此不作赘述。
参照图2,本申请磁盘阵列的挂载方法第一实施的流程示意图,所述磁盘阵列的挂载方法方法包括:
步骤S10,接收用户输入的磁盘阵列RAID4配置信息,生成对应的磁盘阵列信息,并获得所述Android系统中磁盘的信息;
步骤S20,在所述磁盘信息对应的磁盘数量大于或等于2时,根据所述磁盘阵列信息创建对应的磁盘阵列接口;
步骤S30,采用系统调用的方式通过所述磁盘阵列接口控制驱动程序根据所述磁盘阵列信息将磁盘集映射为对应的磁盘阵列设备文件,并根据所述磁盘阵列设备文件将所述Android系统中磁盘挂载至所述Android系统。
具体地,本申请应用于Android系统中,本实施例中Android系统可以如图3所示,Android系统可以包括配置模块、阵列创建模块和RAID控制器等,上述各步骤可以由各模块实现。RAID技术是存储磁盘阵列的核心处理技术,其目的是提高数据处理的效率和容错能力。存储系统在实现上一般都会采用必要手段来保证系统的性能,通常的办法是设置缓存系统。缓存系统是一个虚拟化的系统,其原理是通过高效的处理I/O请求来提高性能。
RAID
4是把数据分成多个“块”,按照一定的容错算法,存放在N+1个硬盘上,实际数据占用的有效空间为N个硬盘的空间总和,而第N+1个硬盘上存储的数据是校验容错信息,当这N+1个硬盘中的其中一个硬盘出现故障时,从其它N个硬盘中的数据也可以恢复原始数据,这样,仅使用这N个硬盘也可以带伤继续工作(如采集和回放素材),当更换一个新硬盘后,系统可以重新恢复完整的校验容错信息。由于在一个硬盘阵列中,多于一个硬盘同时出现故障率的几率很小,所以一般情况下,使用RAID4,安全性是可以得到保障的。RAID4数据都是依次存储在多个硬盘之上,奇偶校验码存放在独立的奇偶校验盘上,在数据分割上RAID4对数据的访问是按数据块为单位进行的。
具体地,配置模块用于接收用户输入的磁盘阵列RAID4的配置信息,其中磁盘阵列RAID4的配置信息包括阵列等级配置、磁盘配置等,其中用户在输入磁盘阵列RAID4的配置信息时,可以先进入Android系统中Device
Driver,进入子菜单,在子菜单中选择Mutiple devices driver support(RAID and
LVM)进入RAID等级选择菜单,在RAID等级选择菜单把RAID-4选上,从而完成输入的磁盘阵列RAID4的配置信息。
然后根据磁盘阵列的配置信息生成对应的磁盘阵列信息,并导入磁盘配置文件至Android系统中的阵列创建模块;阵列创建模块则根据配置模块生成的磁盘阵列信息在Android系统中创建对应RAID4的接口,然后控制器则调用Android系统上所创建的接口采用系统调用的方式控制底层驱动程序执行挂载操作,具体地,驱动程序根据RAID4的等级信息,将连接在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系统。
本申请通过接收用户输入的磁盘阵列RAID4配置信息,生成对应的磁盘阵列信息,并获得所述Android系统中磁盘的信息;在所述磁盘信息对应的磁盘数量大于或等于3时,根据所述磁盘阵列信息创建对应的磁盘阵列接口;采用系统调用的方式通过所述磁盘阵列接口控制驱动程序根据所述磁盘阵列信息将磁盘集映射为对应的磁盘阵列设备文件,并根据所述磁盘阵列设备文件将所述Android系统中磁盘挂载至所述Android系统。通过上述方式,本申请根据用户输入需要挂载的磁盘阵列RAID4的信息,生成对应的磁盘阵列信息,并并获得所述Android系统中磁盘的信息,在所述磁盘信息对应的磁盘数量大于或等于3时,根据所述磁盘阵列信息创建对应的阵列接口,然后采用系统调用的方式使用创建的阵列接口控制驱动程序将磁盘阵列信息将磁盘映射为磁盘阵列设备文件,存在Android系统中,从而Android系统可以根据磁盘阵列设备文件挂载磁盘阵列RAID4,挂载磁盘阵列RAID4后,则可以在Android系统中实现Android系统中应用软件像操作U盘设备那样操作磁盘阵列RAID4。
进一步的,参照图4,图4为本申请磁盘阵列的挂载方法第二实施的流程示意图,基于上述图2所示的实施例,在本实施例中该磁盘阵列的挂载方包括:
步骤S40,接收应用程序发送的读写指令;
步骤S50,根据所述读写指令通过所述驱动程序对所述磁盘阵列设备文件进行读写操作。
在步骤S30实现挂载之后,Android系统中各磁盘,则会与磁盘阵列形成对应的映射关系,从而使得应用程序在进行读写操作时,像读写U盘一样对磁盘阵列文件进行读写,具体地,用户可以通过应用程序进行操作或者应用程序本身生成读写指令,然后通过驱动程序对磁盘阵列设备文件进行读写操作,进而实现对磁盘进行读写操作。
进一步地,参照图5,图5为本申请磁盘阵列的挂载方法第三实施的流程示意图,基于上述图2所示的实施例,所述挂载方法还包括:
步骤S60,检测磁盘阵列RAID4的状态,获得对应的磁盘阵列RAID4的状态信息;
步骤S70,在检测到预设的状态信息时,上报至所述Android系统。
具体地,为方便使用,本实施例在实际使用过程中,在Android系统中设置有监控模块用于执行本实施例中步骤,该监控模块可以实时或者定时检测磁盘阵列RAID4的状态,在检测到磁盘阵列RAID4的状态时,向Android系统上报磁盘阵列的状态。其中向Android系统上报磁盘阵列的状态的方式可以采用Android系统中上报信息的方式进行,本实施例中不做多于赘述。
进一步地,参阅图6,图6为本申请磁盘阵列的挂载方法第四实施的流程示意图,所述挂载方法还包括:
步骤S80,发送Android系统的广播信息,其中所述广播信息包括磁盘阵列RAID4出错信息、增加磁盘阵列RAID4和磁盘阵列RAID4挂载的广播信息,以使得所述应用程序在接收到磁盘阵列RAID4出错、增加磁盘阵列RAID4或磁盘阵列RAID4挂载信息的广播信息时,进行对应的处理;
步骤S90,在检测到磁盘阵列RAID4中磁盘发生异常时,自动进行重建对应的磁盘阵列接口;
步骤S100,在不满足磁盘阵列RAID4重建条件时,发送附加错误数据的广播信息,以使得所述应用程序根据所述广播信息进行对应的处理。
在Android系统接收到磁盘阵列的状态信息时,可以对磁盘阵列RAID4中各磁盘的状态进行判断,确定各磁盘是否出现出错、异常等情况,Android系统会实时或者定时广播各磁盘阵列RAID4的状态信息,如果应用程序接收到磁盘阵列RAID4出错或者增加等广播信息时,进行对应的处理,具体的,如果接收到磁盘阵列RAID4出错的广播信息,则根据当前使用的磁盘阵列RAID4的等级,进行对应的处理,具体地:如果当前磁盘阵列RAID的等级为RAID4,且接收到磁盘阵列中一磁盘出错的广播信息,此时因为有其他磁盘可以继续用,因此可以显示对应的提示信息,从而提醒用户更换磁盘;如果收到增加磁盘阵列的广播,则重新进行同步,即将新增磁盘同步正常使用磁盘的内容;如果收到磁盘阵列RAID4挂载的广播,则显示对应的挂载信息。进一步地,如果接收到磁盘阵列RAID4中全部磁盘出现异常的广播,则进行磁盘阵列RAID4接口的重建,在进行重建时,如果当前不满足磁盘阵列RAID4的重建,则发送附加错误的广播信息,以使得应用程序在接收到该广播信息时进行对应的处理,比如显示对应的提示信息以提示用户。
进一步地,参阅图7,图7为本申请磁盘阵列的挂载方法第五实施的流程示意图,基于上述图2所示的实施例,所述挂载方法还包括:
步骤S110,接收用户输入的查询指令;
步骤S120,根据所述查询指令查询磁盘阵列RAID4当前的状态信息,并显示。
为方便用户查看磁盘阵列的数据,及时掌控磁盘的情况,本实施例中还提供磁盘阵列的查看功能,具体地,用户可以在操作界面进行查询操作,Android设备根据用户操作产生对应的查询指令,然后根据用户触发的查询指令,查询磁盘阵列RAID4的当前状态信息,并在Android设备中显示,从而实现查询功能。
进一步地,基于上述图2所示的实施例,所述挂载方法还包括:
步骤S130,在接收用户通过应用程序输入的扩容指令时,基于所述扩容指令确定的待添加RAID4格式磁盘,通过所述扩容指令在对应的RAID4接口进行扩容操作;或者,
步骤S140,在接收用户通过应用程序输入的磁盘删除指令时,通过所述磁盘删除指令确定的RAID4接口,根据所述磁盘删除指令在对应的RAID4中删除所述磁盘删除指令对应的RAID4格式磁盘,并对删除磁盘后的RAID4进行重建;或者,
步骤S150,在接收用户通过应用程序输入的热备盘的添加/删除指令时,通过所述添加/删除指令确定的RAID4接口,根据所述添加/删除指令在对应的RAID4中添加/删除所述添加/删除指令对应的RAID4格式热备盘。
为了避免有些磁盘使用时间比较长,磁盘老化,或者磁盘存储空间不足的情况,在实际使用中本实施例中还提供有管理功能,具体地,在接收到基于所述操作界面触发的扩容指令时,获取该扩容指令对应的RAID4及待添加RAID4格式磁盘,通过该扩容指令对应的RAID4接口将该待添加RAID4格式磁盘添加至该RAID4中,以实现RAID4的扩容,优选地,在得到待添加RAID4格式磁盘,根据该待添加RAID4格式磁盘的数量确定扩容后的RAID4是否满足该RAID4的等级对应的要求,在满足要求时进行扩容操作,否则输出错误提示信息。
在接收到基于所述操作界面触发的磁盘删除指令时,确定磁盘删除指令对应的待删除RAID4格式磁盘,通过所述磁盘删除指令对应的RAID4接口,在所述磁盘删除指令对应的RAID4中删除该待删除RAID4格式磁盘,在删除该待删除RAID4格式磁盘后,对删除磁盘后的RAID4进行重建。优选地,在删除磁盘后的RAID4满足该RAID4的等级对应的要求时,可直接进行重建,也可选择与待删除RAID4格式磁盘的数量相同的其他RAID4格式磁盘对该删除磁盘后的RAID4进行重建,以保证该删除磁盘后的RAID4的容量不变;在删除磁盘后的RAID4不满足该RAID4的等级对应的要求时,选择与待删除RAID4格式磁盘的数量相同的其他RAID4格式磁盘对该删除磁盘后的RAID4进行重建。
在接收到基于所述操作界面触发的热备盘的添加/删除指令时,确定添加/删除指令对应的热备盘,通过所述添加/删除指令对应的RAID4接口,在所述添加/删除指令对应的RAID4中删除该热备盘。
根据上述描述,本申请通过在系统中增加对应的功能,包括状态信息上报、重建磁盘阵列、查询和管理等功能,从而实现了磁盘阵列的挂载和管理。
此外,本申请实施例还提出一种Android设备,所述Android设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的磁盘阵列的挂载程序,所述磁盘阵列的挂载程序被所述处理器执行时实现如上实施例所述的方法的步骤。
本申请Android设备的具体实施例与上述磁盘阵列的挂载方法各实施例基本相同,在此不作赘述。
此外,本申请实施例还提出一种计算机可读存储介质,所述计算机可读存储介质上存储有磁盘阵列的挂载程序,所述磁盘阵列的挂载程序被处理器执行时实现如上实施例所述的磁盘阵列的挂载方法的步骤。
本申请计算机可读存储介质的具体实施例与上述磁盘阵列的挂载方法各实施例基本相同,在此不作赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。
Claims (20)
- 一种磁盘阵列的挂载方法,其特征在于,所述磁盘阵列的挂载方法应用于Android系统,所述磁盘阵列的挂载方法包括以下步骤:接收用户输入的磁盘阵列RAID4配置信息,生成对应的磁盘阵列信息,并获得所述Android系统中磁盘的信息;在所述磁盘信息对应的磁盘数量大于或等于3时,根据所述磁盘阵列信息创建对应的磁盘阵列接口;采用系统调用的方式通过所述磁盘阵列接口控制驱动程序根据所述磁盘阵列信息将磁盘集映射为对应的磁盘阵列设备文件,并根据所述磁盘阵列设备文件将所述Android系统中磁盘挂载至所述Android系统。
- 如权利要求1所述的磁盘阵列的挂载方法,其特征在于,所述挂载方法还包括:接收应用程序发送的读写指令;根据所述读写指令通过所述驱动程序对所述磁盘阵列设备文件进行读写操作。
- 如权利要求1所述的磁盘阵列的挂载方法,其特征在于,所述挂载方法还包括:检测磁盘阵列RAID4的状态,获得磁盘阵列RAID4的状态信息;在检测到预设的状态信息时,上报至所述Android系统。
- 如权利要求3所述的磁盘阵列的挂载方法,其特征在于,所述挂载方法还包括:发送Android系统的广播信息,其中所述广播信息包括磁盘阵列RAID4出错信息、增加磁盘阵列RAID4和磁盘阵列RAID4挂载的广播信息,以使得所述应用程序在接收到磁盘阵列RAID4出错、增加磁盘阵列RAID4或磁盘阵列RAID4挂载信息的广播信息时,进行对应的处理。
- 如权利要求3所述的磁盘阵列的挂载方法,其特征在于,所述挂载方法还包括:在检测到磁盘阵列RAID4中磁盘发生异常时,自动进行重建对应的磁盘阵列接口;在不满足磁盘阵列RAID4重建条件时,发送附加错误数据的广播信息,以使得所述应用程序根据所述广播信息进行对应的处理。
- 如权利要求1所述的磁盘阵列的挂载方法,其特征在于,所述挂载方法还包括:接收用户输入的查询指令;根据所述查询指令查询磁盘阵列RAID4当前的状态信息,并显示。
- 如权利要求1所述的磁盘阵列的挂载方法,其特征在于,所述挂载方法还包括:在接收用户通过应用程序输入的扩容指令时,基于所述扩容指令确定的待添加RAID4格式磁盘,通过所述扩容指令在对应的RAID4接口进行扩容操作;或者,在接收用户通过应用程序输入的磁盘删除指令时,通过所述磁盘删除指令确定的RAID4接口,根据所述磁盘删除指令在对应的RAID4中删除所述磁盘删除指令对应的RAID4格式磁盘,并对删除磁盘后的RAID4进行重建;或者,在接收用户通过应用程序输入的热备盘的添加/删除指令时,通过所述添加/删除指令确定的RAID4接口,根据所述添加/删除指令在对应的RAID4中添加/删除所述添加/删除指令对应的RAID4格式热备盘。
- 如权利要求1所述的磁盘阵列的挂载方法,其特征在于,所述根据所述磁盘阵列设备文件将磁盘阵列挂载至所述Android系统的步骤包括:根据所述磁盘阵列设备文件通过Android系统中vold机制将所述Android系统中磁盘挂载至所述Android系统。
- 一种Android设备,其特征在于,所述Android设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的磁盘阵列的挂载程序,所述磁盘阵列的挂载程序被所述处理器执行时实现如下步骤:接收用户输入的磁盘阵列RAID4配置信息,生成对应的磁盘阵列信息,并获得所述Android系统中磁盘的信息;在所述磁盘信息对应的磁盘数量大于或等于3时,根据所述磁盘阵列信息创建对应的磁盘阵列接口;采用系统调用的方式通过所述磁盘阵列接口控制驱动程序根据所述磁盘阵列信息将磁盘集映射为对应的磁盘阵列设备文件,并根据所述磁盘阵列设备文件将所述Android系统中磁盘挂载至所述Android系统。
- 如权利要求9所述的Android设备,其特征在于,所述磁盘阵列的挂载程序被所述处理器执行时还实现如下步骤:接收应用程序发送的读写指令;根据所述读写指令通过所述驱动程序对所述磁盘阵列设备文件进行读写操作。
- 如权利要求9所述的Android设备,其特征在于,所述磁盘阵列的挂载程序被所述处理器执行时还实现如下步骤:检测磁盘阵列RAID4的状态,获得磁盘阵列RAID4的状态信息;在检测到预设的状态信息时,上报至所述Android系统。
- 如权利要求11所述的Android设备,其特征在于,所述磁盘阵列的挂载程序被所述处理器执行时还实现如下步骤:发送Android系统的广播信息,其中所述广播信息包括磁盘阵列RAID4出错信息、增加磁盘阵列RAID4和磁盘阵列RAID4挂载的广播信息,以使得所述应用程序在接收到磁盘阵列RAID4出错、增加磁盘阵列RAID4或磁盘阵列RAID4挂载信息的广播信息时,进行对应的处理。
- 如权利要求11所述的Android设备,其特征在于,所述磁盘阵列的挂载程序被所述处理器执行时还实现如下步骤:在检测到磁盘阵列RAID4中磁盘发生异常时,自动进行重建对应的磁盘阵列接口;在不满足磁盘阵列RAID4重建条件时,发送附加错误数据的广播信息,以使得所述应用程序根据所述广播信息进行对应的处理。
- 如权利要求9所述的Android设备,其特征在于,所述磁盘阵列的挂载程序被所述处理器执行时还实现如下步骤:接收用户输入的查询指令;根据所述查询指令查询磁盘阵列RAID4当前的状态信息,并显示。
- 如权利要求9所述的Android设备,其特征在于,所述磁盘阵列的挂载程序被所述处理器执行时还实现如下步骤:在接收用户通过应用程序输入的扩容指令时,基于所述扩容指令确定的待添加RAID4格式磁盘,通过所述扩容指令在对应的RAID4接口进行扩容操作;或者,在接收用户通过应用程序输入的磁盘删除指令时,通过所述磁盘删除指令确定的RAID4接口,根据所述磁盘删除指令在对应的RAID4中删除所述磁盘删除指令对应的RAID4格式磁盘,并对删除磁盘后的RAID4进行重建;或者,在接收用户通过应用程序输入的热备盘的添加/删除指令时,通过所述添加/删除指令确定的RAID4接口,根据所述添加/删除指令在对应的RAID4中添加/删除所述添加/删除指令对应的RAID4格式热备盘。
- 如权利要求9所述的Android设备,其特征在于,所述磁盘阵列的挂载程序被所述处理器执行时还实现如下步骤:根据所述磁盘阵列设备文件通过Android系统中vold机制将所述Android系统中磁盘挂载至所述Android系统。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有磁盘阵列的挂载程序,所述磁盘阵列的挂载程序被处理器执行时实现如下步骤:接收用户输入的磁盘阵列RAID4配置信息,生成对应的磁盘阵列信息,并获得所述Android系统中磁盘的信息;在所述磁盘信息对应的磁盘数量大于或等于3时,根据所述磁盘阵列信息创建对应的磁盘阵列接口;采用系统调用的方式通过所述磁盘阵列接口控制驱动程序根据所述磁盘阵列信息将磁盘集映射为对应的磁盘阵列设备文件,并根据所述磁盘阵列设备文件将所述Android系统中磁盘挂载至所述Android系统。
- 如权利要求17所述的计算机可读存储介质,其特征在于,所述磁盘阵列的挂载程序被处理器执行时还实现如下步骤:检测磁盘阵列RAID4的状态,获得磁盘阵列RAID4的状态信息;在检测到预设的状态信息时,上报至所述Android系统。
- 如权利要求18所述的计算机可读存储介质,其特征在于,所述磁盘阵列的挂载程序被处理器执行时还实现如下步骤:发送Android系统的广播信息,其中所述广播信息包括磁盘阵列RAID4出错信息、增加磁盘阵列RAID4和磁盘阵列RAID4挂载的广播信息,以使得所述应用程序在接收到磁盘阵列RAID4出错、增加磁盘阵列RAID4或磁盘阵列RAID4挂载信息的广播信息时,进行对应的处理。
- 如权利要求18所述的计算机可读存储介质,其特征在于,所述磁盘阵列的挂载程序被处理器执行时还实现如下步骤:在检测到磁盘阵列RAID4中磁盘发生异常时,自动进行重建对应的磁盘阵列接口;在不满足磁盘阵列RAID4重建条件时,发送附加错误数据的广播信息,以使得所述应用程序根据所述广播信息进行对应的处理。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710928310.3A CN107741830A (zh) | 2017-09-30 | 2017-09-30 | 磁盘阵列的挂载方法、Android设备和存储介质 |
CN201710928310.3 | 2017-09-30 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019062106A1 true WO2019062106A1 (zh) | 2019-04-04 |
Family
ID=61236696
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/084532 WO2019062106A1 (zh) | 2017-09-30 | 2018-04-26 | 磁盘阵列的挂载方法、Android设备和存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107741830A (zh) |
WO (1) | WO2019062106A1 (zh) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107748651A (zh) * | 2017-09-30 | 2018-03-02 | 深圳市华德安科技有限公司 | 磁盘阵列的挂载方法、Android设备和存储介质 |
CN107741830A (zh) * | 2017-09-30 | 2018-02-27 | 深圳市华德安科技有限公司 | 磁盘阵列的挂载方法、Android设备和存储介质 |
CN107817949A (zh) * | 2017-09-30 | 2018-03-20 | 深圳市华德安科技有限公司 | 磁盘阵列的挂载方法、Android设备和存储介质 |
Citations (5)
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磁盘组服务器的自动恢复方法及装置 |
CN107741830A (zh) * | 2017-09-30 | 2018-02-27 | 深圳市华德安科技有限公司 | 磁盘阵列的挂载方法、Android设备和存储介质 |
CN107817949A (zh) * | 2017-09-30 | 2018-03-20 | 深圳市华德安科技有限公司 | 磁盘阵列的挂载方法、Android设备和存储介质 |
Family Cites Families (3)
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 |
-
2017
- 2017-09-30 CN CN201710928310.3A patent/CN107741830A/zh active Pending
-
2018
- 2018-04-26 WO PCT/CN2018/084532 patent/WO2019062106A1/zh active Application Filing
Patent Citations (5)
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磁盘组服务器的自动恢复方法及装置 |
CN107741830A (zh) * | 2017-09-30 | 2018-02-27 | 深圳市华德安科技有限公司 | 磁盘阵列的挂载方法、Android设备和存储介质 |
CN107817949A (zh) * | 2017-09-30 | 2018-03-20 | 深圳市华德安科技有限公司 | 磁盘阵列的挂载方法、Android设备和存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN107741830A (zh) | 2018-02-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019062102A1 (zh) | 磁盘阵列的挂载方法、Android设备和存储介质 | |
WO2019062109A1 (zh) | 磁盘阵列的挂载方法、Android设备和存储介质 | |
WO2014082500A1 (zh) | 页面加载方法及其系统、计算机存储介质 | |
WO2019062106A1 (zh) | 磁盘阵列的挂载方法、Android设备和存储介质 | |
WO2017188624A1 (en) | Fingerprint verification method and electronic device for performing the same | |
WO2018008820A1 (ko) | 센서를 포함한 전자 장치 및 이의 운용 방법 | |
WO2019062093A1 (zh) | Raid管理方法、装置及计算机可读存储介质 | |
WO2014000635A1 (zh) | 阅读器提供服务的方法、阅读器、终端及计算机存储介质 | |
EP3403175A1 (en) | Electronic device and method of application data display therefor | |
WO2019062099A1 (zh) | 磁盘阵列的挂载方法、Android设备和存储介质 | |
WO2019062104A1 (zh) | 磁盘阵列的挂载方法、Android设备和存储介质 | |
WO2018161578A1 (zh) | 动态调节屏幕刷新率的方法、装置、存储介质及电子设备 | |
WO2016165556A1 (zh) | 一种视频流的数据处理方法、装置和系统 | |
EP3665559A1 (en) | Electronic device and method for executing function using input interface displayed via at least portion of content | |
WO2019104876A1 (zh) | 保险产品的推送方法、系统、终端、客户终端及存储介质 | |
WO2017099378A1 (ko) | 터치 인식 방법 및 이를 수행하는 전자 장치 | |
WO2016137221A1 (en) | Electronic device and image display method thereof | |
WO2020171571A1 (en) | Electronic device and method for managing database | |
WO2018014567A1 (zh) | 一种提高虚拟机性能的方法、终端、设备及计算机可读存储介质 | |
WO2019235793A1 (en) | Electronic device and method for providing information related to image to application through input unit | |
WO2018233301A1 (zh) | 产品推荐方法、装置、设备以及计算机可读存储介质 | |
WO2019062103A1 (zh) | 磁盘阵列的挂载方法、Android设备和存储介质 | |
WO2016000560A1 (en) | File transmission method, file transmission apparatus, and file transmission system | |
WO2017036208A1 (zh) | 显示界面中的信息提取方法及系统 | |
WO2018006581A1 (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: 18861520 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: 18861520 Country of ref document: EP Kind code of ref document: A1 |