A diskless startup method for cloud desktop based on COW snapshot
By creating logical volumes in the cloud server and using COW snapshot technology, the problem of data persistence and long startup time in cloud desktop diskless startup is solved, and fast, independent user data storage and system startup are achieved.
Patent Information
- Application Number
- CN202410159419.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-04
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-02-04
AI Technical Summary
Existing cloud desktop diskless startup solutions have difficulties in achieving persistent data storage, and the system startup process takes a long time, especially due to the impact of disk IO and system disk capacity factors.
Using a method based on COW snapshots, a logical volume is created in the cloud server and the operating system is deployed. The COW snapshot is bound to the user through the iSCSI protocol. User data is saved in the COW snapshot, enabling diskless startup and supporting multiple independent COW snapshots. Save user data.
It achieves persistent storage of user data and fast system startup, simplifying the diskless startup process. It only needs to support the block storage of COW snapshots. The creation of COW snapshots can be done in seconds. The system startup speed is fast and user data and system data are independent of each other.
Smart Images

Figure CN117873603B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of cloud desktop, and in particular to a cloud desktop diskless startup method based on COW snapshot. Background Art
[0002] In common diskless boot solutions, user data can only be saved in the cache after the system starts, and cannot be stored persistently. The data is lost after the restart. When there is a scenario where user data needs to be persisted, it is very difficult to implement.
[0003] For diskless boot solutions that need to save user data in cloud desktop scenarios, the existing technology has two solutions: the first is to set up a write-back disk in the system and store user data on the write-back disk, but the implementation cost is high and difficult; the second is to copy all the data on the system disk and use it to boot an instance disklessly. The disadvantage is that the process of copying the system is affected by factors such as disk IO and system disk capacity, resulting in a relatively long system startup process. Summary of the invention
[0004] In order to at least overcome the difficulties in implementing diskless booting of cloud desktops in related technologies and the problem that the system booting process takes a long time in at least a certain extent, the present application provides a diskless booting method for cloud desktops based on COW (Copy-on-write) snapshots.
[0005] The scheme of this application is as follows:
[0006] A cloud desktop diskless startup method based on COW snapshots, comprising:
[0007] Creating a logical volume in a cloud server and deploying an operating system on the logical volume;
[0008] Receive the startup request sent by the user client and query whether there is a COW snapshot bound to the user;
[0009] If there is no COW snapshot bound to the user, a COW snapshot of the logical volume is created in the cloud server, and the COW snapshot is bound to the user;
[0010] Creating storage resources on an iSCSI (Internet Small Computer System Interface) server based on the COW snapshot, allowing the user client to mount the COW snapshot through the iSCSI protocol to start the operating system in the cloud server;
[0011] The user data generated by the user in the operating system is stored in the COW snapshot bound to the user.
[0012] Preferably, the method further comprises:
[0013] If there is a COW snapshot bound by the user, a storage resource is directly created on the iSCSI server based on the COW snapshot bound by the user, so that the user client mounts the COW snapshot through the iSCSI protocol to start the operating system in the cloud server.
[0014] Preferably, the cloud server supports creating multiple COW snapshots, each COW snapshot stores user data of the user bound to it, and the user data stored in each COW snapshot does not affect the data in the logical volume.
[0015] Preferably, the method further comprises:
[0016] Building the cloud server based on Linux environment;
[0017] The logical volume is managed through a logical layer in a Linux environment, and each COW snapshot is named, managed and allocated.
[0018] Preferably, the user client starts the operating system in the cloud server through a pre-built pre-start execution environment.
[0019] The technical solution provided by the present application may include the following beneficial effects: The cloud desktop diskless startup method based on COW snapshots in the present application includes: creating a logical volume in the cloud server and deploying the operating system in the logical volume; receiving a startup request sent by the user client, and querying whether there is a COW snapshot bound to the user; if there is no COW snapshot bound to the user, then creating a COW snapshot of the logical volume in the cloud server, and binding the COW snapshot to the user; creating storage resources on the iSCSI server based on the COW snapshot, so that the user client mounts the COW snapshot through the iSCSI protocol to start the operating system in the cloud server; saving the user data generated by the user in the operating system in the COW snapshot bound to the user. The technical solution in the present application is simple to implement, and only requires a block storage that supports COW snapshots to implement it, and because the speed of creating COW snapshots is in seconds, the system startup speed is fast. And the user data generated by the user in the operating system is saved in the COW snapshot bound to the user, that is, the user data in the COW snapshot is independent and does not affect the system data.
[0020] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0022] Figure 1 It is a flowchart of a cloud desktop diskless startup method based on COW snapshot provided by an embodiment of the present application;
[0023] Figure 2 It is a flowchart of another cloud desktop diskless startup method based on COW snapshot provided by an embodiment of the present application. DETAILED DESCRIPTION
[0024] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0025] A cloud desktop diskless startup method based on COW snapshots, comprising:
[0026] S1. Create a logical volume in the cloud server and deploy the operating system in the logical volume;
[0027] S2. Receive a startup request sent by the user client and query whether there is a COW snapshot bound to the user;
[0028] It should be noted that in this embodiment, the server deployed at the party providing the service (ie, the cloud desktop provider) is referred to as a cloud server, and the user's local client (such as a computer) is referred to as a user client.
[0029] It should be noted that in this embodiment, the cloud server is built based on the Linux environment;
[0030] Logical volumes are managed through the logical layer in the Linux environment, and each COW snapshot is named, managed and allocated.
[0031] LVM (Logical Volume Manager) is a mechanism for managing disk partitions in Linux. LVM is a logical layer built on top of hard disks and partitions to improve the flexibility of disk partition management. Through LVM, system administrators can easily manage disk partitions, such as connecting several disk partitions into a whole volume group to form a storage pool. Administrators can create logical volumes on volume groups at will, and further create file systems on logical volume groups. Administrators can easily adjust the size of storage volume groups through LVM, and can name, manage and allocate disk storage in groups. When a new disk is added to the system, the administrator does not have to move the disk files to the new disk to make full use of the new storage space through LVM, but can directly expand the file system across the disk.
[0032] S3. If there is no COW snapshot bound to the user, create a COW snapshot of the logical volume in the cloud server and bind the COW snapshot to the user;
[0033] It should be noted that since the ultimate goal of the technical solution in this embodiment is to persist user data, it is necessary to configure a corresponding COW snapshot for each user. If the user is not bound to a COW snapshot, it is necessary to first create a COW snapshot of the logical volume in the cloud server and bind the COW snapshot to the user.
[0034] It should be noted that COW is an optimization strategy in the field of computer programming. The core idea is that if multiple callers request the same resource (such as memory or data storage on disk) at the same time, they will jointly obtain the same pointer to the same resource. Until a caller tries to modify the content of the resource, the system will actually copy a private copy to the caller, while the original resource seen by other callers remains unchanged. This process is transparent to other callers. The main advantage of this approach is that if the caller does not modify the resource, no private copy will be created, so multiple callers can share the same resource when they only read it.
[0035] S4, creating storage resources on the iSCSI server based on the COW snapshot, allowing the user client to mount the COW snapshot through the iSCSI protocol to start the operating system in the cloud server;
[0036] It should be noted that iSCSI is a storage device remote mapping technology that can map a storage device on a remote server to a local device and present it as a block device (disk). From the perspective of ordinary users, the mapped disk is no different from the locally installed disk.
[0037] Specifically, using the iSCSI protocol, the COW snapshot will be made into an iSCSI target, and then the SANboot function of iPXE will be used to load the iSCSI target (the underlying layer is the COW snapshot) to start the system.
[0038] iSCSI target is a storage resource located on the iSCSI server and is accessed and used through the network.
[0039] The SAN boot function of iPXE is a network storage management system that completely stores data (including the server operating system) on the storage system. That is, the operating system is installed on the SAN storage system and started from the SAN storage system. Therefore, SAN Boot is also called REMOTE BOOT or boot from SAN.
[0040] PXE (preboot execute environment) is a technology developed by Intel. It works in Client / Server network mode and supports workstations to download images from remote servers through the network, thereby supporting the booting of operating systems through the network. During the boot process, the terminal requires the DHCP server to assign an IP address, and then uses TFTP (trivial file transfer protocol) or MTFTP (multicast trivial file transfer protocol) to download a boot software package to the local memory for execution. This boot software package completes the basic software settings of the terminal (client), thereby booting the terminal operating system pre-installed in the server.
[0041] PXE can boot a variety of operating systems, such as:
[0042] Windows95 / 98 / 2000 / windows2003 / windows2008 / winXP / win7 / win8, linux series systems, etc.
[0043] iPXE is an extended version of PXE and supports HTTP protocol. It can be started through http, ISCSI SAN, Fibre ChannelSAN via FCoE AoE SAN wireless network Infiniband network and other methods.
[0044] It should be noted that mounting a COW snapshot means using the iSCSI protocol to treat the COW snapshot as a disk and mount it on the user client.
[0045] S5. Save the user data generated by the user in the operating system in the COW snapshot bound to the user.
[0046] It should be noted that the user data generated by the user in the operating system will be stored in its corresponding COW snapshot and will not affect the operating system data in the logical volume. While ensuring the persistent storage of user data, user data and operating system data are isolated.
[0047] It should be noted that the cloud server supports the creation of multiple COW snapshots, each COW snapshot stores the user data of the user bound to it, and the user data stored in each COW snapshot does not affect the data in the logical volume.
[0048] It should be noted that the method also includes:
[0049] S6. If there is a COW snapshot bound by the user, a storage resource is directly created on the iSCSI server based on the COW snapshot bound by the user, so that the user client mounts the COW snapshot through the iSCSI protocol to start the operating system in the cloud server.
[0050] The technical solution in this embodiment is simple to implement, and only requires a block storage that supports COW snapshots. In addition, since the speed of creating a COW snapshot is in seconds, the system starts quickly. In addition, the user data generated by the user in the operating system is stored in the COW snapshot bound to the user, that is, the user data in the COW snapshot is independent and does not affect the system data.
[0051] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.
[0052] It should be noted that, in the description of this application, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, the meaning of "plurality" refers to at least two.
[0053] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0054] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0055] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0056] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0057] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0058] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0059] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A cloud desktop diskless boot method based on COW snapshot, characterized in that: include: Creating a logical volume in a cloud server and deploying an operating system on the logical volume; The cloud server supports the creation of multiple COW snapshots, each COW snapshot stores user data of the user bound to it, and the user data stored in each COW snapshot does not affect the data in the logical volume; Receive the startup request sent by the user client and query whether there is a COW snapshot bound to the user; If there is no COW snapshot bound to the user, a COW snapshot of the logical volume is created in the cloud server, and the COW snapshot is bound to the user; Creating storage resources on the iSCSI server based on the COW snapshot, allowing the user client to mount the COW snapshot through the iSCSI protocol to start the operating system in the cloud server; If there is a COW snapshot bound by the user, a storage resource is directly created on the iSCSI server based on the COW snapshot bound by the user, so that the user client mounts the COW snapshot through the iSCSI protocol to start the operating system in the cloud server; Saving the user data generated by the user in the operating system in the COW snapshot bound to the user; Building the cloud server based on Linux environment; The logical volume is managed through the LVM logical layer in the Linux environment, and each COW snapshot is named, managed and allocated.
2. The method according to claim 1, characterized in that The user client starts the operating system in the cloud server through the pre-built pre-start execution environment.
Citation Information
Patent Citations
Logical volume management method
CN102833334A
Cloud desktop service method and platform and computer readable storage medium
CN109960551A
COW snapshot technology for data storage and data disaster recovery
CN111190770A
Cloud desktop office method and system based on hierarchical decoupling
CN112153101A
Method and device for remotely and quickly starting snapshot system on cloud
CN117176719A
