Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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- ?
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).
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.