LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-22-2022, 04:55 AM   #1
oldstuffer
LQ Newbie
 
Registered: Aug 2020
Posts: 14

Rep: Reputation: Disabled
How important is 'sector size' in my situation?


Hi,

Situation:
I have a HP6710b laptop (32-bit) running Linux Mint Mate 19.3 (with all updates) and having (only) the harddisk
inside: Seagate Barracuda ST1000LM048, size 1TB, 2.5" drive. Serial number WKP*****.
Date of manufacture: before 22may2020 (country I cannot see from my notes) (date of buying it).

As this drive after nearly 2 years of use started to signal 'bad sectors' (108 at this moment), I
bought a new Seagate of the same size and type. Serial number of this one: WKP*****.
Date of manufacture: 31oct2021, China.
Serials are different, I don't know it is safe to mention these.

I connected the new disk to my laptop, after mounting the disk in an usb-enclosure with own powersupply.
Connection is by usb-cable/socket, I guess these will be usb-2 (due to age of laptop and enclosure).
Using the Gparted program in Linux Mint of the old harddisk, I partioned the new harddisk exactly the same as the old one is (to be seen with 'sudo fdisk -l', and formatted its partitions to 'ext4' (as the old one).

With both disks connected to the laptop (one build-in, one as an usb-disk): when I do 'sudo fdisk -l" I get a strange difference looking at 'sectors':

xxx---xxx

the output:

Disk /dev/sda: 931,5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xe4a649ac

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 61441501 61439454 29,3G 83 Linux
/dev/sda2 61442048 471042047 409600000 195,3G 83 Linux
/dev/sda3 471042048 1935362047 1464320000 698,2G 83 Linux
/dev/sda4 1935362048 1943554047 8192000 3,9G 82 Linux swap / Solaris


Disk /dev/sdb: 931,5 GiB, 1000204886016 bytes, 1953525168 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
Disklabel type: dos
Disk identifier: 0xe4a649ac

Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 61441501 61439454 29,3G 83 Linux
/dev/sdb2 61442048 471042047 409600000 195,3G 83 Linux
/dev/sdb3 471042048 1935362047 1464320000 698,2G 83 Linux
/dev/sdb4 1935362048 1943554047 8192000 3,9G 82 Linux swap / Solaris

xxx---xxx

As you see, the physical sector size of the old disk (sda in my setup) is 4096 bytes, the I/O sizes are 4096 and 4096 bytes too;
but on the new disk (sdb) the physical sector size is 512 bytes, and I/O too...
I happen to remember, 4096 bytes for the sector size was 'newer' and/or 'better'...

My question: should I return the new disk to the seller (local computershop) or can the difference be neglected as it means nothing to performance or otherwise -for me as a user- ?

Thank you for reading/answering.
 
Old 01-22-2022, 09:11 AM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,780

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
The new disk is fine. All your partitions are properly aligned for the larger sector size, and that is the only potential issue. Almost all new HDDs have the larger sector size, most (like this one) with 512-byte emulation for OSs that require that.

Linux does almost all disk I/O in 4096-byte blocks anyway. It's important that those I/O blocks be properly aligned with the disk's physical sectors, which is why the partitions need to be aligned on 512-byte logical sector numbers that are a multiple of 8 (as yours are).

Last edited by rknichols; 01-22-2022 at 09:16 AM.
 
Old 01-22-2022, 11:24 AM   #3
oldstuffer
LQ Newbie
 
Registered: Aug 2020
Posts: 14

Original Poster
Rep: Reputation: Disabled
Thank you for your reply!

"The new disk is fine. All your partitions are properly aligned for the larger sector size"

You are aware, sda is the old, decaying drive, and sdb is the fresh new one?

oldstuffer
 
Old 01-22-2022, 02:30 PM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,780

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by oldstuffer View Post
You are aware, sda is the old, decaying drive, and sdb is the fresh new one?
I was indeed thinking the other way around, but you're still fine. If those drives are both model ST1000LM048, then perhaps the bridge chip in the USB enclosure is making the drive appear to have a 512-byte sector and I/O size, and the 4K sector size will magically appear when the drive is actually installed. I just can't think of any other reason that a newer drive of the same model would have reverted to 512-byte physical sectors.
 
  


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
[SOLVED] Old situation and New situation bkumar82 Linux - Newbie 2 01-28-2019 01:08 AM
[SOLVED] smart detects sector errors, but does not show which sector? LBM Linux - Hardware 11 06-04-2018 04:52 AM
[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
[SOLVED] How can I make 512byte/sector format on 4KiB/sector drive? delorean-bf Linux - General 14 11-20-2012 09:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 09:51 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