util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: L A Walsh <lkml@tlinx.org>
Cc: "Dr. David Alan Gilbert" <dave@treblig.org>, util-linux@vger.kernel.org
Subject: Re: does util-linux have a 'report sector size' util?
Date: Tue, 12 Mar 2019 09:21:59 +0100	[thread overview]
Message-ID: <20190312082159.jojrjq7ox3d457ke@ws.net.home> (raw)
In-Reply-To: <5C86D476.6060807@tlinx.org>

On Mon, Mar 11, 2019 at 02:34:46PM -0700, L A Walsh wrote:
> On 3/11/2019 2:21 PM, Dr. David Alan Gilbert wrote:
> > * L A Walsh (lkml@tlinx.org) wrote:
> >> Trying to track down why my 4K drives no longer display 4K
> >> in sysfs (/sys) and don't seem to show individual disk
> >> drive information.  When I first got the drives, linux displayed
> >> the correct physical disk size, but when I look now, I only
> >> see 512.
> >
> > Is this one of the PHY-SEC or LOG-SEC fields that lsblk can print?
> >
> > [dg@major ~]$ lsblk -o "NAME,PHY-SEC,LOG-SEC"
> > NAME                                            PHY-SEC LOG-SEC
> > sda                                                 512     512
> ---
>     It would be, if it was correct.  Megacli displays:
> 
>    Sector Size:  512
>    Logical Sector Size:  512
>    Physical Sector Size:  4096
> 
> But lsblk displays 512 for everything.  The disk says it uses a 512e format
> with the 'e' meaning it emulates 512 even if not 512.

lsblk, fdisk, blockdev, ... but all of the utils read the information
from kernel. So, it depends how the device reports topology to the
kernel.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

  reply	other threads:[~2019-03-12  8:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-11 20:57 does util-linux have a 'report sector size' util? L A Walsh
2019-03-11 21:21 ` Dr. David Alan Gilbert
2019-03-11 21:34   ` L A Walsh
2019-03-12  8:21     ` Karel Zak [this message]
2019-03-12 15:02       ` L A Walsh
2019-03-12 18:11         ` Dr. David Alan Gilbert
2019-03-15 14:05           ` Re:why would 4k size for phys sector size read in kernel, go away? L A Walsh

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=20190312082159.jojrjq7ox3d457ke@ws.net.home \
    --to=kzak@redhat.com \
    --cc=dave@treblig.org \
    --cc=lkml@tlinx.org \
    --cc=util-linux@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).