How to setup nvme-loop with multipath
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
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
Quoted 7 lines · Dongli Zhang
Hi nvme developers,
Would you please help confirm if it is feasible to support multi-path (indeed shared namespace as
id->cmicis 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.
Quoted 5 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
Quoted 24 lines · Christoph Hellwig
Quoted 7 lines · Dongli Zhang
Hi nvme developers,
Would you please help confirm if it is feasible to support multi-path (indeed shared namespace as
id->cmicis 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.Quoted 5 lines
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
Quoted 7 lines
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-fabricsecho "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
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme