Using load balancing with scale-up and scale-down
Namespaces are automatically redistributed during scale-up and scale-down processes to ensure equal load across gateways.
About this task
Namespace redistribution helps ensure that the load across all gateways in the group are the same. The automatic redistribution process begins automatically after a scale-up or scale-down operation. Use this information to understand how to use and prepare for load balancing with scale-up and scale-down operations.
- Preparing new gateways with listeners defined for each system.
- Verifying that the new gateway IP addresses are discovered as expected.
- Reconnecting from the initiators to the subsystems.
The following procedure provides detailed load balancing scale-up steps.
When automatic listeners are enabled on the subsystems listeners get deleted automatically during scale-down and there is no need to delete them manually.
The first step of the failover verifies that I/O can continue to the remaining namespaces, leaving one of the gateways with more load than the others. Therefore, the system begins a background process will automatically rebalance the namespaces across the existing gateways.
Procedure
What to do next
- List the NVMe-oF block devices.
For example,nvme list[root@host01 ~]# nvme list Node Generic SN Model Namespace Usage Format FW Rev --------------------- ---------------- ------------------- ----------------------- --------- -------------------------- ---------------- -------- /home/nvme01_node01 /home/ng1n1 SPDK00000000000001 SPDK bdev Controller 1 10,49 MB / 10,49 MB 4 KiB + 0 B 23.01 ...
- Verify that the initiator is connected to all NVMe-oF gateways and subsystems in the gateway group.
For example,nvme list-subsys[root@init-nvme-vm5 ~]# nvme list-subsys nvme-subsys5 - NQN nqn.2016-06.io.spdk:cnode2 \ +- nvme5 tcp traddr 10.243.64.5,trsvcid 4420 live +- nvme6 tcp traddr 10.243.64.10,trsvcid 4420 live +- nvme7 tcp traddr 10.243.64.11,trsvcid 4420 live +- nvme8 tcp traddr 10.243.64.12,trsvcid 4420 live nvme-subsys1 - NQN nqn.2016-06.io.spdk:cnode1.group1 \ +- nvme1 tcp traddr 10.243.64.5,trsvcid 4420 live
- Create a filesystem on the target of your choosing. Use the target path that was found in step 1.
For example,mkfs NVME_NODE_PATH[root@host01 ~]# mkfs /home/nvme01_node01 mke2fs 1.46.5 (20-Dec-2023) Discarding device blocks: done Creating filesystem with 2560 4k blocks and 2560 inodes Allocating group tables: done Writing inode tables: done Writing superblocks and filesystem accounting information: done
- Mount NVMe-oF.
For example,mkdir /mnt/nvmeof[root@host01 ~]# mkdir /mnt/nvmeof
- Mount the node on within the NVMe-oF directory.
For example,mount NVME_NODE_PATH /mnt/nvmeof[root@host01 ~]# mount /home/nvme01_node01 /mnt/nvmeof
- Using sudo commands, list mounted NVMe-oF files.
For example,ls /mnt/nvmeof$ ls /mnt/nvmeof lost+found
- Create a text file within the mnt/nvmeof directory.
For example,
$ sudo bash -c "echo Hello NVMe-oF > /mnt/nvmeof/hello.txt"
- Verify that the text file can now be reached.
For example,
$ cat /mnt/nvmeof/hello.txt Hello NVMe-oF