LinuxQuestions.org
Review your favorite Linux distribution.
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 07-27-2010, 12:16 PM   #1
MheAd
Member
 
Registered: Jun 2007
Distribution: Ubuntu 14.04
Posts: 186

Rep: Reputation: 36
Aligning partitions on "advanced format" WD hard disks.


Hi guys,
I'm aware that this has been already discussed around here (thread: http://www.linuxquestions.org/questi...drives-792046/ ) but it didn't give quite final answers on the subject + the fact that I've read a bunch of different stuff on other places which even makes me more confused.

Supposedly, the recent versions of fdisk on Fedora 13 and Ubuntu 10.04 are supposed automatically to solve these things around 4k sector aligment thing if one starts fdisk with -u and -c flags. But I'm getting confused as the heads / sectors informations always differ every time I create a partition.

Here's an example.
I have WD Green 1.5TB disk. I want 2 partitions. sdb1 with 1.3TB and sdb2 with the remaining space. Here's how it looks like.

When I create the first partition (1.3TB one), I get following listing with fdisk:

Code:
# fdisk -lu /dev/sdb 

Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes
78 heads, 37 sectors/track, 1015342 cylinders, total 2930277168 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
Disk identifier: 0x000e5602

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048  2726299647  1363148800   83  Linux
Then I create the second, sdb2 partition with the remaining space on the disc.

After that, all of the sudden, I get the following info:
Code:
# fdisk -lu /dev/sdb

Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 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
Disk identifier: 0x000e5602

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048  2726299647  1363148800   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sdb2      2726299648  2930277167   101988760   83  Linux
Partition 2 does not end on cylinder boundary.
Please note that number of heads and sectors / track changed to 255 / 63 + the fact that the program is complaining about the cylinder boundary. What's the deal? This is very frustrating!

Thanks in advance!

Last edited by MheAd; 07-27-2010 at 12:18 PM.
 
Old 07-27-2010, 12:47 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,289

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
If you're being picky, make friends with another disk formatting program - fdisk is not picky.

That said, there's actually 2 heads, many more sectors per track etc. The thing is that the first disks were 10MB, and that was huge - nobody could ever fill that in the life of a pc (or a hard disk :-). So they wrote a standard that allowed, iirc, 1023 tracks, 16 heads, and 63 sectors per track, which allowed 512MB of a hard disk. That was the limit in the nineties, and they've been bodging that ever since: LBA took us to 2 Gigs, CHS took us a bit further and the latest I have lost interest in. Depending on whether you read the same information under one of these bodges, you get different information.And everything is backwards compatible.

Ignore the heads, and the track not ending on a cylinder boundary. Ignore 63 sectors, and the number of tracks - they're all lies. What to doo is count the cylinders, and make a partition as an appropriate number of them. fdisk and other partitioning tools let you do it that way. Then don't listen to them.
 
Old 07-27-2010, 12:55 PM   #3
MheAd
Member
 
Registered: Jun 2007
Distribution: Ubuntu 14.04
Posts: 186

Original Poster
Rep: Reputation: 36
Ok, so basically you are saying the results I posted are "okay" and I'm ready to go?

Quote:
Originally Posted by business_kid View Post
If you're being picky, make friends with another disk formatting program - fdisk is not picky.

That said, there's actually 2 heads, many more sectors per track etc. The thing is that the first disks were 10MB, and that was huge - nobody could ever fill that in the life of a pc (or a hard disk :-). So they wrote a standard that allowed, iirc, 1023 tracks, 16 heads, and 63 sectors per track, which allowed 512MB of a hard disk. That was the limit in the nineties, and they've been bodging that ever since: LBA took us to 2 Gigs, CHS took us a bit further and the latest I have lost interest in. Depending on whether you read the same information under one of these bodges, you get different information.And everything is backwards compatible.

Ignore the heads, and the track not ending on a cylinder boundary. Ignore 63 sectors, and the number of tracks - they're all lies. What to doo is count the cylinders, and make a partition as an appropriate number of them. fdisk and other partitioning tools let you do it that way. Then don't listen to them.
 
Old 07-28-2010, 03:09 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,289

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
If you're satisfied with the size of your partitions, yes. They will work. Whether they could be improved is a moot point. It doeasn't seem to matter.
 
  


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
Advice on Western Digital "Advanced Format" hard drives under linux telemeister Linux - Hardware 5 03-02-2010 12:18 AM
SATA 250GB & "No hard disks found" DaveWat SUSE / openSUSE 11 05-11-2006 05:52 PM
"No hard disks were found" during SLES 8 install hello321_1999 Linux - Hardware 2 08-02-2005 01:16 PM
FC4: unused hard disks "spin-up" every half an hour linuxproactive Fedora 2 07-26-2005 02:31 PM

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

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