NVMf initiator persistent across boots
Max Gurtovoy
maxg at mellanox.com
Sun Mar 4 07:56:31 PST 2018
Hi all,
Sorry for the delay, but I wanted to know if we had a progress for this
topic. I want to add functionality that gives persistency for fabric
devices not only across boots but also across adapter/device removals.
My idea is to add a flag --persist to "nvme connect" command. This
command will add the created ctrls to a file
(/etc/nvme-fabrics/persistent_ctrls for example).
And I want to add a udev rule that in case of ctrl removal, we'll run a
script that try to periodicly connect to the target.
thoughts ?
On 8/30/2017 12:45 PM, Johannes Thumshirn wrote:
> [+Cc James]
>
> On Wed, Aug 30, 2017 at 12:37:47PM +0300, Sagi Grimberg wrote:
> [...]
>> Something like:
>> --
>> [Unit]
>> Description=NVMf auto discovery service
>> After=systemd-modules-load.service network-online.target
>>
>> [Service]
>> Type=oneshot
>> ExecStart=/usr/bin/nvme connect-all
>> StandardOutput=journal
>>
>> [Install]
>> WantedBy=multi-user.target
>> --
>>
>> Where discovery.conf would have the relevant parameters
>> like:
>> --
>> --traddr=<traddr1> --trsvcid=<trsvcid1>
>> --traddr=<traddr2> --trsvcid=<trsvcid2>
>> --
>>
>> One thing we may want to have is to make sure
>> that nvme relevant modules are loaded at boot time
>> so we may want nvme-cli to either manually load them
>> or the installation would add them to systemd-modules-load.service
>> (i.e. add relevant files to /etc/modules-load.d/)
>>
>> Thoughts?
>
> That's exactly what I wanted to do for SUSE distros as well, so I'm fine with
> it.
>
> James Smart has a bunch of scripts and udev rules for FC-NVMe autoconnecting
> and I asked him earlier today to sumbit them here as well.
Can you share these rules so we can create something generic ?
>
> Byte,
> Johannes
>
Cheers,
Max.
More information about the Linux-nvme
mailing list