Linda Walsh <suse@tlinx.org> wrote:
Greg Freemyer wrote:
It is time for you to enter the 21st century in respects to disk
geometry. ---- Greg, stop showing your ignorance.
Ignorant of disk drive tech? Me? I'm open to learn, so let's see where we end up.
The LBA still corresponds to CHS *internally* -- just that the nums are internal to each HD.
My statement, which I stand by, is that the CHS value returned by the drive is meaningless in modern rotating drives. Obviously drives still have cylinders, heads, and sectors, they just don't try to relate that geometry via the CHS info that was so important prior to 1995 or so. Further, I state that the S value for sectors per track is not constant for the entire drive. You say there are lots of zones. I'm open to the idea that there are lot of values for S, depending where on the disk you are. Ignoring any zoning effects: Ie. S = int( (PI * D) / L) Where D = diameter L = linear length of a sector I'm open to the idea that a disk drive would have the cylinders grouped into zones of fixed S (sectors / track). I state that S and RPMs drive the transfer rate, so that is why you see different rates for different parts of the drive. Ie. Transfer rate = (RPMs / 60) * S * 512 / 1,000,000 = x MB/sec Hdd drives run at a constant rpm, so the reason for the variation in transfer rate is the variation in S from one zone to another. So for a drive spinning at 7200 rpm and transferring 120 MB/sec for the outer cylinders, that is about 2000 sectors/track.
For at least the last decade the linear density of sectors is
typically constant over the whole platter. Since you know circumference of a circle is PI * D, a track 3 inches from the center holds 3x the sectors as one 1 inch from the center. That means number of sectors per track isn't even a constant for a modern drive. ---- Wrong. Right!
Modern HD's have been divided into zones for the past 15+years...
Zones == collections of cylinders with the same # of sectors/track? If so, we both agree, but I have no idea why you said "wrong". Anyway that means there is a fixed S (sectors/track) for each zone. How can you know what the zones are and what the sectors per track are for any given zone? Without that info you can't attempt to align your partitions, so I'm still at a loss that you say partitions are aligned to tracks in drives made since 1995 or so.
Modern HD's have almost 1 zone/TB, but you can see a most modern examople at:
I guess you meant GB? If a track has 2000 sectors per the above, and a drive has 4 heads then that's 4 MB per cylinder. Thus 1 GB is 250 cylinders. So I guess your saying a zone has roughly 250 cylinders. I have no feedback about that, but it seems reasonable.
http://media.bestofmicro.com/E/N/362111/original/throughput-diagram-wd4001FA...
Latest 4TB HD... That isn't a smooth curve -- Each notch is a zone.. Across each zone the number of sectors is constant.
Very odd on that graph... notice as some have noted the first 50-100GB are slightly lower than just past the 100GB mark -- for READS... writes seem to be very smooth but likely due to internal disk buffering...
Fyi: both modern windows and linux align to 1MB boundaries with no
concern how that aligns with tracks. ---- Depends on what disk partition tool you use, but I don't know of any that use MB.
Hmmm... I do computer forensics for a living. I see lots of real world drives, but mostly windows. The first partition on most of them starts at sector 63 or 2048. 63 is from partitioning tools that try to align the first partition and believe the lie that the CHS data provides. Windows xp does that. 2048 is what newer computers typically have. They no longer worry about tracks and just align to 1 MB boundaries. Vista and win7 do that. Linux partitioning tools in general got updated a couple years ago to default to MB alignment. My favorite tool for listing partition setups is mmls (it only outputs info since it is a reporting only tool). (Install sleuthkit it you want to use mmls). For my laptop, by chance in Jan I put in a brand new unformatted drive in Jan and then did a full openSUSE 12.2 install. Nothing fancy and I accepted the partition alignment as proposed by the installer:
sudo mmls /dev/sda DOS Partition Table Offset Sector: 0 Units are in 512-byte sectors
Slot Start End Length Description 00: Meta 0000000000 0000000000 0000000001 Primary Table (#0) 01: ----- 0000000000 0000002047 0000002048 Unallocated 02: 00:00 0000002048 0004208639 0004206592 Linux Swap / Solaris x86 (0x82) 03: 00:01 0004208640 0012595199 0008386560 Linux (0x83) 04: ----- 0012595200 0046153727 0033558528 Unallocated 05: 00:02 0046153728 0255866879 0209713152 Linux (0x83) 06: ----- 0255866880 0976773167 0720906288 Unallocated Note that mmls shows not only the allocated partitions, but also the unallocated space between partitions. So the the line starting with 02: is the first partition and you can see it starts at sector 2048. Note that 4208640 and 46153728 are also both multiples of 2048, thus all 3 real partitions are 1 MB aligned. Thus it is clear that whatever default openSUSE partitioner is used during install does 1 MB alignment. Now I happen to have a 1.5 TB external drive hooked up. What does mmls show for it:
sudo mmls /dev/sdb root's password: DOS Partition Table Offset Sector: 0 Units are in 512-byte sectors
Slot Start End Length Description 00: Meta 0000000000 0000000000 0000000001 Primary Table (#0) 01: ----- 0000000000 0000002047 0000002048 Unallocated 02: 00:00 0000002048 2930272255 2930270208 NTFS (0x07) 03: ----- 2930272256 2930277166 0000004911 Unallocated Now that drive was formatted by Seagate at their factory, and guess what, they too start the first partition at 1 MB. The rest of your email I'm going to ignore because it seems to be about how the tools report partitions, not how they create them. If you want me to test any particular partitioner, just ask. That 1.5 TB external is a scratch drive. I can use dd to wipe the partition table and then use whatever tiool you want to create new partitions. I don't know which have been updated to default to 1 MB alignment, but I hope most have by now. Greg
The default display in fdisk:...sd Device Boot Start End Blocks Id System /dev/sdc1 63 25398764 12699351 83 Linux /dev/sdc2 25398765 42009974 8305605 83 Linux /dev/sdc3 * 42009975 44130554 1060290 83 Linux Shows POSIX standard 512 byte sectors.
parted.. Number Start End Size Type File system Flags 1 32.3kB 13.0GB 13.0GB primary xfs type=83 2 13.0GB 21.5GB 8505MB primary xfs type=83 3 21.5GB 22.6GB 1086MB primary xfs boot, type=83 4 22.6GB 146GB 123GB extended type=05 5 22.6GB 31.2GB 8595MB logical linux-swap(v1) type=82 6 31.2GB 47.3GB 16.1GB logical xfs type=83 7 47.3GB 58.0GB 10.7GB logical xfs type=83 8 59.1GB 145GB 85.9GB logical type=83
Hmm....looks like kB is the lowest unit well...nope... (parted) help unit unit UNIT set the default unit to UNIT
UNIT is one of: s, B, kB, MB, GB, TB, compact, cyl, chs, %, kiB, MiB, GiB, TiB default is 'compact'...
As for my other two sd's, they both start at 17.4kB -- that's not a 1MB boundary either... it's actually 34 sectors -- I guess thats a gpt size -- and boot drive is sdc... starting at the 63 sector Looking at the # blocks/partition and dividing by 2*1024*1024 (sectors->MB): fdisk -l /dev/sdc|cut -c41-49|grep -P '^\s*[0-9]+$'|while read secs;do printf "%10d %s\n" "$secs" "$(pcalc "$secs/(2*1024*1024)"|grep -P '= \d')" done 12699351 = 6.05552244186401 8305605 = 3.96042108535767 1060290 = 0.505585670471191 120278655 = 57.3533320426941 8393931 = 4.00253820419312 15735636 = 7.50333595275879 10490413 = 5.00221872329712 83883366 = 39.9987058639526 ----
I would say those are track aligned -- That's a 21st century 15K SAS drive.
MB alignment?... I don't think even windows is that dumb. Track alignment is still an issue -- ask anyone running RAID -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org