# US 2021/0240353 A1 · Resource management method and apparatus

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

- Number: US 2021/0240353 A1
- Document ID: US20210240353A1
- Status: Published application
- Kind: A1
- Application number: 17/239,860
- Filed: 2021-04-26
- Published: 2021-08-05
- Earliest claimed: 2018-10-26
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Junxiong GUAN
- Web page: https://patentgrep.com/patent/US20210240353A1

## CPC

- G06F 3/0608: {Saving storage space on storage systems}
- G06F 3/0665: {at area level, e.g. provisioning of virtual or logical volumes}
- 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/0659: {Command handling arrangements, e.g. command buffers, queues, command scheduling}
- G06F 3/0662: {Virtualisation aspects}
- G06F 3/067: {Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]}
- G06F 3/0688: {Non-volatile semiconductor memory arrays}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A resource management method of a first device, which includes: receiving a request message sent by a second device, where the request message is used to indicate the first device to allocate a memory to the second device, the request message carries a size of the memory. allocating a memory space from a memory of the first device based on the size of the memory carried in the request message; generating a virtual disk based on the memory space; and providing the virtual disk for the second device as a memory of the second device.

## Claims

### Claim 1

A resource management method, comprising:
receiving, by a first device, a request message sent by a second device, wherein the request message is used to indicate the first device to allocate a memory to the second device, the request message carries a size of the memory, and the first device and the second device communicate with each other based on a network protocol;
allocating, by the first device, a memory space from a memory of the first device based on the size of the memory carried in the request message;
generating, by the first device, a virtual disk based on the memory space; and
providing, by the first device, the virtual disk to the second device as a memory of the second device.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the generating of the virtual disk based on the memory area comprises:
simulating, by the first device, the memory space as a disk space; and
generating, by the first device, the virtual disk based on the disk space.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the providing, by the first device, of the virtual disk to the second device as a memory of the second device comprises:
receiving, by the first device, a disk query command sent by the second device; and
reporting, by the first device, the virtual disk to the second device as the memory of the second device.

### Claim 4 (depends on 1)

The method according to claim 1, further comprising:
receiving, by the first device, a disk type query command sent by the second device, wherein the disk type query command is used to query a type of a storage device that generates the virtual disk; and
sending, by the first device, indication information to the second device, wherein the indication information indicates that the virtual disk is generated based on a memory space of the memory of the first device.

### Claim 5 (depends on 1)

The method according to claim 1, further comprising:
receiving, by the first device, a virtual disk access request sent by the second device, wherein the virtual disk access request comprises an identifier of the virtual disk; and
accessing, by the first device according to the virtual disk access request, the memory space that generates the virtual disk.

### Claim 6

A resource management method, comprising:
sending, by a second device, a request message to a first device, wherein the request message is used to indicate the first device to allocate a memory to the second device, the request message carries a size of the memory, and the first device and the second device communicate with each other based on a network protocol;
receiving, by the second device, a virtual disk reported by the first device, wherein the virtual disk is generated based on a memory space of the memory in the first device; and
mapping, by the second device, the virtual disk to a virtual memory of the second device.

### Claim 7 (depends on 6)

The method according to claim 6, further comprising:
sending, by the second device, a disk query command to the first device, wherein the disk query command is for indicating the first device to report the virtual disk.

### Claim 8 (depends on 6)

The method according to claim 6 , further comprising:
sending, by the second device, a disk type query command to the first device, wherein the disk type query command is used to query a type of a storage device that generates the virtual disk;
receiving, by the second device, indication information sent by the first device, wherein the indication information is used to indicate that the virtual disk is generated based on the memory space of the memory in the first device; and
mapping, by the second device, the virtual disk to the virtual memory of the second device after receiving the indication information.

### Claim 9 (depends on 6)

The method according to claim 6, further comprising:
generating, by the second device, a memory access request;
when a memory address carried in the memory access request falls within an address range provided by the virtual memory, determining, by the second device in the virtual disk, a logical address corresponding to the memory address;
converting, by the second device, the memory access request into a virtual disk access request, wherein the virtual disk access request comprises an identifier of the virtual disk; and
sending, by the second device, the virtual disk access request to the first device.

### Claim 10

A first device for resource management, comprising:
a memory storing instructions; and
a processor coupled to the memory to execute the instructions to:
receive a request message sent by a second device, wherein the request message is used to indicate the first device to allocate a memory to the second device, the request message carries a size of the memory, and the first device and the second device communicate with each other based on a network protocol;
allocate a memory space from the memory of the first device based on the size of the memory carried in the request message;
generate a virtual disk based on the memory space; and
provide the virtual disk to the second device as a memory of the second device.

### Claim 11 (depends on 10)

The first device according to claim 10, wherein when generating a virtual disk based on the memory area, the processor executes the instructions further to:
simulate the memory space as a disk space; and
generate the virtual disk based on the disk space.

### Claim 12 (depends on 10)

The first device according to claim 10, wherein when providing the virtual disk to the second device as a memory of the second device, the processor executes the instructions further to:
receive a disk query command sent by the second device; and
report the virtual disk to the second device as the memory of the second device.

### Claim 13 (depends on 10)

The first device according to claim 10, wherein the processor executes the instructions further to:
receive a disk type query command sent by the second device, wherein the disk type query command is used to query a type of a storage device that generates the virtual disk; and
send indication information to the second device, wherein the indication information indicates that the virtual disk is generated based on a memory space of the memory of the first device.

### Claim 14 (depends on 10)

The first device according to claim 10, wherein the processor executes instructions further to:
receive a virtual disk access request sent by the second device, wherein the virtual disk access request comprises an identifier of the virtual disk; and
access, according to the virtual disk access request, the memory space that generates the virtual disk.
