centos lvm_如何从CentOS上的外部硬盘装载LVM卷?

centos lvm

On Fedora, after inserting/plugging in an exteranl hard disk with LVM partitions on it, the partitions will appear under /dev like /dev/lvm-group/lvm-partition.

在Fedora上,插入/插入带有LVM分区的外部硬盘后,这些分区将显示在/dev/dev/lvm-group/lvm-partition

However, on CentOS 6, the LVM volumes do not appear automatically. How to mount LVM partitions from an external hard disk on CentOS?

但是,在CentOS 6上,不会自动显示LVM卷。 如何从CentOS上的外部硬盘挂载 LVM分区?

What you need on CentOS is to activate the LVM volumes by the vgchange command

您需要在CentOS上通过vgchange命令激活LVM卷

# vgchange -aay

About the options:

关于选项:

-a, –activate [a|e|l]{y|n}

-a,–activate [a | e | l] {y | n}

Controls the availability of the logical volumes in the volume group for input/output. In other words, makes the logical volumes known/unknown to the kernel. If autoactivation option is used (-aay), each logical volume in the volume group is activated only if it matches an item in the activation/auto_activation_volume_list set in lvm.conf. If this list is not set, then all volumes are considered for activation. The -aay option should be also used during system boot so it’s possible to select which volumes to activate using the activation/auto_activation_volume_list settting.

控制逻辑组中用于输入/输出的逻辑卷的可用性。 换句话说,使逻辑卷对于内核是已知的/未知的。 如果使用自动激活选项(-aay),则仅当卷组中的每个逻辑卷与lvm.conf中设置的activation / auto_activation_volume_list中的项目匹配时,才激活该逻辑卷。 如果未设置此列表,则将考虑激活所有卷。 在系统引导过程中也应使用-aay选项,以便可以使用activation / auto_activation_volume_list设置来选择要激活的卷。

Activation of a logical volume creates a symbolic link /dev/VolumeGroupName/LogicalVolumeName pointing to the device node. This link is removed on deactivation. All software and scripts should access the device through this symbolic link and present this as the name of the device. The location and name of the underlying device node may depend on the distribution and configuration (e.g. udev) and might change from release to release.

逻辑卷的激活会创建一个指向设备节点的符号链接/ dev / VolumeGroupName / LogicalVolumeName。 该链接在停用时被删除。 所有软件和脚本都应通过此符号链接访问设备,并将其显示为设备的名称。 基础设备节点的位置和名称可能取决于发行版和配置(例如udev),并且可能因发行版本而异。

If clustered locking is enabled, add ‘e’ to activate/deactivate exclusively on one node or ‘l’ to activate/deactivate only on the local node. Logical volumes with single-host snapshots are always activated exclusively because they can only be used on one node at once.

如果启用了群集锁定,则添加“ e”以仅在一个节点上激活/停用,或者添加“ l”以仅在本地节点上激活/停用。 具有单主机快照的逻辑卷始终被专门激活,因为它们一次只能在一个节点上使用。

Then you should be able to find the LVM volume at /dev/VolumeGroupName/LogicalVolumeName and you can mount them as usual.

然后,您应该能够在/dev/VolumeGroupName/LogicalVolumeName找到LVM卷,并且可以照常安装它们。

Answered by Eric Z Ma.
埃里克·马(Eric Z Ma)回答。

翻译自: https://www.systutorials.com/how-to-mount-lvm-volume-from-an-external-hard-disk-on-centos/

centos lvm

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值