11.5.8. 重新使用 LUN
LUN 无法重复使用,因为 可以创建存储域或虚拟磁盘。如果您尝试重复使用 LUN,管理门户会显示以下出错信息:
Physical device initialization failed. Please check that the device is empty and accessible by the host.
Physical device initialization failed. Please check that the device is empty and accessible by the host.
自托管引擎在安装过程中显示以下错误:
[ ERROR ] Error creating Volume Group: Failed to initialize physical device: ("[u'/dev/mapper/000000000000000000000000000000000']",) [ ERROR ] Failed to execute stage 'Misc configuration': Failed to initialize physical device: ("[u'/dev/mapper/000000000000000000000000000000000']",)
[ ERROR ] Error creating Volume Group: Failed to initialize physical device: ("[u'/dev/mapper/000000000000000000000000000000000']",)
[ ERROR ] Failed to execute stage 'Misc configuration': Failed to initialize physical device: ("[u'/dev/mapper/000000000000000000000000000000000']",)
在 LUN 可以重复使用前,必须清除旧的分区表。
从 LUN 清除分区表
重要
您必须在正确的 LUN 上运行此步骤,以便不会意外破坏数据。
使用您要重复使用的 LUN ID、一次读取和写入的最大字节数以及要复制的输入块的数量,运行 dd
命令:
dd if=/dev/zero of=/dev/mapper/LUN_ID bs=1M count=200 oflag=direct
# dd if=/dev/zero of=/dev/mapper/LUN_ID bs=1M count=200 oflag=direct