Exporting NVMe-oF devices read-only enforced on export from the NVMe-oF target.

Mark Ruijter mruijter at primelogic.nl
Wed Sep 30 03:38:49 EDT 2020


Hi Chaitanya,

Let me explain my use case. Since I think we having different things in mind.
You are suggesting to use nvme cli to set an nvme drive namespace to readonly and export it readonly using the NVMe target driver?
This will certainly work, I agree.

In my case let's assume I have a raid device /dev/mdX that I want to export readonly to an initiator. I am unable to run any command on the initiator.
The target should export the device in such a way that the initiator can never accidentally write to it.

I fail to understand how nvme cli NVME_NS_WRITE_PROTECT can help me in this use case?

Thanks,

--Mark


Op 30-09-20 02:29 heeft Chaitanya Kulkarni <Chaitanya.Kulkarni at wdc.com> geschreven:

    On 9/29/20 04:35, Mark Ruijter wrote:
    > Unless I am mistaken the NVMe-oF target driver does currently not support to export a device read-only from the target system.
    > For exporting readonly snapshot devices I am currently using the attached patch.
    
    It does, have you tried using nvme cli with NVME_NS_WRITE_PROTECT feature ?
    
    we have both host and core patched for read-only mode, if you find any bug
    
    please let me know.
    
    



More information about the Linux-nvme mailing list