From: Jirong Feng <jirong.feng@easystack.cn>
To: Sagi Grimberg <sagi@grimberg.me>, Christoph Hellwig <hch@lst.de>,
Keith Busch <kbusch@kernel.org>
Cc: Jens Axboe <axboe@fb.com>,
linux-nvme@lists.infradead.org, peng.xiao@easystack.cn
Subject: Re: Should NVME_SC_INVALID_NS be translated to BLK_STS_IOERR instead of BLK_STS_NOTSUPP so that multipath(both native and dm) can failover on the failure?
Date: Tue, 26 Dec 2023 21:27:59 +0800 [thread overview]
Message-ID: <dda859d1-41f5-423c-a9e2-900a1573c3a9@easystack.cn> (raw)
In-Reply-To: <b8cd8de7-9167-4b8f-b255-c022376a7c9d@easystack.cn>
I've tested the patch basing on kernel version 6.6.0. It seems not
working...
here's my steps & results:
1. create a VM and make & install kernel from source applying the patch.
[root@fjr-nvmet-1 ~]# uname -r
6.6.0-mytest+
2. clone that VM.
3. create a shared volume and attach to the both VMs.
4. config nvmet as below:
VM1:
o- /
.........................................................................................................................
[...]
o- hosts
...................................................................................................................
[...]
o- ports
...................................................................................................................
[...]
| o- 1 ................................................ [trtype=tcp,
traddr=192.168.111.99, trsvcid=4420, inline_data_size=262144]
| o- ana_groups
..........................................................................................................
[...]
| | o- 1
.....................................................................................................
[state=optimized]
| o- referrals
...........................................................................................................
[...]
| o- subsystems
..........................................................................................................
[...]
| o-
nqn.2014-08.org.nvmexpress:NVMf:uuid:cf4bb93c-949f-4532-a5c1-b8bd267a4e06
......................................... [...]
o- subsystems
..............................................................................................................
[...]
o-
nqn.2014-08.org.nvmexpress:NVMf:uuid:cf4bb93c-949f-4532-a5c1-b8bd267a4e06
[version=1.3, allow_any=1, serial=308df2776344fdd17cba]
o- allowed_hosts
.......................................................................................................
[...]
o- namespaces
..........................................................................................................
[...]
o- 1 .......................................... [path=/dev/vdc,
uuid=cf4bb93c-949f-4532-a5c1-b8bd267a4e06, grpid=1, enabled]
VM2:
o- /
.........................................................................................................................
[...]
o- hosts
...................................................................................................................
[...]
o- ports
...................................................................................................................
[...]
| o- 1 ............................................... [trtype=tcp,
traddr=192.168.111.111, trsvcid=4420, inline_data_size=262144]
| o- ana_groups
..........................................................................................................
[...]
| | o- 1
.....................................................................................................
[state=optimized]
| o- referrals
...........................................................................................................
[...]
| o- subsystems
..........................................................................................................
[...]
| o-
nqn.2014-08.org.nvmexpress:NVMf:uuid:cf4bb93c-949f-4532-a5c1-b8bd267a4e06
......................................... [...]
o- subsystems
..............................................................................................................
[...]
o-
nqn.2014-08.org.nvmexpress:NVMf:uuid:cf4bb93c-949f-4532-a5c1-b8bd267a4e06
[version=1.3, allow_any=1, serial=0dcf77d36826000cc5a0]
o- allowed_hosts
.......................................................................................................
[...]
o- namespaces
..........................................................................................................
[...]
o- 1 .......................................... [path=/dev/vdc,
uuid=cf4bb93c-949f-4532-a5c1-b8bd267a4e06, grpid=1, enabled]
5. create a host vm(CentOS 8.1, kernel version
4.18.0-147.3.1.el8_1.aarch64), config dm multipath
[root@fjr-vm1 ~]# cat /etc/multipath/conf.d/nvme.conf
devices {
device {
vendor "NVME"
product "Linux"
path_selector "round-robin 0"
path_grouping_policy failover
uid_attribute ID_SERIAL
prio "ANA"
path_checker "none"
#rr_min_io 100
#rr_min_io_rq "1"
#fast_io_fail_tmo 15
#dev_loss_tmo 600
#rr_weight uniform
rr_weight priorities
failback immediate
no_path_retry queue
}
}
6. connect nvme on host, finally it looks like:
[root@fjr-vm1 ~]# nvme list
Node SN Model Namespace
Usage Format FW Rev
---------------- --------------------
---------------------------------------- ---------
-------------------------- ---------------- --------
/dev/nvme0n1 0dcf77d36826000cc5a0
Linux 1 107.37 GB / 107.37
GB 512 B + 0 B 6.6.0-my
/dev/nvme1n1 308df2776344fdd17cba
Linux 1 107.37 GB / 107.37
GB 512 B + 0 B 6.6.0-my
[root@fjr-vm1 ~]# nvme list-subsys
nvme-subsys0 -
NQN=nqn.2014-08.org.nvmexpress:NVMf:uuid:cf4bb93c-949f-4532-a5c1-b8bd267a4e06
\
+- nvme0 tcp traddr=192.168.111.111 trsvcid=4420 live
+- nvme1 tcp traddr=192.168.111.99 trsvcid=4420 live
[root@fjr-vm1 ~]# multipath -ll
mpatha (Linux_0dcf77d36826000cc5a0) dm-0 NVME,Linux
size=100G features='1 queue_if_no_path' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| `- 1:1:1:1 nvme1n1 259:1 active ready running
`-+- policy='round-robin 0' prio=50 status=enabled
`- 0:1:1:1 nvme0n1 259:0 active ready running
7. execute fio on host, and disable namespace on the vm corresponding to
nvme1, the same error goes again:
fio: io_u error on file /dev/dm-0: Operation not supported: write
offset=14734594048, buflen=4096
fio: io_u error on file /dev/dm-0: Operation not supported: write
offset=106607394816, buflen=4096
fio: pid=16076, err=95/file:io_u.c:1747, func=io_u error,
error=Operation not supported
next prev parent reply other threads:[~2023-12-26 13:28 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-04 7:58 Should NVME_SC_INVALID_NS be translated to BLK_STS_IOERR instead of BLK_STS_NOTSUPP so that multipath(both native and dm) can failover on the failure? Jirong Feng
2023-12-04 8:47 ` Sagi Grimberg
2023-12-05 3:54 ` Jirong Feng
2023-12-05 4:37 ` Keith Busch
2023-12-05 4:40 ` Christoph Hellwig
2023-12-05 5:18 ` Keith Busch
2023-12-05 7:06 ` Jirong Feng
2023-12-05 8:50 ` Sagi Grimberg
2023-12-25 11:25 ` Jirong Feng
2023-12-25 11:40 ` Sagi Grimberg
2023-12-25 12:14 ` Jirong Feng
2023-12-26 13:27 ` Jirong Feng [this message]
2024-01-01 9:51 ` Sagi Grimberg
2024-01-02 10:33 ` Jirong Feng
2024-01-02 12:46 ` Sagi Grimberg
2024-01-03 10:24 ` Jirong Feng
2024-01-04 11:56 ` Sagi Grimberg
2024-01-30 9:36 ` Jirong Feng
2024-01-30 11:29 ` Sagi Grimberg
2024-01-31 6:25 ` Christoph Hellwig
2024-03-20 3:17 ` Jirong Feng
2024-03-20 8:51 ` Sagi Grimberg
2024-03-21 3:06 ` Jirong Feng
2024-04-07 22:28 ` Sagi Grimberg
2024-04-12 7:52 ` Jirong Feng
2024-04-12 8:57 ` Sagi Grimberg
2024-04-22 9:47 ` Sagi Grimberg
2024-04-23 3:15 ` Jirong Feng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dda859d1-41f5-423c-a9e2-900a1573c3a9@easystack.cn \
--to=jirong.feng@easystack.cn \
--cc=axboe@fb.com \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=peng.xiao@easystack.cn \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox