LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-08-2017, 08:24 AM   #1
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,309
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
Finding true physical sector size of attached storage


I've tried the following to find out the true physical sector size attached storage. However, though it mostly says 512B, I wonder about that. I've read that many devices really use 4kB or 8kB these days while still reporting only 512B. Where can I verify that?

But my actual question is what is the true physical sector size of the device being examined below?

Code:
# f3probe --destructive --time-ops /dev/sda
F3 probe 6.0
[...]
Good news: The device `/dev/sda' is the real thing

Device geometry:
                 *Usable* size: 14.32 GB (30031250 blocks)
                Announced size: 14.32 GB (30031250 blocks)
                        Module: 16.00 GB (2^34 Bytes)
        Approximate cache size: 0.00 Byte (0 blocks), need-reset=no
           Physical block size: 512.00 Byte (2^9 Bytes)

Probe time: 4'16"
 Operation: total time / count = avg time
      Read: 666.5ms / 4814 = 138us
     Write: 4'11" / 4192321 = 59us
     Reset: 215.7ms / 1 = 215.7ms


# parted /dev/sda print
Error: /dev/sda: unrecognised disk label
Model: SanDisk Ultra Fit (scsi)                                           
Disk /dev/sda: 15,4GB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags: 


# fdisk -l /dev/sda
Disk /dev/sda: 14,3 GiB, 15376000000 bytes, 30031250 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


# blockdev --getbsz /dev/sda
1024

# cat /sys/block/sda/queue/hw_sector_size 
512


# lsblk -o NAME,PHY-sec /dev/sda
NAME PHY-SEC
sda      512


# hdparm -I /dev/sda | grep -i physical
SG_IO: bad/missing sense data, sb[]:  f0 00 05 00 00 00 00 14 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
        Logical/Physical Sector size:           512 bytes


# lshw
[...]
           *-disk
                description: SCSI Disk
                product: Ultra Fit
                vendor: SanDisk
                phyical id: 0.0.0
                bus info: scsi@0:0.0.0
                logical name: /dev/sda
                version: 1.00
                serial: xxxxxxxxxxxxxxxxxxxx
                size: 14GiB (15GB)
                capabilities: removable
                configuration: ansiversion=6 logicalsectorsize=512 sectorsize=512
[...]
 
Old 07-08-2017, 08:53 AM   #2
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
The true physical sector size is 512 bytes:

Quote:
Sector size (logical/physical): 512 bytes / 512 bytes
If it were an Advanced Format disk emulating a 512 byte sector size, then that would read 512 / 4096.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Partition does not start on physical sector boundary bogeyman2007 Linux - Hardware 9 07-06-2015 07:13 PM
[SOLVED] fdisk shows logical sector size smaller than physical sector size? enine Slackware - Installation 5 09-03-2014 11:57 AM
Fdisk shows logical sector size smaller than physical sector size after clonezilla narnie Linux - Hardware 12 07-03-2013 09:01 PM
Partition X does not start on physical sector boundary. berkov Linux - Newbie 5 04-17-2013 08:46 AM
WD20EARS - smartctl is reporting 4K physical sector size ^^ Orangutanklaus Linux - Hardware 3 09-19-2011 09:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration