在使用SYMANTEC的VxVM卷管理软件时,执行vxdg deport磁盘组(disk group)时报错“Some volumes in the disk group are in use”,形如:
# vxdg deport testdg
VxVM vxdg ERROR V-5-1-584 Disk group testdg: Some volumes in the disk group are in use
据SYMANTEC官方描述,该问题在VxVM 5.1以下才存在“This issue is applicable to systems running VxVM less than 5.1 version.”,但实际验证中发现,在该版本依然存在该问题。
vxdg deport命令的作用是卸载磁盘组(disk group),其前提要求是磁盘组内的卷已经没有I/O(若是文件系统,就需要先umount该文件系统卷;若是裸设备,则需要停止应用该设备的应用)。但在已经umount该磁盘组的文件系统卷的情况下,还是遇到了无法卸载磁盘组并出现上述的错误信息。
可以通过以下命令检查VxVM卷是否有I/O操作:
# vxprint -g -m | grep devopen
若回显信息中包含“devopen=on”,则表示该卷在内核中依然处于使用状态,只是用df -k之类的命令无法查看而已。
SYMANTEC官方给的解决方法是——重启该操作系统,原文描述是“Only way to resolve the issue is to reboot the system.”