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

Chaitanya Kulkarni Chaitanya.Kulkarni at wdc.com
Wed Sep 30 21:41:20 EDT 2020


On 9/30/20 00:38, Mark Ruijter wrote:
> 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 see, your patch looks good, but it doesn't cover all the cases if we
want to export ro device.

Let me send a series on the top of your patch to make discussion easy.

> I fail to understand how nvme cli NVME_NS_WRITE_PROTECT can help me in this use case?
>
> Thanks,
>
> --Mark





More information about the Linux-nvme mailing list