Bug 219486 - Device Mapper accepts writes even if the underlying devices are dead or removed
Summary: Device Mapper accepts writes even if the underlying devices are dead or removed
Status: NEW
Alias: None
Product: IO/Storage
Classification: Unclassified
Component: LVM2/DM (show other bugs)
Hardware: All Linux
: P3 high
Assignee: Alasdair G Kergon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-10 01:57 UTC by Mirosław Łuć
Modified: 2024-11-10 12:37 UTC (History)
1 user (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Steps to Reproduce (4.89 KB, text/plain)
2024-11-10 01:57 UTC, Mirosław Łuć
Details

Description Mirosław Łuć 2024-11-10 01:57:22 UTC
Created attachment 307192 [details]
Steps to Reproduce

Hello,

At first I noticed very strange behavior of iSCSI+MPIO. And very unexpected for me.
My VM completely lost connection to iSCSI storage (all MPIO paths down), but the VM could still write data to MPIO devices in /dev/mapper/.

After some digging I found that this behavior applies not only to iSCSI+MPIO, but it seems to be a feature of Device Mapper in the Linux kernel.
This applies to both MPIO and LVM.

I launched test VMs and checked 3 cases of this strange feature(?) of the Device Mapper:
1. LVM & dead devices - local disks offline
   Disabling the underlying PV disk - I can still write to LV (/dev/mapper/<vg>-<lv>)
2. MPIO & dead devices - all iSCSI MPIO paths down - transport-offline
   Shutting down the iSCSI server - I can still write to iSCSI MPIO devices (/dev/mapper/mpath*)
3. LVM & removed devices - local disks removed
   Removing the underlying PV disk - I can still write to LV (/dev/mapper/<vg>-<lv>)
Details in the file attached: steps_to_reproduce.txt.

Expected results: DM devices MUST return an error on write attempts when the underlying devices are down.
BTW, while reading, DM returns I/O errors.

-- 
Regards,
Mirek
Comment 1 Mirosław Łuć 2024-11-10 12:37:46 UTC
Sorry, I forgot to add something...

>> This bugzilla is for reporting bugs against upstream Linux kernels.
>> If you did not compile your own kernel from scratch, you are probably in the
>> wrong place.
>> Please use the following links to report a bug to your distribution instead:
>> Ubuntu 

Yes, I know about it, but I have already reported this bug(?) to Ubuntu.
That was 3 weeks ago and so far no answer, no response. You can see it here:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2084979

Note You need to log in before you can comment on or make changes to this bug.