当前有个VCS的实验环境,存在于RHEL6的KVM中。两个节点有三个大小为10G的共享磁盘, Disk BUS是virtio。如图所示:

Configure Virtio Driver Coexistence With VXVM In KVM_职场

当安装完vxvm后,执行vxdisk list命令时,发现不了这个三块硬盘,如图所示:

Configure Virtio Driver Coexistence With VXVM In KVM_RHEL6_02

Configure Virtio Driver Coexistence With VXVM In KVM_linux_03

而实际上,使用fdisk命令可以看到这三块磁盘的:

Configure Virtio Driver Coexistence With VXVM In KVM_职场_04

想了半天,想到官方手册中有提到VxVM的third-party driver (TPD)特性,于是乎就赶紧配置了起来。这里要用到vxddladm命令。

两个节点运行以下命令:

Configure Virtio Driver Coexistence With VXVM In KVM_休闲_05

Configure Virtio Driver Coexistence With VXVM In KVM_RHEL6_06

如果不想某个磁盘被vxvm使用,就是使用vxddladm rmforeign命令将其删除。

接着两节点执行扫描磁盘操作:

Configure Virtio Driver Coexistence With VXVM In KVM_linux_07

Configure Virtio Driver Coexistence With VXVM In KVM_RHEL6_08

Configure Virtio Driver Coexistence With VXVM In KVM_linux_09

Configure Virtio Driver Coexistence With VXVM In KVM_RHEL6_10

到此,vxvm就可以使用这三块磁盘了。以下是创建卷组,创建卷的过程:

在创建之前,需要初始化这三块磁盘,直到使用vxdisk list显示的状态是online而不是online invalid状态,否则不能继续创建磁盘组。

Configure Virtio Driver Coexistence With VXVM In KVM_RHEL6_11

接着使用vxdg创建mydg磁盘组:

Configure Virtio Driver Coexistence With VXVM In KVM_休闲_12

将vdc和vdb加入到mydg中:

Configure Virtio Driver Coexistence With VXVM In KVM_职场_13

创建完成后,查看mydg的详细信息:

Configure Virtio Driver Coexistence With VXVM In KVM_休闲_14

Configure Virtio Driver Coexistence With VXVM In KVM_RHEL6_15

在vcs01上执行磁盘组导出操作,然后在vcs02上执行磁盘组导入,检查下是否正常:

vcs01上导出mydg:

Configure Virtio Driver Coexistence With VXVM In KVM_linux_16

vcs02上导入mydg:

Configure Virtio Driver Coexistence With VXVM In KVM_RHEL6_17

到此,如何让vxvm支持第三方驱动就已经配置完了。

参考文档:

              Veritas? Volume Manager Administrator's Guide For Linux