Content-Type: multipart/mixed; boundary="===============0365683668430216675==" MIME-Version: 1.0 From: lullajd at yahoo.com Subject: [SPDK] Re: nvme_bdev_add_ns: *ERROR*: Namespaces are not identical. Date: Mon, 22 Nov 2021 07:24:16 +0000 Message-ID: <20211122072416.2813.74276@ml01.vlan13.01.org> In-Reply-To: TYAPR01MB47340B31A41D476FA7719919A29F9@TYAPR01MB4734.jpnprd01.prod.outlook.com List-ID: To: spdk@lists.01.org --===============0365683668430216675== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Shuhei, = Thankyou for responding. What NVMe-oF target are you using? SPDK NVMe-oF tatrget? JL=3D=3D=3D> Its a private target implementation which has been tested thor= oughly with linux kernel based initiator. The failover (when one controller= becomes unavailable) also on this private target implementation works smoo= thly with linux kernel based initiator. = The bdev conf you provided looks good. = We need multiple namespaces to have the same NSID, EUI64, NGUID, and UUID t= o configure shared namespace. = JL=3D=3D=3D=3D=3D> Yes, is there anything I need to put in the bdev conf fi= le to let the check in bdev_nvme_compare_ns() pass ? There seems to some issue with bdev_nvme_compare_ns(). I added some prints to check why this check is returning 0 to its callers nvme_bdev_add_ns nvme_ctrlr_populate_namespace nvme_ctrlr_populate_namespaces nvme_ctrlr_create_done .. .. static bool bdev_nvme_compare_ns(struct spdk_nvme_ns *ns1, struct spdk_nvme_ns *ns2) { const struct spdk_nvme_ns_data *nsdata1, *nsdata2; const struct spdk_uuid *uuid1, *uuid2; nsdata1 =3D spdk_nvme_ns_get_data(ns1); nsdata2 =3D spdk_nvme_ns_get_data(ns2); uuid1 =3D spdk_nvme_ns_get_uuid(ns1); uuid2 =3D spdk_nvme_ns_get_uuid(ns2); if (uuid1 =3D=3D NULL) printf("%s uuid1 is NULL\n", __func__); if (uuid2 =3D=3D NULL) printf("%s uuid2 is NULL\n", __func__); printf("%s (memcmp(nsdata1->nguid, nsdata2->nguid, sizeof(nsdata1->= nguid)) =3D=3D 0):%d\n", __func__, (memcmp(nsdata1->nguid, nsdata2->nguid, sizeof(nsdata1->nguid= )) =3D=3D 0)); printf("%s (nsdata1->eui64 =3D=3D nsdata2->eui64):%d\n", __func__, (nsdata1->eui64 =3D=3D nsdata2->eui64)); unsigned char myexp; myexp =3D memcmp(nsdata1->nguid, nsdata2->nguid, sizeof(nsdata1->ng= uid)) =3D=3D 0 && nsdata1->eui64 =3D=3D nsdata2->eui64 && uuid1 !=3D NULL && uuid2 !=3D NULL && spdk_uuid_compare(uui= d1, uuid2) =3D=3D 0; printf("%s myexp:%d\n", __func__, myexp); return memcmp(nsdata1->nguid, nsdata2->nguid, sizeof(nsdata1->nguid= )) =3D=3D 0 && nsdata1->eui64 =3D=3D nsdata2->eui64 && uuid1 !=3D NULL && uuid2 !=3D NULL && spdk_uuid_compare(uuid= 1, uuid2) =3D=3D 0; } its printing the following: bdev_nvme_compare_ns uuid1 is NULL bdev_nvme_compare_ns uuid2 is NULL bdev_nvme_compare_ns (memcmp(nsdata1->nguid, nsdata2->nguid, sizeof(nsdata1= ->nguid)) =3D=3D 0):1 bdev_nvme_compare_ns (nsdata1->eui64 =3D=3D nsdata2->eui64):1 bdev_nvme_compare_ns myexp:0 [2021-11-22 07:03:58.083035] bdev_nvme.c:2569:nvme_bdev_add_ns: *ERROR*: Na= mespaces are not identical. If you are using SPDK NVMe-oF target, https://review.spdk.io/gerrit/c/spdk/= spdk/+/10197/13 may give you a hint. = Thanks, Shuhei --===============0365683668430216675==--