1、报错详情|OS-EXT-STS:vm_state|error||OS-SRV-USG:launched_at|2025-03-12T08:15:42.000000||OS-SRV-USG:terminated_at|-||accessIPv4|||accessIPv6|||config_drive|True||created|2024-10-17T02:52:36Z||description|zflusersapp001||fault|{message:Unable to update attachment.(卷无效: duplicate connectors detected on volume 8256027a-2a16-496e-bbf1-b20d1f7028e8). (HTTP 500) (Request-ID: req-b1f6b556-ba...,code:400,created:2026-06-26T02:45:52Z}||flavor:disk|0||flavor:ephemeral|0||flavor:extra_specs|{Module:B-ARM}||flavor:original_name|s1.xhuge-B-ARM|2、原因详解​ cinder块存储服务认为同一个卷被多个计算节点或连接实例同时占用导致无法安全的更新其挂载状态。常见原因包括虚拟机非正常关机或强制删除导致卷的 attach_status 仍为 attaching 或 in-use 但实际已无有效连接。多次执行挂载/卸载操作Cinder 数据库中残留了旧的连接记录。底层存储如 Ceph RBD存在锁冲突或未释放的连接句柄。Nova 与 Cinder 之间的状态同步延迟或不一致。3、解决方案1.检查卷状态openstack volume show 8256027a-2a16-496e-bbf1-b20d1f7028e8#或cinder show 8256027a-2a16-496e-bbf1-b20d1f7028e8重点关注 status 和attachments 字段。如果status手机in-use但attachments为空或指向一个不存在的实例说明状态不一致需重置状态。2.检查数据库中的重复连接记录#登陆cinder数据库mysql-uroot-p$passwordcinder#查看该卷的所有连接记录select* from volume_attachment WHEREvolume_id$volume_id\G***************************1.row***************************created_at:2026-06-2605:48:13updated_at:2026-06-2605:48:20deleted_at:NULLdeleted:0id:4a8556d0-665d-46bf-a27f-4cff320e959b volume_id:8256027a-2a16-496e-bbf1-b20d1f7028e8 attached_host: f9566ebc80443ea instance_uuid:4f30925b-d648-4e85-9776-6dfcf508f3af mountpoint:/dev/vda attach_time:2026-06-2605:48:19detach_time:NULLattach_mode: rw attach_status: attached connection_info: {attachment_id:4a8556d0-665d-46bf-a27f-4cff320e959b,encrypted:false,driver_volume_type:rbd,secret_uuid:null,qos_specs:null,volume_id:8256027a-2a16-496e-bbf1-b20d1f7028e8,auth_username:null,secret_type:ceph,name:pool-e61ee59ecd5640268c09ecbeef4db1,volume:8256027a-2a16-496e-bbf1-b20d1f7028e8,discard:true,keyring:null,cluster_name:ceph,auth_enabled:false,hosts:[55.71.128.13,55.71.128.60,55.71.128.61],access_mode:rw,ports:[6789,6789],connector: {initiator:iqn.1994-05.com.redhat:6639b8383506,ip:55.71.132.41,platform:x86_64,host:f9566ebc80443ea,do_local_attach:false,mountpoint:/dev/vda,os_type:linux2,multipath:false}}***************************2.row***************************created_at:2024-10-1702:52:36updated_at:2024-10-1702:52:45deleted_at:2025-03-1208:15:14deleted:1id:669ddac3-e98e-41ce-a5a0-b5ef32b84921 volume_id:8256027a-2a16-496e-bbf1-b20d1f7028e8 attached_host: de500ed620294cbb instance_uuid:4f30925b-d648-4e85-9776-6dfcf508f3af mountpoint:/dev/vda attach_time:2024-10-1702:52:44detach_time:2025-03-1208:15:14attach_mode: rw attach_status: detached connection_info: {attachment_id:669ddac3-e98e-41ce-a5a0-b5ef32b84921,encrypted:false,driver_volume_type:rbd,secret_uuid:null,qos_specs:null,volume_id:8256027a-2a16-496e-bbf1-b20d1f7028e8,auth_username:null,secret_type:ceph,name:pool-e61ee59ecd5640268c09ecbeef4db1,volume:8256027a-2a16-496e-bbf1-b20d1f7028e8,discard:true,keyring:null,cluster_name:ceph,auth_enabled:false,hosts:[55.71.128.13,55.71.128.4,55.71.128.15],access_mode:rw,ports:[6789,6789],connector: {initiator:iqn.1994-05.com.redhat:6639b8383506,ip:55.71.132.39,platform:x86_64,host:de500ed620294cbb,do_local_attach:false,mountpoint:/dev/vda,os_type:linux2,multipath:false}}3.清理数据库中的重复连接记录#备份mysqldump-uroot-p$passwordcindercinder_bak_date%F.sql#软删除#将deleted字段设为1更新删除时间UPDATE volume_attachment SETdeleted1,deleted_at2026-06-26 17:00:00WHEREvolume_id$volume_idANDid$id;#硬删除DELETE from volume_attachment WHEREvolume_id$volume_idANDid$id;#验证select* from volume_attachment WHEREvolume_id$volume_id\G4.重试疏散nova evacuate$uuid