在下面的链接https://www.kernel.org/doc/Documentation/device-mapper/thin-provisioning.txt中,我读到了以下内容:
create_thin
这是发送给设备映射器的命令。
发布于 2018-10-26 16:50:37
如果你说的是这部分:
i) Creating a new thinly-provisioned volume.
To create a new thinly- provisioned volume you must send a message to an
active pool device, /dev/mapper/pool in this example.
dmsetup message /dev/mapper/pool 0 "create_thin 0"
Here '0' is an identifier for the volume, a 24-bit number. It's up
to the caller to allocate and manage these identifiers. If the
identifier is already in use, the message will fail with -EEXIST.然后,它只是引用薄卷(“一个标识符”)的唯一数字。LVM似乎给他们分配了一个显而易见的方法--通过计数(从一个)。您可以看到通过检查dmsetup table的输出而使用的LVM:
# dmsetup table | grep thin
Giri-ThinPoolLV-tpool: 0 116752384 thin-pool 253:9 253:10 1024 22803 0
Giri-vm--gl--runner: 0 62914560 thin 253:12 6
Giri-vm--squeeze--64: 0 10485760 thin 253:12 7
Giri-vm--portal--dev: 0 62914560 thin 253:12 5
Giri-vm--jessie--64: 0 31457280 thin 253:12 1
Giri-vm--stretch--64: 0 41943040 thin 253:12 2
Giri-vm--portal--test: 0 62914560 thin 253:12 4
Giri-vm--wheezy--64: 0 31457280 thin 253:12 3(如果您以前没有见过它,那么253:12是一个主要的设备:次要数字,在本例中是/dev/dm-12,即Giri-ThinPoolLV-tpool)。
https://unix.stackexchange.com/questions/477999
复制相似问题