Gentoo Archives: gentoo-user

From: Willie Wong <wwong@××××××××××××××.EDU>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] 1-Terabyte drives - 4K sector sizes? -> bar performance so far
Date: Tue, 09 Feb 2010 03:03:35
Message-Id: 20100209022039.GA26222@math.princeton.edu
In Reply to: Re: [gentoo-user] 1-Terabyte drives - 4K sector sizes? -> bar performance so far by Frank Steinmetzger
1 On Tue, Feb 09, 2010 at 01:05:11AM +0100, Frank Steinmetzger wrote:
2 > Am Sonntag, 7. Februar 2010 schrieb Mark Knecht:
3 >
4 > > Hi Willie,
5 > > OK - it turns out if I start fdisk using the -u option it show me
6 > > sector numbers. Looking at the original partition put on just using
7 > > default values it had the starting sector was 63
8 >
9 > Same here.
10 >
11 > > - probably about the worst value it could be.
12 >
13 > Hm.... what about those first 62 sectors?
14
15 It is possible you can use some of those; I never tried. That's a
16 negligible amount of space on modern harddrives anyway. And actually,
17 starting on sector number 63 means that you are skipping 63 sectors,
18 not 62, since LBA numbering starts with 0.
19
20 Historically there is a reason for all drives coming with default
21 formatting with the first partition at section 63. Sector 0 is the
22 MBR, which you shouldn't overwrite. MSDOS and all Windows up to XP
23 requires the partitions be aligned on Cylinder boundary. So it is
24 safest to just partition the drive, by default, such that the first
25 partition starts at LBA 63, or the 64th sector, or the first sector of
26 the second cylinder.
27
28 Actually, this is why Western Digital et al are releasing this flood
29 of 4K physical sector discs now. Windows XP has been EOLed and Vista
30 and up supports partitioning not on cylinder boundary. If Windows XP
31 still had support, this order of magnitude inefficiency wouldn't have
32 been overlooked by most consumers.
33
34 > I bought this 500GB drive for my laptop recently and did a fresh partitioning
35 > scheme on it, and then rsynced the filesystems of the old, smaller drive onto
36 > it. The first two partitions are ntfs, but I believe they also use cluster
37 > sizes of 4k by default. So technically I could repartition everything and
38 > then restore the contents from my backup drive.
39
40 Are you sharing the harddrive with a Windows operating system?
41 Especially Windows XP? There are reports that Windows XP supports
42 partitioning not aligned to cylinder boundary. However, if you are
43 dual booting you will almost surely be fscked if you try that. I had
44 some fun earlier last year when I did everything else right but
45 couldn't figure out why my laptop tells me it cannot find the
46 operating system when I tried to dual boot.
47
48 > Though the result justifies your decision, I would have though one has to
49 > start at 65, unless the disk starts counting its sectors at 0.
50
51 I've always assumed by default that computer programmers starts
52 counting at 0. Mathematicians, on the other hand, varies: analysts
53 start at 0 or minus infinity; number theorists at 1; algebraists at 1
54 for groups but 0 for rings; and logicians start counting at the empty
55 set. :)
56
57 Cheers,
58
59 W
60 --
61 Willie W. Wong wwong@××××××××××××××.edu
62 Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire
63 et vice versa ~~~ I. Newton