Re: does util-linux have a 'report sector size' util?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* L A Walsh (lkml@xxxxxxxxx) wrote:
> On 3/12/2019 1:21 AM, Karel Zak wrote:
> > 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@xxxxxxxxx) 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.
> >   
> Well, that's what I would think but I can't see why the device driver
> would have been purposely changed to hide the actual physical size or
> the temperature.  That said, megacli has to be reading those values
> from somewhere -- and I'd tend to think it was accessing the driver as
> well, but that begs the question -- where is it getting the temperature
> and physical size from>?
> 
> It can even read the serial numbers off the disks.

I think that's an easy one :-)

> I'm not sure if it is opensource or not.
> *sigh*

megacli is a special for LSI RAID controllers isn't it?
If so, then perhaps the RAID controller is hiding some info depending
on how it's configured and using a special to get the info from the controller.

How about trying one of the SCSI utils, like sginfo -a ?

Dave



> 
> >     Karel
> >
> >   
> 
-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux