首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >`<dev id>`到底是什么意思?devicemapper中in与LVM的相关性

`<dev id>`到底是什么意思?devicemapper中in与LVM的相关性
EN

Unix & Linux用户
提问于 2018-10-26 16:34:24
回答 1查看 302关注 0票数 0

在下面的链接https://www.kernel.org/doc/Documentation/device-mapper/thin-provisioning.txt中,我读到了以下内容:

create_thin

这是发送给设备映射器的命令。

EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2018-10-26 16:50:37

如果你说的是这部分:

代码语言:javascript
复制
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:

代码语言:javascript
复制
# 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)。

票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/477999

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档