From owner-freebsd-hackers@freebsd.org Sun Dec 6 05:43:03 2020 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 30541472FCD for ; Sun, 6 Dec 2020 05:43:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cpb2G1vxmz3FGG for ; Sun, 6 Dec 2020 05:43:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x734.google.com with SMTP id z188so9644191qke.9 for ; Sat, 05 Dec 2020 21:43:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EATA5x/+nHxeaydfBdxPx0gNCGOhRyLjtfYirtCyNIA=; b=PA0Nhn+gS88iky/KNKqtAsnKWW3RLzHJl0NB3HXsUO28FnUHQlm8B8Ajdfe0w7nrKC o1vN66ARKpV2xP+jCgPE8SCjcINnfAtsoKVlLraXq4dcKwgovCfovx+zJblaTFEQZvRT fPEYKNXRtm7jy7UYNP/A7CBMC1Jrg/e93wK3z5YpimxEeZUTv0eb8VoCQ3HpGyhbvbxJ v/ror/+tI8Bd/tbuuYkOtbxZxEkOmTCxu0qxTpPyzjBrbDb2rl4so6Who4A017JUO6bI uvR7m5CGaDZcTrh+LICQ0pjMLqmTXUHIh9YuQmlsxiYcYc6YPSBwPpACwCH1KXOkxp34 JVsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EATA5x/+nHxeaydfBdxPx0gNCGOhRyLjtfYirtCyNIA=; b=pcKjPJ3QDrOqeLvFrvuIGU6FEzxMx7efaZe+LrzuBbVHpJe8R52GtXFJ3W9F0yctnn oHVTG6lFw2r3wVz38LDkkHg1e8IjG8jJ2aGr2GGt+sdvokhtaKLvP7DKm7tldjGmqYnj /OxvQ97yFlZK1R1G7/C9sr+4QAcD6DUSDnkF37u9K+PYViIzQ2ofFahjhrOdr00lHC3T 4daK44RolPKpCAifMH/Fa0/IrmvqgwJhfQ3ubQusC7R1s6Ykrnh+i6pBA8f1nXpQSYWd 0tWP9fQ74cgVtRYamrNHi//U6+8Zta/pSEwinwkoVVCpbOSjFd4uQutwlb/JvHVqkWS0 9nCw== X-Gm-Message-State: AOAM530xhuy0N6U7Q+XwOY4hf5wnZDX+Rornkkmq6BLWmV7Pk/Ygx/wn beSddZTJIkyWLdAalCllz+eoPPqt7RKVHSGANiSK9w== X-Google-Smtp-Source: ABdhPJwwCJ73/KNdELniLe9H1uQ3h3pxdBt2dD3yu5NGwr9mkiX/fsLKiYBbCzBYorGk7UL124czdKnczKsKO3W5JGU= X-Received: by 2002:a05:620a:88e:: with SMTP id b14mr17917247qka.195.1607233380753; Sat, 05 Dec 2020 21:43:00 -0800 (PST) MIME-Version: 1.0 References: <10a5e607-a852-716a-9872-984e7247996e@yuripv.dev> In-Reply-To: <10a5e607-a852-716a-9872-984e7247996e@yuripv.dev> From: Warner Losh Date: Sat, 5 Dec 2020 22:42:49 -0700 Message-ID: Subject: Re: when to use "/dev/nvme0ns1" To: Yuri Pankov Cc: Krishnamraju Eraparaju , FreeBSD Hackers X-Rspamd-Queue-Id: 4Cpb2G1vxmz3FGG X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=PA0Nhn+g; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::734) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.55 / 15.00]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::734:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.55)[-0.554]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::734:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::734:from]; RCVD_COUNT_TWO(0.00)[2]; FREEMAIL_CC(0.00)[gmail.com,freebsd.org]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 05:43:03 -0000 On Sat, Dec 5, 2020 at 10:36 PM Yuri Pankov wrote: > Krishnamraju Eraparaju wrote: > > Hi All, > > > > > > I see there are two ways of accessing NVMe disk: > > 1)GEOM based: /dev/nvd0 or /dev/nda0 > > 2)/dev/nvme0ns1 > > > > When should one use " /dev/nvme0ns1"? > > See nvmecontrol(8) for the commands that operate on namespace ids. And > while you could still use nvd/nda devices for those, specifying the > namespace explicitly could be helpful. > > An excerpt from man page: > > DEVICE NAMES > Where =E2=9F=A8namespace-id=E2=9F=A9 is required, you can use eithe= r the nvmeXnsY > device, or the disk device such as ndaZ or nvdZ. The leading /dev/ > is omitted. > Yes. nvd* and nda* are block devices. nvme0ns1 is for administrative things when you may or may not have an nda/nvd device hanging around, or you want to deal with a specific thing and don't know the mapping to the nda/nvd device. Warner