Show Table of Contents
C.4.4. 创建一个映射允许访问设备中解密的内容
要访问设备中解密的内容,必须使用内核
device-mapper 建立映射。
为映射起个有实际意义的名字是很有用的。LUKS 为每个设备都提供了 UUID(通用唯一识别符,Universally Unique Identifier)。这个与设备名不同(例如:
/dev/sda3),只要 LUKS 标头完整,UUID 会保持不变。使用以下命令查找 LUKS 设备的 UUID:
cryptsetup luksUUID <device>
luks-<uuid> 是一个可靠、富含信息且唯一的映射名称示例,其中使用设备 LUKS UUID 替换 <uuid>(例如:luks-50ec957a-5b5a-47ee-85e6-f8085bbc97a8)。这个命名规则看来很繁琐,但并不需要经常输入。
cryptsetup luksOpen <device> <name>
应该有一个设备节点
/dev/mapper/<name> 代表加密的设备。这个块设备可与其他未加密块设备一样进行读、写操作。
使用以下命令查看有关映射设备的信息:
dmsetup info <name>
注意
详情请阅读
dmsetup(8) man page。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.