# US 11,029,848 B2 · File management method, distributed storage system, and management node

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,029,848 B2
- Document ID: US11029848B2
- Status: Granted
- Kind: B2
- Application number: 16/178,220
- Filed: 2018-11-01
- Published: 2019-03-07
- Granted: 2021-06-08
- Earliest claimed: 2014-08-12
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Jun Xu; Junfeng Zhao; Yuangang Wang
- Web page: https://patentgrep.com/patent/US11029848B2

## CPC

- G06F 3/0607: {by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device}
- G06F 3/0631: {by allocating resources to storage systems}
- G06F 3/0643: {Management of files}
- G06F 3/0652: {Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket}
- G06F 3/067: {Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]}
- G06F 16/13: File access structures, e.g. distributed indices (arrangements of input from, or output to, record carriers G06F3/06)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A file management method, a distributed storage system, and a management node are disclosed. In the distributed storage system, after receiving a file creation request sent by a host for requesting to create a file in a distributed storage system, a management node allocates, to the file, first virtual space from global virtual address space of the distributed storage system, where local virtual address space of each storage node in the distributed storage system is corresponding to a part of the global virtual address space. Then, the management node records metadata of the file, where the metadata of the file includes information about the first virtual space, and the information about the first virtual space is used to point to local virtual address space of a storage node that is used to store the file. Further, the management node sends, the information about the first virtual space to the host.

## Claims

### Claim 1

A file management method, comprising:
receiving, by a management node, a file creation request from a host to create a file in a distributed storage system, the distributed storage system comprising the management node and multiple storage nodes;
allocating, by the management node to the file, first global virtual space from global virtual address space of the distributed storage system, the management node allocating the first global virtual space according to the file creation request; and
sending, by the management node, a file creation success response to the host, the file creation success response carrying information about the first global virtual space, the information about the first global virtual space being mapped to first local virtual address space of a first storage node in the multiple storage nodes, and the first local virtual address space of the first storage node being mapped to first local physical storage space of the first storage node for storing the file.

### Claim 2 (depends on 1)

The method of claim 1, wherein an address bit quantity of the global virtual address space is greater than an address bit quantity of local virtual address space of a storage node in the distributed storage system.

### Claim 3 (depends on 1)

The method of claim 1, wherein the address bit quantity 2N of the global virtual address space is twice the address bit quantity N of the local virtual address space of the storage node in the distributed storage system, wherein the N most significant bits of an address of the global virtual address space are used to point to the storage node and the N least significant bits of the address of the global virtual address space are used to point to the local virtual address space of the storage node.

### Claim 4 (depends on 1)

The method of claim 1, wherein the information about the first global virtual space comprises a file start address and a file size of the file in the global virtual address space.

### Claim 5 (depends on 1)

The method of claim 1, wherein the global virtual address space comprises multiple areas and different areas in the multiple areas have different space allocation granularities; and
the allocating comprises:
allocating, by the management node to the file, the first global virtual space from a first area in the global virtual address space of the distributed storage system according to the file creation request and a space allocation granularity of the first area, wherein the space allocation granularity of the first area is the smallest value among that of areas that can be currently allocated.

### Claim 6 (depends on 5)

The method of claim 5, wherein the method further comprises:
receiving, by the management node, a file space expansion request sent by the host requesting to expand a space of the file;
allocating, by the management node to the file, second global virtual space from a second area in the global virtual address space according to the file space expansion request and a space allocation granularity of the second area, wherein the space allocation granularity of the second area is greater than the space allocation granularity of the first area; and
sending, by the management node, a file space expansion response to the host carrying information about the second global virtual space, the information about the second global virtual space being mapped to second local virtual address space of a second storage node that stores the file.

### Claim 7 (depends on 1)

The method of claim 1, wherein the method further comprises:
reclaiming, by the management node, the first global virtual space allocated from the global virtual address space to the file;
determining, by the management node and according to a preset correspondence between the global virtual address space and the local virtual address space, the first storage node that stores the file; and
sending, by the management node, a space reclaiming message to the first storage node to instruct the first storage node to reclaim the first local virtual address space and the first local physical storage space corresponding to the file.

### Claim 8

A distributed storage system, comprising:
multiple storage nodes,
a management node coupled to the multiple storage nodes and configured to:
receive a file creation request from a host to create a file in the distributed storage system;
allocate, to the file, first global virtual space from global virtual address space of the distributed storage system, the allocating being based on the file creation request; and
send a file creation success response to the host, the file creation success response carrying information about the first global virtual space, the information about the first global virtual space being mapped to first local virtual address space of a first storage node in the multiple storage nodes, and the first local virtual address space of the first storage node being mapped to first local physical storage space of the first storage node for storing the file.

### Claim 9 (depends on 8)

The distributed storage system of claim 8, wherein an address bit quantity of the global virtual address space is greater than an address bit quantity of local virtual address space of a storage node in the distributed storage system.

### Claim 10 (depends on 9)

The distributed storage system of claim 9, wherein the address bit quantity 2N of the global virtual address space is twice the address bit quantity N of the local virtual address space of the storage node in the distributed storage system, wherein the N most significant bits of an address of the global virtual address space are used to point to the storage node and the N least significant bits of the address of the global virtual address space are used to point to the local virtual address space of the storage node.

### Claim 11 (depends on 8)

The distributed storage system of claim 8, wherein the information about the first global virtual space comprises a file start address and a file size of the file in the global virtual address space.

### Claim 12 (depends on 8)

The distributed storage system of claim 8, wherein the global virtual address space comprises multiple areas and different areas in the multiple areas have different space allocation granularities; and
the management node is configured to allocate, to the file, the first global virtual space from a first area in the global virtual address space of the distributed storage system according to the file creation request and a space allocation granularity of the first area, wherein the space allocation granularity of the first area is the smallest value among that of areas that can be currently allocated.

### Claim 13 (depends on 12)

The distributed storage system of claim 12, wherein the management node is further configured to:
receive a file space expansion request sent by the host requesting to expand a space of the file;
allocate, to the file, second global virtual space from a second area in the global virtual address space according to the file space expansion request and a space allocation granularity of the second area, wherein the space allocation granularity of the second area is greater than the space allocation granularity of the first area; and
send a file space expansion response to the host carrying the information about the second global virtual space, the information about the second global virtual space being mapped to second local virtual address space of a second storage node, in the multiple storage nodes, that stores the file.

### Claim 14 (depends on 8)

The distributed storage system of claim 8, wherein the management node is further configured to:
reclaim the first global virtual space allocated from the global virtual address space to the file;
determine, according to a preset correspondence between the global virtual address space and the local virtual address space, the first storage node that stores the file; and
send a space reclaiming message to the first storage node that stores the file to instruct the first storage node to reclaim the first local virtual address space and the first local physical storage space corresponding to the file.

### Claim 15

A management node, comprising:
a communications interface configured to communicate with multiple storage nodes; and
a processor coupled to the communications interface and configured to:
receive a file creation request from a host to create a file in the distributed storage system comprising the management node and the multiple storage nodes;
allocate, to the file, first global virtual space from global virtual address space of the distributed storage system, the allocating of the first global virtual spacing being performed according to the file creation request, wherein local virtual address space of each storage node in the distributed storage system corresponds to a part of the global virtual address space; and
send a file creation success response to the host, the file creation success response carrying information about the first global virtual space, the information about the first global virtual space being mapped to first local virtual address space of a first storage node in the multiple storage nodes, and the first local virtual address space of the first storage node being mapped to first local physical storage space of the first storage node for storing the file.

### Claim 16 (depends on 15)

The management node of claim 15, wherein an address bit quantity of the global virtual address space is greater than an address bit quantity of local virtual address space of a storage node in the distributed storage system.

### Claim 17 (depends on 15)

The management node of claim 15, wherein the address bit quantity 2N of the global virtual address space is twice the address bit quantity N of the local virtual address space of the storage node in the distributed storage system, wherein the N most significant bits of an address of the global virtual address space are used to point to the storage node and the N least significant bits of the address of the global virtual address space are used to point to the local virtual address space of the storage node.

### Claim 18 (depends on 15)

The management node of claim 15, wherein the information about the first global virtual space comprises a file start address and a file size of the file in the global virtual address space.

### Claim 19 (depends on 15)

The management node of claim 15, wherein the global virtual address space comprises multiple areas and different areas in the multiple areas have different space allocation granularities; and
in the step of the allocating, the processor is configured to:
allocate, to the file, the first global virtual space from a first area in the global virtual address space of the distributed storage system according to the file creation request and a space allocation granularity of the first area, wherein the space allocation granularity of the first area is the smallest value among that of areas that can be currently allocated.

### Claim 20 (depends on 19)

The management node of claim 19, wherein the processor is further configured to:
receive a file space expansion request sent by the host requesting to expand a space of the file;
allocate, to the file, second global virtual space from a second area in the global virtual address space according to the file space expansion request and a space allocation granularity of the second area, wherein the space allocation granularity of the second area is greater than the space allocation granularity of the first area; and
send a file space expansion response to the host carrying information about the second global virtual space, the information about the second virtual space being mapped to second local virtual address space of a second storage node that stores the file.

### Claim 21 (depends on 15)

The management node of claim 15, wherein the processor is further configured to:
reclaim the first global virtual space allocated from the global virtual address space to the file;
determine, based on a preset correspondence between the global virtual address space and the local virtual address space, the first storage node that stores the file; and
sending a space reclaiming message to the first storage node to instruct the first storage node to reclaim the first local virtual address space and the first local physical storage space corresponding to the file.
