* How to setup nvme-loop with multipath
@ 2020-05-03 20:14 Dongli Zhang
2020-05-06 6:30 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Dongli Zhang @ 2020-05-03 20:14 UTC (permalink / raw
To: linux-nvme
Hi nvme developers,
Would you please help confirm if it is feasible to support multi-path (indeed
shared namespace as id->cmic is always set for nvme-over-fabric) for nvme-loop
so that we would be able to have much more complex topology configuration for
nvme multi-path.
Below is my sample json file. While both disk1.img and disk2.img are belong to
'testnqn', disk3.img is belong to 'testnqn2'.
Is there any way to have disk2.img as shared namespace used by both 'testnqn'
and 'testnqn2'?
Thank you very much!
{
"hosts": [
{
"nqn": "hostnqn"
}
],
"ports": [
{
"addr": {
"adrfam": "",
"traddr": "",
"treq": "not specified",
"trsvcid": "",
"trtype": "loop"
},
"portid": 1,
"referrals": [],
"subsystems": [
"testnqn",
"testnqn2"
]
}
],
"subsystems": [
{
"allowed_hosts": [
"hostnqn"
],
"attr": {
"allow_any_host": "0"
},
"namespaces": [
{
"device": {
"nguid": "ef90689c-6c46-d44c-89c1-4067801309a8",
"path": "/home/test/disk1.img"
},
"enable": 1,
"nsid": 1
},
{
"device": {
"nguid": "ef90689c-6c46-d44c-89c1-4067801309a2",
"path": "/home/test/disk2.img"
},
"enable": 1,
"nsid": 2
}
],
"nqn": "testnqn"
},
{
"allowed_hosts": [
"hostnqn"
],
"attr": {
"allow_any_host": "0"
},
"namespaces": [
{
"device": {
"nguid": "ef90689c-6c46-d44c-89c1-4067801309a3",
"path": "/home/test/disk3.img"
},
"enable": 1,
"nsid": 1
}
],
"nqn": "testnqn2"
}
]
}
Dongli Zhang
_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to setup nvme-loop with multipath
2020-05-03 20:14 How to setup nvme-loop with multipath Dongli Zhang
@ 2020-05-06 6:30 ` Christoph Hellwig
2020-05-06 18:14 ` Dongli Zhang
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2020-05-06 6:30 UTC (permalink / raw
To: Dongli Zhang; +Cc: linux-nvme
On Sun, May 03, 2020 at 01:14:25PM -0700, Dongli Zhang wrote:
> Hi nvme developers,
>
> Would you please help confirm if it is feasible to support multi-path (indeed
> shared namespace as id->cmic is always set for nvme-over-fabric) for nvme-loop
> so that we would be able to have much more complex topology configuration for
> nvme multi-path.
>
> Below is my sample json file. While both disk1.img and disk2.img are belong to
> 'testnqn', disk3.img is belong to 'testnqn2'.
>
> Is there any way to have disk2.img as shared namespace used by both 'testnqn'
> and 'testnqn2'?
All the namespace are shared by default. Just run your connect command
line again and you get another path (just use a different traddr to
make sure duplicates aren't sorted out)
This is my simple test connect script:
---
et -e
set +x
HOSTNQN=nqn.2014-08.org.nvmexpress:NVMf:uuid:77dca664-0d3e-4f67-b8b2-04c70e3f991f
NQN=nqn.2014-08.org.nvmexpress:NVMf:uuid:77dca664-0d3e-4f67-b8b2-04c70e3f991d
echo "transport=loop,hostnqn=$HOSTNQN,nqn=$NQN" > /dev/nvme-fabrics
echo "transport=loop,hostnqn=$HOSTNQN,nqn=$NQN,traddr=192.168.7.68" > /dev/nvme-
fabrics
_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to setup nvme-loop with multipath
2020-05-06 6:30 ` Christoph Hellwig
@ 2020-05-06 18:14 ` Dongli Zhang
0 siblings, 0 replies; 3+ messages in thread
From: Dongli Zhang @ 2020-05-06 18:14 UTC (permalink / raw
To: Christoph Hellwig; +Cc: linux-nvme
On 5/5/20 11:30 PM, Christoph Hellwig wrote:
> On Sun, May 03, 2020 at 01:14:25PM -0700, Dongli Zhang wrote:
>> Hi nvme developers,
>>
>> Would you please help confirm if it is feasible to support multi-path (indeed
>> shared namespace as id->cmic is always set for nvme-over-fabric) for nvme-loop
>> so that we would be able to have much more complex topology configuration for
>> nvme multi-path.
>>
>> Below is my sample json file. While both disk1.img and disk2.img are belong to
>> 'testnqn', disk3.img is belong to 'testnqn2'.
>>
>> Is there any way to have disk2.img as shared namespace used by both 'testnqn'
>> and 'testnqn2'?
>
> All the namespace are shared by default. Just run your connect command
> line again and you get another path (just use a different traddr to
> make sure duplicates aren't sorted out)
>
> This is my simple test connect script:
>
> ---
> et -e
> set +x
>
> HOSTNQN=nqn.2014-08.org.nvmexpress:NVMf:uuid:77dca664-0d3e-4f67-b8b2-04c70e3f991f
> NQN=nqn.2014-08.org.nvmexpress:NVMf:uuid:77dca664-0d3e-4f67-b8b2-04c70e3f991d
>
> echo "transport=loop,hostnqn=$HOSTNQN,nqn=$NQN" > /dev/nvme-fabrics
> echo "transport=loop,hostnqn=$HOSTNQN,nqn=$NQN,traddr=192.168.7.68" > /dev/nvme-
> fabrics
>
Thank you very much!
This works for me. As 'traddr' is used, there is just extra requirement to add
below to the default sample loop.json.
"ports": [
{
"addr": {
"adrfam": "ipv4",
"traddr": "10.0.2.15",
"treq": "not specified",
"trsvcid": "",
"trtype": "loop"
},
Thank you very much!
Dongli Zhang
_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-06 18:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-03 20:14 How to setup nvme-loop with multipath Dongli Zhang
2020-05-06 6:30 ` Christoph Hellwig
2020-05-06 18:14 ` Dongli Zhang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.