This section describes how to check whether there are available raw disks and Linux LVM disk partitions and how to create Linux LVM disk partitions.
To improve the system stability, attach a data disk to Docker and use the direct-lvm mode.
lsblk -l | grep disk
If the following information is displayed, the raw disks named xvda and xvdb exist on the node.
xvda 202:0 0 40G 0 disk xvdb 202:16 0 100G 0 disk
devicename indicates the raw disk name, for example, xvda and xvdb in the previous step.
Run the lsblk /dev/xvda and lsblk /dev/xvdb commands. If the following information is displayed, xvda has been partitioned and used while xvdb is available. If no raw disk is available, bind an EVS disk to the node. It is advised that the disk space be no less than 80 GB.
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT xvda 202:0 0 40G 0 disk ├─xvda1 202:1 0 100M 0 part /boot └─xvda2 202:2 0 39.9G 0 part /
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT xvdb 202:16 0 100G 0 disk
sfdisk -l 2>>/dev/null| grep "Linux LVM"
If the following information is displayed, two Linux LVM partitions, /dev/nvme0n1p1 and /dev/nvme0n1p2, exist in the system.
/dev/nvme0n1p1 1 204800 204800 209715200 8e Linux LVM /dev/nvme0n1p2 204801 409600 204800 209715200 8e Linux LVM
<partdevice> is the Linux LVM partition found in the previous step.
In this example, run the lsblk/dev/nvme0n1p1 and lsblk/dev/nvme0n1p2 commands. If the following information is displayed, partition nvme0n1p is in use while nvme0n1p2 is available.
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT nvme0n1p1 259:3 0 200G 0 part └─vgpaas-thinpool_tdata 251:8 0 360G 0 lvm └─vgpaas-thinpool 251:10 0 360G 0 lvm
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT nvme0n1p2 259:1 0 100G 0 part
If no AZ is available, perform 3 to create a partition for Docker.
fdisk /dev/devicename
Start sector (1048578048-4294967295, 1048578048 by default): 1048578048 Last sector, +sector or size {K, M, or G} (1048578048-4294967294, 4294967294 by default): +100G
This configuration indicates that partition 4 has been set to the Linux type and the size is 100 GiB.
Command (enter m to obtain help): t Partition ID (ranging from 1 to 4, 4 by default): 4 Hex code (enter L to list all codes): 8e This configuration changes the type of the partition Linux to Linux LVM.
Command (enter m to obtain help): w The partition table has been altered!