在lvconvert(8)手册页上,它说:
--type SegmentType Used to convert a logical volume to another segment type or to explicitly state the desired RAID1 segment type ("mirror" or "raid1") when converting a linear logical volume to a mirror with the '-m' argument.
但是“mirror”和“raid1”究竟有什么区别?
我还没有尝试过新的LVM段types,但概述是它们支持LVM中的Linux MD RAID特性。 也就是说,他们是使用MD代码的1,5,6等RAID级别,最终目标是消除LVM镜像的重复function,并使MD和LVM使用相同的代码。
这是非常新的东西,所以可能不适合于生产设置。
例如,它仍被认为是RHEL 6.2中的一项技术预览:
http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/6.2_Release_Notes/storage.html
实际的区别在于,'raid1'镜像段types始终将其日志(实际上是元数据子卷)存储在与被镜像的lv相同的PV上的磁盘上。 您不再需要第三个PV作为日志,或者将日志存储在内存中,因此--mirrorlog disk/core/mirrored的--corelog和--mirrorlog disk/core/mirrored选项不适用于raid1镜像段types。
另一个实际区别是,为了存储日志,在两个PV(原始和镜像)上都需要额外的1个PE,这些日志是在创build镜像时分配的。 如果您看到像1 extents needed, but only 0 available的错误1 extents needed, but only 0 available在尝试使用lvconvert创buildraid1型镜像时1 extents needed, but only 0 available ,则可能无法为每个PV上的1个PE额外空间logging日志。
自2013年9月左右以来,raid1已成为lvm2中的默认镜像段types。