[Gllug] What are the best practices for Linux partitioning &

Nix nix at esperi.org.uk
Wed Mar 7 16:37:45 UTC 2012


On 7 Mar 2012, t. clarke spake thusly:

> Just out of curiosity:
> If the read-rate on outer tracks is greater than on inner-tracks, this implies
> that the outer tracks have more sectors per track than the innetr tracks.

Quite so. A lot more. Disks are generally divided into a number of zones
with increasingly many sectors-per-track in each (though I'd not be
surprised to find that on modern disks each zone is only a cylinder
large, last I checked they were a few dozen cylinders each.)

> So, I assume therefore that all disc accesses must be done by logical block
> addressing rather than the 'old' way of cylinder/head/sector, with the disc
> firmware 'knowing' how many tracks on each cylinder(group) ?

Yeah. LBA has been the only means of disk access anything actually uses
for a very long time. Modern (by which I mean anything after the early
90s) disk firmware is fairly bright, maintaining a filesystem of sorts
on the disk itself permitting failed sectors to be silently spared out
in favour of one of a quite large pool of replacements with no cost but
access time (well, if the failure is detected at write time rather than
read time the sparing is silent).

The cylinder/head/sector stuff is still maintained for the sake of old
BIOSes and old OSes using those BIOSes but is entirely fictional by now:
IIRC with ATAPI controllers the BIOS translates the c/h/s stuff into LBA
itself (though my memory of this is fuzzy: the controller may still do
the translation).

> With regard to seek time, do discs generally re-position the heads when idle
> to a default position (cyinder 0?)

No way, that would be appallingly inefficient. They must stay where they
were in order to benefit from access locality patterns. (Some drives may
autopark after a period of idle time: pretty much all of them autopark
on powerdown.)

>                                    To that end does LVM defeat that object
> on resizing partitions by having the logical partition spread across
> different areas of the disc?

Well, yes, but it only spreads LVs into multiple chunks if it has no
choice: normally it squeezes LVs into the first available unused space,
but you can require it to find a contiguous block and use that instead,
if you prefer slower-but-consistent access times.

Most LVs are normally contiguous because LVs aren't created and deleted
*that* often. (Nobody has ever written an LV defragmenter, though you
can do it yourself by hand with lots of calls to pvmove.)

> Oh, and is cylinder 0 on the outside or the inside?

Outside: it's fast.

> Personally I have always worked on the basis of several smaller discs being
> better than one big one, thus minimising seek times.

I do the same, but so's I can RAID them and get more reliability as well
as more speed from parallel access :)

-- 
NULL && (void)
--
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list