Partition does not start on physical sector boundary
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.
Partition does not start on physical sector boundary
Hi,
I know this problem is not related to Linux only, but I'm using Linux on my Laptop for my daily work as web developer. I got this following message from fdisk -l command.
Code:
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 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
Disk identifier: 0x0fded070
Device Boot Start End Blocks Id System
/dev/sda1 2048 20973567 10485760 1c Hidden W95 FAT32 (LBA)
/dev/sda2 * 20973568 216285183 97655808 83 Linux
/dev/sda3 216285184 220190719 1952768 82 Linux swap / Solaris
/dev/sda4 220190781 976771071 378290145+ 5 Extended
Partition 4 does not start on physical sector boundary.
/dev/sda5 220190783 610811194 195310206 83 Linux
Partition 5 does not start on physical sector boundary.
/dev/sda6 610811904 727998463 58593280 83 Linux
/dev/sda7 728000512 976771071 124385280 83 Linux
I found some similar discussions about this on the internet, but the answer is quite various. How to troubleshoot the problem? How to maximize my hard disk partition above? Or should I just ignore this?
Hey... Thank you for your reply. Yes, I have no problem about it so far, but I just feel annoyed because that warning means there is something wrong.
I found one thread on this forum which mention about parted --align optimal command. Is it safe to run the command?
I'm just guessing here, but I suspect that the warning dates back to the days of filing systems which were far more primitive than anything we have today and it survives just in case someone needs it.
Your harddisk has a physical sector size of 4096 bytes, but the logical sector size is 512 bytes. This is with new disks a quite common setup. To properly align partitions the start sector of a partition should be dividable by 8 (since 4096/512=8). If that is not the case you might see a performance impact, but other problems shouldn't occur.
If you want to fix that is up to you, but it is nothing really pressing, so you can easily delay fixing this to the next time you re-install the system or re-partition the disk.
The impact on read performance is negligible. The impace on write performance is severe, a factor of 10 or worse, because every time the kernel writes a 4K block (the usual filesystem block size) that block will span 2 physical sectors, forcing the drive to perform two read-modify-write cycles.
The extended partition itself (partition 4) is not an issue. The only data affected is a secondary partition table that is read just once when the drive is scanned and almost never written. The misaligned logical drive (partition 5) will hurt performance when you write to it.
Your harddisk has a physical sector size of 4096 bytes, but the logical sector size is 512 bytes. This is with new disks a quite common setup. To properly align partitions the start sector of a partition should be dividable by 8 (since 4096/512=8). If that is not the case you might see a performance impact, but other problems shouldn't occur.
If you want to fix that is up to you, but it is nothing really pressing, so you can easily delay fixing this to the next time you re-install the system or re-partition the disk.
So should OP start sda5 at 220190776 since it can be divided by 8?
The impact on read performance is negligible. The impace on write performance is severe, a factor of 10 or worse, because every time the kernel writes a 4K block (the usual filesystem block size) that block will span 2 physical sectors, forcing the drive to perform two read-modify-write cycles.
The extended partition itself (partition 4) is not an issue. The only data affected is a secondary partition table that is read just once when the drive is scanned and almost never written. The misaligned logical drive (partition 5) will hurt performance when you write to it.
The partition 5 is used as my /home so the write process is quite often. When talking about performance, is there any tools to measure my hard disk performance?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.