[go: up one dir, main page]

CN106777394B - a cluster file system - Google Patents

a cluster file system Download PDF

Info

Publication number
CN106777394B
CN106777394B CN201710113470.2A CN201710113470A CN106777394B CN 106777394 B CN106777394 B CN 106777394B CN 201710113470 A CN201710113470 A CN 201710113470A CN 106777394 B CN106777394 B CN 106777394B
Authority
CN
China
Prior art keywords
block device
file system
nfs
lock
management module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710113470.2A
Other languages
Chinese (zh)
Other versions
CN106777394A (en
Inventor
马怀旭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN201710113470.2A priority Critical patent/CN106777394B/en
Publication of CN106777394A publication Critical patent/CN106777394A/en
Application granted granted Critical
Publication of CN106777394B publication Critical patent/CN106777394B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/116Details of conversion of file system types or formats

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明公开了一种集群文件系统,包括:lvm管理模块,nfs管理模块;其中,lvm管理模块,根据块设备创建信息创建对应的块设备提供给集群用户,使集群用户直接在块设备中进行IO操作;nfs管理模块,在挂载lvm存储池的节点挂载nfs文件系统,通过sanlock管理lvm存储池;该集群文件系统提供块设备使虚拟设备根据所需要的文件格式,将该块设备格式化为自己需求的文件系统,降低了每次IO操作的流程;同时提供了较为速度的IO操作,提高集群文件系统的效率,同时提高了集群的虚拟设备的IO速度。

Figure 201710113470

The invention discloses a cluster file system, comprising: an lvm management module and an nfs management module; wherein, the lvm management module creates a corresponding block device according to the block device creation information and provides it to a cluster user, so that the cluster user can directly perform operations in the block device. IO operation; nfs management module, mount the nfs file system on the node where the lvm storage pool is mounted, and manage the lvm storage pool through sanlock; the cluster file system provides a block device so that the virtual device can format the block device according to the required file format Converting it into a file system for its own needs reduces the process of each IO operation; at the same time, it provides a relatively fast IO operation, improves the efficiency of the cluster file system, and improves the IO speed of the virtual device of the cluster.

Figure 201710113470

Description

一种集群文件系统a cluster file system

技术领域technical field

本发明涉及计算机技术领域,特别涉及一种集群文件系统。The invention relates to the field of computer technology, in particular to a cluster file system.

背景技术Background technique

随着计算机技术和网络技术的快速发展,集群系统以其强大的运算能力和健壮的容错机制让其逐步成为计算机行业的焦点。但是作为配套的集群文件系统的发展受到分布式的影响,发展缓慢,大部分的集群文件系统是在原有的文件系统的基础上重新创建虚拟机需求的文件系统格式。此类文件系统加深了每一次的IO操作的流程,降低了文件系统的访问速率。因此如何提高集群文件系统的效率,是本领域技术人员需要解决的技术问题。With the rapid development of computer technology and network technology, the cluster system has gradually become the focus of the computer industry with its powerful computing power and robust fault-tolerant mechanism. However, the development of the supporting cluster file system is affected by distribution, and the development is slow. Most of the cluster file systems recreate the file system format required by the virtual machine on the basis of the original file system. This type of file system deepens the process of each IO operation and reduces the access rate of the file system. Therefore, how to improve the efficiency of the cluster file system is a technical problem to be solved by those skilled in the art.

发明内容SUMMARY OF THE INVENTION

本发明的目的是提供一种集群文件系统,该集群文件系统提供块设备使虚拟设备根据所需要的文件格式,将该块设备格式化为自己需求的文件系统,降低了每次IO操作的流程。The purpose of the present invention is to provide a cluster file system, which provides a block device so that the virtual device can format the block device into a file system required by itself according to the required file format, which reduces the process of each IO operation .

为解决上述技术问题,本发明提供一种集群文件系统,包括:lvm管理模块,nfs管理模块;其中,In order to solve the above technical problems, the present invention provides a cluster file system, comprising: an lvm management module and an nfs management module; wherein,

所述lvm管理模块,用于根据块设备创建信息创建对应的块设备提供给集群用户,使所述集群用户直接在所述块设备中进行IO操作;The lvm management module is configured to create a corresponding block device according to the block device creation information and provide it to a cluster user, so that the cluster user can directly perform IO operations in the block device;

所述nfs管理模块,用于在挂载lvm存储池的节点挂载nfs文件系统,通过sanlock管理所述lvm存储池。The nfs management module is used to mount the nfs file system on the node where the lvm storage pool is mounted, and manage the lvm storage pool through sanlock.

可选的,所述nfs管理模块包括:Optionally, the nfs management module includes:

初始化模块,用于在创建lvm存储池时,在所述nfs文件系统中创建对应的lvm存储池锁信息文件。The initialization module is used to create a corresponding lvm storage pool lock information file in the nfs file system when the lvm storage pool is created.

可选的,所述初始化模块具体为在创建lvm存储池时,通过sanlock执行initlockspace,并在每一台主机上执行add lockspace操作,创建以vg的uuid为名的文件,使所述文件具有对应lvm存储池的资源锁。Optionally, the initialization module specifically executes initlockspace through sanlock when creating the lvm storage pool, and executes the add lockspace operation on each host to create a file named with the uuid of vg, so that the file has a corresponding Resource lock for the lvm storage pool.

可选的,所述nfs管理模块包括:Optionally, the nfs management module includes:

元数据一致性单元,用于若接收到元数据操作请求时,通过sanlock获取对应的vg锁资源后执行对应的元数据操作,并在所述元数据操作完成后释放所述vg锁资源。The metadata consistency unit is used for, if a metadata operation request is received, obtain the corresponding vg lock resource through sanlock, execute the corresponding metadata operation, and release the vg lock resource after the metadata operation is completed.

可选的,所述nfs管理模块包括:Optionally, the nfs management module includes:

块设备锁信息创建单元,用于在创建块设备时,在所述nfs文件系统中创建对应的块设备锁信息文件。The block device lock information creation unit is configured to create a corresponding block device lock information file in the nfs file system when a block device is created.

可选的,所述块设备锁信息创建单元具体为在创建块设备时,通过sanlock创建以所述块设备的uuid为名的文件,并通过sanlock执行init resource操作,使所述文件具有所述块设备的资源锁。Optionally, the block device lock information creation unit specifically creates a file named after the uuid of the block device through sanlock when creating a block device, and executes the init resource operation through sanlock, so that the file has the Resource lock for block devices.

可选的,所述nfs管理模块包括:Optionally, the nfs management module includes:

块设备操作单元,用于若接收到块设备操作请求时,通过sanlock获取对应的锁资源后执行对应的块设备操作,并在所述块设备操作完成后释放所述锁资源。The block device operation unit is configured to, if a block device operation request is received, acquire the corresponding lock resource through sanlock and execute the corresponding block device operation, and release the lock resource after the block device operation is completed.

可选的,所述nfs管理模块包括:Optionally, the nfs management module includes:

块设备锁信息删除单元,用于若接收到块设备删除请求时,通过sanlock检测到所述块设备对应的锁资源未被占用时,删除所述块设备,并在删除成功后删除所述块设备对应的块设备锁信息文件。The block device lock information deletion unit is used to delete the block device when it is detected through sanlock that the lock resource corresponding to the block device is not occupied when a block device deletion request is received, and delete the block after the deletion is successful. The block device lock information file corresponding to the device.

可选的,本方案还包括:Optionally, this solution also includes:

锁信息检测模块,用于定时检测所述nfs管理模块中的锁信息和内核中块设备信息,并删除已经被删除的块设备对应的内核信息。The lock information detection module is used to regularly detect the lock information in the nfs management module and the block device information in the kernel, and delete the kernel information corresponding to the deleted block device.

本发明所提供的一种集群文件系统,包括:lvm管理模块,nfs管理模块;其中,lvm管理模块,根据块设备创建信息创建对应的块设备提供给集群用户,使集群用户直接在块设备中进行IO操作;nfs管理模块,在挂载lvm存储池的节点挂载nfs文件系统,通过sanlock管理lvm存储池;A cluster file system provided by the present invention includes: an lvm management module and an nfs management module; wherein, the lvm management module creates a corresponding block device according to the block device creation information and provides it to a cluster user, so that the cluster user can directly access the block device. Perform IO operations; nfs management module, mount the nfs file system on the node where the lvm storage pool is mounted, and manage the lvm storage pool through sanlock;

可见,该集群文件系统提供块设备使虚拟设备根据所需要的文件格式,直接将该块设备格式化为自己需求的文件系统,即用户直接在块设备中进行IO操作,减少了现有技术中首先在文件系统中进行IO操作的步骤,降低了每次IO操作的流程;同时提供了较为速度的IO操作,提高集群文件系统的效率,同时提高了集群的虚拟设备的IO速度。It can be seen that the cluster file system provides a block device, so that the virtual device can directly format the block device into the file system required by the virtual device according to the required file format, that is, the user directly performs IO operations on the block device, reducing the number of problems in the prior art. First, the steps of performing IO operations in the file system reduce the process of each IO operation; at the same time, it provides relatively fast IO operations, improves the efficiency of the cluster file system, and improves the IO speed of the virtual devices of the cluster.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only It is an embodiment of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to the provided drawings without creative work.

图1为本发明实施例所提供的集群文件系统的结构框图;FIG. 1 is a structural block diagram of a cluster file system provided by an embodiment of the present invention;

图2为本发明实施例所提供的另一集群文件系统的结构框图。FIG. 2 is a structural block diagram of another cluster file system provided by an embodiment of the present invention.

具体实施方式Detailed ways

本发明的核心是提供一种集群文件系统,该集群文件系统提供块设备使虚拟设备根据所需要的文件格式,将该块设备格式化为自己需求的文件系统,降低了每次IO操作的流程。The core of the present invention is to provide a cluster file system, which provides a block device so that the virtual device can format the block device into a file system required by its own according to the required file format, which reduces the process of each IO operation .

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments These are some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

本实施例中lvm即logical volume manager(逻辑卷管理),nfs(network filesystem)即网络文件系统,sanlock是一个软件实现的轻量灵活的分布式锁管理器,在ovirt、libvirt等开源虚拟化项目中都有应用。现有技术中首先在文件系统中进行IO操作,然后再由文件系统将对应的IO操作写到块设备中,即进行了两次IO操作的流程,降低了IO操作速度。本实施例中直接提供块设备,使其直接在块设备中进行IO操作,因此节省了IO操作的流程,提高了IO操作速度。具体请参考图1,图1为本发明实施例所提供的集群文件系统的结构框图;该系统可以包括:lvm管理模块100,nfs管理模块200;其中,In this embodiment, lvm is the logical volume manager, nfs (network filesystem) is the network file system, and sanlock is a lightweight and flexible distributed lock manager implemented by software. It is used in open source virtualization projects such as ovirt and libvirt. There are applications. In the prior art, the IO operation is first performed in the file system, and then the corresponding IO operation is written to the block device by the file system, that is, the process of performing the IO operation twice, which reduces the IO operation speed. In this embodiment, the block device is directly provided, so that the IO operation is directly performed in the block device, so the process of the IO operation is saved and the speed of the IO operation is improved. For details, please refer to FIG. 1. FIG. 1 is a structural block diagram of a cluster file system provided by an embodiment of the present invention. The system may include: an lvm management module 100 and an nfs management module 200; wherein,

lvm管理模块100,用于根据块设备创建信息创建对应的块设备提供给集群用户,使集群用户直接在块设备中进行IO操作;The lvm management module 100 is configured to create a corresponding block device according to the block device creation information and provide it to a cluster user, so that the cluster user can directly perform IO operations in the block device;

具体的,lvm管理模块100提供具体的块设备,以提供给集群使用,增快集群文件系统的访问速度。Specifically, the lvm management module 100 provides a specific block device to be used by the cluster to increase the access speed of the cluster file system.

nfs管理模块200,用于在挂载lvm存储池的节点挂载nfs文件系统,通过sanlock管理lvm存储池。The nfs management module 200 is configured to mount the nfs file system on the node where the lvm storage pool is mounted, and manage the lvm storage pool through sanlock.

具体的,nfs管理模块200提供集群管理的依赖文件,通过nfs来判断作为sanlock锁管理的存储目标。且nfs管理模块200中sanlock管理的目的是为了lvm更好的适合集群管理文件,同时防止集群成员共同的访问,造成脑裂现象。即nfs文件系统提供了sanlock管理的存储依赖,即挂载lvm存储池的节点都需要挂载该nfs文件系统,通过sanlock来管理lvm存储池,使之适应于集群文件系统。Specifically, the nfs management module 200 provides a dependency file for cluster management, and determines the storage target as a sanlock lock management through nfs. In addition, the purpose of sanlock management in the nfs management module 200 is to better suit the lvm for cluster management files, and at the same time to prevent common access by cluster members, resulting in a split-brain phenomenon. That is, the nfs file system provides the storage dependency managed by sanlock, that is, the nodes that mount the lvm storage pool need to mount the nfs file system, and the lvm storage pool is managed by sanlock to make it suitable for the cluster file system.

进一步,sanlock不仅可以提供锁管理方案;同时Sanlock还可以提供一个弱的集群管理方案,即集群lvm存储池访问节点控制。以提高nfs管理模块200的管理效率和管理可靠性。Further, sanlock can not only provide a lock management solution; at the same time, Sanlock can also provide a weak cluster management solution, that is, cluster lvm storage pool access node control. In order to improve the management efficiency and management reliability of the nfs management module 200 .

该系统通过lvm管理模块100和nfs管理模块200达到管理控制集群文件系统。通过nfs提供的集群成员可以相互访问的文件系统来提供共享式可读写的文件,通过sanlock提供互斥的锁的操作,避免资源被不同的机器复用。The system manages and controls the cluster file system through the lvm management module 100 and the nfs management module 200 . Shared readable and writable files are provided through the file system provided by nfs that cluster members can access each other, and the operation of mutually exclusive locks is provided through sanlock to prevent resources from being reused by different machines.

基于上述技术方案,本发明实施例提供的集群文件系统,该系统提供给虚拟设备以具体的块文件,虚拟设备则根据所需要的文件格式,将该块设备格式化为自己需求的文件系统,降低了每次IO操作的流程。同时提供了较为速度的IO操作,提高集群文件系统的效率,同时提高了集群的虚拟设备的IO速度。Based on the above technical solution, in the cluster file system provided by the embodiment of the present invention, the system provides a virtual device with a specific block file, and the virtual device formats the block device into a file system required by itself according to the required file format, Reduced the flow of each IO operation. At the same time, it provides a relatively fast IO operation, improves the efficiency of the cluster file system, and at the same time improves the IO speed of the virtual devices of the cluster.

基于上述实施例,创建lv时候对lvm的元数据操作,因为多台主机都能同时的访问创建该lvm存储池,因此,为了保证lvm的元数据的安全性,集群的lvm的每一次对于元数据的操作必须是互斥的,因此,通过sanlock来保证集群的对于元数据的操作是互斥的,因此sanlock+nfs提供了vg锁,即对元数据的操作必须通过sanlock来获取vg的锁,然后在进行操作,并在操作完成后释放该vg锁。即可选的,本实施例中nfs管理模块200可以包括:Based on the above embodiment, the metadata of the lvm is operated on when the lvm is created, because multiple hosts can access the lvm storage pool at the same time. Therefore, in order to ensure the security of the lvm metadata, each time the cluster lvm Data operations must be mutually exclusive. Therefore, sanlock is used to ensure that the cluster's operations on metadata are mutually exclusive. Therefore, sanlock+nfs provides vg locks, that is, operations on metadata must obtain vg locks through sanlock. , then do the operation, and release that vg lock when the operation is complete. That is to say, in this embodiment, the nfs management module 200 may include:

初始化模块,用于在创建lvm存储池时,在nfs文件系统中创建对应的lvm存储池锁信息文件。The initialization module is used to create the corresponding lvm storage pool lock information file in the nfs file system when the lvm storage pool is created.

具体的,初始化模块具体为在创建lvm存储池时,通过sanlock执行initlockspace,并在每一台主机上执行add lockspace操作,创建以vg的uuid为名的文件,使文件具有对应lvm存储池的资源锁。Specifically, when the lvm storage pool is created, the initialization module executes initlockspace through sanlock, and performs the add lockspace operation on each host to create a file named with the uuid of vg, so that the file has resources corresponding to the lvm storage pool Lock.

即首先配置iscsi设备或者FC块设备,通过主机能够正常的访问到该LUN,把每一个使用该LUN的主机上挂载一个每台主机都可以访问到的nfs文件系统。部署sanlock管理软件,然后在一台主机上执行init lockspace(以即将创建的vg的uuid为该锁信息的lockspace name)操作,即初始化该分布式锁信息,然后在每一台主机上执行addlockspace操作,即执行连接锁操作,对每一台主机进行锁管理操作;创建vg(上述的lockspace name的uuid),然后在nfs文件系统上创建该vg的锁信息(以vg的uuid为名的文件),然后初始化。That is, first configure the iscsi device or FC block device, and the host can access the LUN normally, and mount an nfs file system that each host can access to each host that uses the LUN. Deploy the sanlock management software, and then execute the init lockspace operation on a host (with the uuid of the vg to be created as the lockspace name of the lock information), that is, initialize the distributed lock information, and then execute the addlockspace operation on each host , that is, perform a connection lock operation, perform lock management operations on each host; create a vg (the uuid of the above lockspace name), and then create the lock information of the vg on the nfs file system (a file named after the uuid of vg) , and then initialize.

元数据一致性单元,用于若接收到元数据操作请求时,通过sanlock获取对应的vg锁资源后执行对应的元数据操作,并在元数据操作完成后释放vg锁资源。The metadata consistency unit is used to obtain the corresponding vg lock resource through sanlock and execute the corresponding metadata operation when a metadata operation request is received, and release the vg lock resource after the metadata operation is completed.

其中,将若干个磁盘分区连接为一个整块的卷组(volume group,vg),形成一个lvm存储池。Among them, several disk partitions are connected into a whole volume group (volume group, vg) to form an lvm storage pool.

基于上述实施例,为了防止集群的同时访问造成脑裂问题,本实施例中nfs管理模块可以包括:Based on the above embodiment, in order to prevent the split-brain problem caused by simultaneous access to the cluster, the nfs management module in this embodiment may include:

块设备锁信息创建单元,用于在创建块设备时,在nfs文件系统中创建对应的块设备锁信息文件。The block device lock information creation unit is used to create a corresponding block device lock information file in the nfs file system when a block device is created.

具体的,块设备锁信息创建单元具体为在创建块设备时,通过sanlock创建以块设备的uuid为名的文件,并通过sanlock执行init resource操作,使文件具有块设备的资源锁。Specifically, the block device lock information creation unit is, when creating a block device, create a file named after the uuid of the block device through sanlock, and execute the init resource operation through sanlock, so that the file has a resource lock of the block device.

即每一次创建lv(即块设备)的操作必须在该nfs文件系统上面创建以该lv的uuid为名的文件,同时对该文件执行init resource操作,即该文件为该lv的锁信息。That is, each time the operation of creating an lv (ie, a block device) must create a file named by the uuid of the lv on the nfs file system, and at the same time perform the init resource operation on the file, that is, the file is the lock information of the lv.

块设备操作单元,用于若接收到块设备操作请求时,通过sanlock获取对应的锁资源后执行对应的块设备操作,并在块设备操作完成后释放锁资源。The block device operation unit is used for, if a block device operation request is received, obtain the corresponding lock resource through sanlock, execute the corresponding block device operation, and release the lock resource after the block device operation is completed.

块设备锁信息删除单元,用于若接收到块设备删除请求时,通过sanlock检测到块设备对应的锁资源未被占用时,删除块设备,并在删除成功后删除块设备对应的块设备锁信息文件。The block device lock information deletion unit is used to delete the block device when the lock resource corresponding to the block device is detected by sanlock when a block device deletion request is received, and delete the block device lock corresponding to the block device after the deletion is successful. information file.

具体的,每一次使用该lv时候必须获取该lv的资源锁,删除lv时候必须同时删除该资源锁。即对于内核的lv的残留数据来说,每次创建lv的操作必须通过sanlock创建出来sanlock的资源的锁,即以lv的uuid为命名的资源信息,每次使用lv的时候获取该lv的锁,然后才能正常的使用,对于lv的删除操作,必须检查该lv是否已经被占用,即该lv正在使用;能够正常的删除lv时,执行删除操作,删除完成之后必须删除该lv的锁信息,避免信息残留。Specifically, each time the lv is used, the resource lock of the lv must be acquired, and the resource lock must be deleted at the same time when the lv is deleted. That is, for the residual data of the lv of the kernel, each operation of creating an lv must create a lock of the sanlock resource through sanlock, that is, the resource information named with the uuid of the lv, and the lock of the lv is obtained every time the lv is used. , and then it can be used normally. For the deletion operation of lv, it is necessary to check whether the lv is already occupied, that is, the lv is in use; when the lv can be deleted normally, perform the deletion operation. After the deletion is completed, the lock information of the lv must be deleted. Avoid residual information.

基于上述任意实施例,请参考图2,本实施例还可以包括:Based on any of the above embodiments, please refer to FIG. 2 , this embodiment may further include:

锁信息检测模块,用于定时检测nfs管理模块中的锁信息和内核中块设备信息,并删除已经被删除的块设备对应的内核信息。The lock information detection module is used to regularly detect the lock information in the nfs management module and the block device information in the kernel, and delete the kernel information corresponding to the deleted block device.

具体的,其它集群成员节点需要有定时任务去检测该锁信息和内核lv的信息的内容,删除该已经被删除的lv的内核信息。确保系统资源不会被占用。Specifically, other cluster member nodes need to have scheduled tasks to detect the content of the lock information and the information of the kernel lv, and delete the kernel information of the deleted lv. Make sure that system resources are not occupied.

以上对本发明所提供的一种集群文件系统进行了详细介绍。本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以对本发明进行若干改进和修饰,这些改进和修饰也落入本发明权利要求的保护范围内。The cluster file system provided by the present invention has been described in detail above. The principles and implementations of the present invention are described herein by using specific examples, and the descriptions of the above embodiments are only used to help understand the method and the core idea of the present invention. It should be pointed out that for those skilled in the art, without departing from the principle of the present invention, several improvements and modifications can also be made to the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.

Claims (7)

1. A clustered file system, comprising: the lvm management module and the nfs management module; wherein,
the lvm management module is used for creating corresponding block equipment according to the block equipment creation information and providing the block equipment for a cluster user, so that the cluster user directly performs IO operation in the block equipment;
the nfs management module is used for mounting an nfs file system on a node of a mounted lvm storage pool and managing the lvm storage pool through sanlock;
the nfs management module comprises:
a block device lock information deleting unit, configured to delete a block device when detecting, through sanlock, that a lock resource corresponding to the block device is not occupied when a block device deletion request is received, and delete a block device lock information file corresponding to the block device after the deletion is successful;
further comprising: and the lock information detection module is used for detecting the lock information in the nfs management module and the block device information in the kernel at regular time and deleting the kernel information corresponding to the deleted block device.
2. The cluster file system of claim 1, wherein the nfs management module comprises:
and the initialization module is used for creating a corresponding lvm storage pool lock information file in the nfs file system when the lvm storage pool is created.
3. The cluster file system of claim 2, wherein the initialization module is specifically configured to execute an init lockspace through sanlock when the lvm storage pool is created, and execute add lockspace operation on each host to create a file named uuid of vg, so that the file has a resource lock corresponding to the lvm storage pool.
4. The cluster file system of claim 3, wherein the nfs management module comprises:
and the metadata consistency unit is used for acquiring the corresponding vg lock resources through sanlock and then executing the corresponding metadata operation if the metadata operation request is received, and releasing the vg lock resources after the metadata operation is completed.
5. The cluster file system of claim 4, wherein the nfs management module comprises:
and the block device lock information creating unit is used for creating a corresponding block device lock information file in the nfs file system when creating the block device.
6. The cluster file system according to claim 5, wherein the block device lock information creating unit is specifically configured to create a file named uuid of the block device by sanlock when creating the block device, and perform an init resource operation by sanlock to make the file have a resource lock of the block device.
7. The cluster file system of claim 6, wherein the nfs management module comprises:
and the block device operation unit is used for acquiring the corresponding lock resource through sanlock and then executing the corresponding block device operation if the block device operation request is received, and releasing the lock resource after the block device operation is completed.
CN201710113470.2A 2017-02-28 2017-02-28 a cluster file system Active CN106777394B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710113470.2A CN106777394B (en) 2017-02-28 2017-02-28 a cluster file system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710113470.2A CN106777394B (en) 2017-02-28 2017-02-28 a cluster file system

Publications (2)

Publication Number Publication Date
CN106777394A CN106777394A (en) 2017-05-31
CN106777394B true CN106777394B (en) 2020-09-18

Family

ID=58959799

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710113470.2A Active CN106777394B (en) 2017-02-28 2017-02-28 a cluster file system

Country Status (1)

Country Link
CN (1) CN106777394B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391236B (en) * 2017-09-15 2020-03-06 郑州云海信息技术有限公司 A method and device for realizing cluster block storage
CN109240601B (en) * 2018-07-24 2021-08-27 中国建设银行股份有限公司 Storage space processing method and device for cloud storage and storage medium
CN111225020B (en) * 2019-11-07 2021-06-29 苏州浪潮智能科技有限公司 A user-mode network file system dual-stack access method, device and device
CN112988319B (en) * 2019-12-02 2025-01-24 中兴通讯股份有限公司 LVM data processing method, device, computer equipment and computer readable medium
CN111813507B (en) * 2020-07-22 2023-05-02 超越科技股份有限公司 Method, system, equipment and medium for high availability of virtual machine based on sanlock
CN115102972B (en) * 2022-07-15 2024-10-22 济南浪潮数据技术有限公司 Method, device, equipment and medium for storing NFS (network File System) file

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120266162A1 (en) * 2011-04-12 2012-10-18 Red Hat Israel, Inc. Mechanism for Storing a Virtual Machine on a File System in a Distributed Environment
CN102664923A (en) * 2012-03-30 2012-09-12 浪潮电子信息产业股份有限公司 Method for realizing shared storage pool by utilizing Linux global file system
CN103731508A (en) * 2014-01-23 2014-04-16 易桂先 Cloud-storage-based network hard disk device and management method thereof
CN105471695A (en) * 2014-08-21 2016-04-06 西安慧泽知识产权运营管理有限公司 Storage area network virtualization management method
CN106201357A (en) * 2016-07-18 2016-12-07 浪潮(北京)电子信息产业有限公司 The construction method of a kind of storage pool and system

Also Published As

Publication number Publication date
CN106777394A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
CN106777394B (en) a cluster file system
CN111488241B (en) Method and system for realizing agent-free backup and recovery operation in container arrangement platform
US10379759B2 (en) Method and system for maintaining consistency for I/O operations on metadata distributed amongst nodes in a ring structure
CN110088733B (en) Storage layer-based orchestration of virtual machine migration
CN107667348B (en) Method and apparatus for migrating applications
EP2731013B1 (en) Backing up method, device, and system for virtual machine
US9286344B1 (en) Method and system for maintaining consistency for I/O operations on metadata distributed amongst nodes in a ring structure
CN107111533B (en) Virtual machine cluster backup
EP3008600B1 (en) Virtual machine backup from storage snapshot
US8706694B2 (en) Continuous data protection of files stored on a remote storage device
JP6516730B2 (en) Method and apparatus for backing up and restoring applications
US9354907B1 (en) Optimized restore of virtual machine and virtual disk data
US10719274B2 (en) Consistent replication of virtual computing instance data
CN106168885B (en) A kind of method and system of the logical volume dynamic capacity-expanding based on LVM
US9377964B2 (en) Systems and methods for improving snapshot performance
US20150331757A1 (en) One-click backup in a cloud-based disaster recovery system
WO2021018267A1 (en) Live migration method for virtual machine and communication device
CN107111530B (en) Disaster recovery method, system and device
US20170024232A1 (en) Methods and systems for integrating a volume shadow copy service (vss) requester and/or a vss provider with virtual volumes (vvols)
US9317538B1 (en) Methods for generating data sets using catalog entries
CN110221868B (en) Deployment method, device, electronic device and storage medium of host system
CN104809020B (en) A kind of mthods, systems and devices for generating snapshot
US8990168B1 (en) Efficient conflict resolution among stateless processes
CN103713952B (en) Virtual disk distributed-memory method based on UFS (Universal Flash Storage)
US11301156B2 (en) Virtual disk container and NVMe storage management system and method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200821

Address after: 215100 No. 1 Guanpu Road, Guoxiang Street, Wuzhong Economic Development Zone, Suzhou City, Jiangsu Province

Applicant after: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Address before: 450018 Henan province Zheng Dong New District of Zhengzhou City Xinyi Road No. 278 16 floor room 1601

Applicant before: ZHENGZHOU YUNHAI INFORMATION TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: Building 9, No.1, guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Wuzhong District, Suzhou City, Jiangsu Province

Patentee after: Suzhou Yuannao Intelligent Technology Co.,Ltd.

Country or region after: China

Address before: Building 9, No.1, guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Wuzhong District, Suzhou City, Jiangsu Province

Patentee before: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Country or region before: China