Damans227 opened a new issue, #14860:
URL: https://github.com/apache/cloudstack/issues/14860

   ### problem
   
   On KVM with FibreChannel managed storage, a multipath map that has lost all 
its paths makes CloudStack use a dead disk. Attaching the volume, or creating a 
template from it, reads I/O errors or zeros and still reports success.
   
   MultipathSCSIAdapterBase.isConnected() only checks that /dev/mapper/3<wwid> 
is a block device. A map with no paths left still passes that check, so 
CloudStack skips discovery. connectVolume.sh has the same gap: it sees the map 
exists and never rescans.
   
   A map like that is left behind when something on the host still holds it 
open after the volume is disconnected. A common cause is an LVM volume group 
inside the guest disk that the host activated. Seen on Pure FlashArray, where 
it produced an empty template (see #14858).
   
   ### versions
   
   ACS 4.22.1.1, KVM on Ubuntu 24.04, multipath-tools 0.9.4, Pure FlashArray 
over FibreChannel. The code is the same on 4.22 and main.
   
   ### The steps to reproduce the bug
   
   1. Attach a FlashArray data volume to a VM, so the host maps it.
   2. On the host, hold the map open: `sleep 10800 < /dev/mapper/3<wwid> &`
   3. Detach the volume. The map cant be flushed, the array removes the host 
connection, and the map is left with no paths:
   
   ```
   3624a937049646854b0ae410b0001171b dm-10 ##,##
   size=1.0G features='0' hwhandler='0' wp=rw
   > dd if=/dev/mapper/3624a937049646854b0ae410b0001171b of=/dev/null bs=4k 
count=1 iflag=direct
   0 bytes copied
   ```
   
   4. Attach the volume again. It succeeds and the VM gets the dead map:
   
   ```
   "deviceid": 1, "state": "Ready"
   > virsh domblklist i-2-17-VM
   vdb   /dev/mapper/3624a937049646854b0ae410b0001171b
   ```
   
   ### What to do about it?
   
   Treat a map with no active paths as not connected, and have connectVolume.sh 
flush such a map before it scans, so it gets rebuilt.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to