LinuxQuestions.org
Visit Jeremy's Blog.
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 07-03-2015, 08:37 AM   #1
bogeyman2007
Member
 
Registered: Jul 2015
Distribution: Arch, Mint, Slackware, Tiny Core
Posts: 31

Rep: Reputation: Disabled
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?
 
Old 07-03-2015, 08:41 AM   #2
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,473

Rep: Reputation: Disabled
Personally I ignore it.

(I've not had any problems.)
 
Old 07-03-2015, 08:48 AM   #3
bogeyman2007
Member
 
Registered: Jul 2015
Distribution: Arch, Mint, Slackware, Tiny Core
Posts: 31

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by fatmac View Post
Personally I ignore it.

(I've not had any problems.)
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?
 
Old 07-03-2015, 10:32 AM   #4
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,135

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
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.

The man page of my (old) version says alignment "avoids performance degradation" but the on-line documentation doesn't mention that:
https://www.gnu.org/software/parted/manual/parted.html
 
Old 07-03-2015, 11:26 AM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
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.
 
Old 07-03-2015, 02:14 PM   #6
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,774

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
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.
 
Old 07-04-2015, 01:16 AM   #7
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Quote:
Originally Posted by TobiSGD View Post
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?
 
Old 07-04-2015, 01:43 AM   #8
bogeyman2007
Member
 
Registered: Jul 2015
Distribution: Arch, Mint, Slackware, Tiny Core
Posts: 31

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rknichols View Post
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?
 
Old 07-04-2015, 10:40 AM   #9
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,774

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Quote:
Originally Posted by bogeyman2007 View Post
When talking about performance, is there any tools to measure my hard disk performance?
bonnie++. There is probably a package available for your Linux distro.
 
Old 07-06-2015, 07:13 PM   #10
bogeyman2007
Member
 
Registered: Jul 2015
Distribution: Arch, Mint, Slackware, Tiny Core
Posts: 31

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rknichols View Post
bonnie++. There is probably a package available for your Linux distro.
Thank you. I'll try it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 2 does not start on the physical sector boundary icebamm Linux - Newbie 1 06-03-2015 04:01 AM
[SOLVED] Partition 2 does not start on physical sector boundary czezz Linux - General 4 01-29-2014 09:44 AM
Partition 1 does not start on physical sector boundary. mshlinux Fedora 9 11-16-2013 10:51 PM
Partition X does not start on physical sector boundary. berkov Linux - Newbie 5 04-17-2013 08:46 AM

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

All times are GMT -5. The time now is 05:30 AM.

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