SCIENTIFIC-LINUX-USERS Archives

July 2011

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Lamar Owen <[log in to unmask]>
Reply To:
Lamar Owen <[log in to unmask]>
Date:
Wed, 27 Jul 2011 10:28:21 -0400
Content-Type:
Text/Plain
Parts/Attachments:
Text/Plain (52 lines)
On Wednesday, July 27, 2011 02:13:40 AM you wrote:
> So you might check to see if the low level format of the WD drive is
> documented, whether its blocks are always the same size, and what that
> size might be. Then make your disk layout to very carefully optimize
> this. Accidents of original design made this a non-issue on the Amiga.
> But it's certainly an issue on most any other OS when working with
> artificial cylinders that are 255*63*512 BYTES in size - no nice even
> divisors in sight.

Seagate has been good to fully document their drives, but in my quick perusal this morning I could not find similar documentation for the Caviar Green drives.  I have a WD15EADS myself, and nothing in the docs I got with the drive had any of the low-level format details.  Now, the EADS drive is documented as not being advanced format, but that may just mean the the actual 4K sectors aren't exposed to the OS, but internally the drive is using 4K sectors anyway, based on the drive's behavior.  The docs I found listed the LBA instead of CHS (which, again thanks to ZBR (zoned bit recording, similar to the CLV (constant linear velocity) design of CD's) is somewhat variable): there are 2,930,277,168 user sectors available on this drive.  With standard 255 heads, 63 sectors per track geometry, this gives 5,103 sectors of 'slack' at the end of the drive.

Think LBA; forget CHS as it's no longer a valid way of doing things, and hasn't been for a long time, really.

Fdisk has a 'sectors' mode; Fedora has been on the newer fdisk that uses this mode by default (2.18) , but EL6 is still using the older one (2.17.2 currently) where it must be specified with the -u command line option.  For an example, using my boot drive on my upstream EL6.1 system (have to find my boot drive first, as it moves around every boot....):

[root@www ~]# mount|grep boot
/dev/sdah1 on /boot type ext4 (rw)
[root@www ~]# fdisk -l /dev/sdah

Disk /dev/sdah: 750.0 GB, 749966721024 bytes
255 heads, 63 sectors/track, 91178 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d65d7

    Device Boot      Start         End      Blocks   Id  System
/dev/sdah1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sdah2              64       91179   731876352   8e  Linux LVM
[root@www ~]# fdisk -ul /dev/sdah

Disk /dev/sdah: 750.0 GB, 749966721024 bytes
255 heads, 63 sectors/track, 91178 cylinders, total 1464778752 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: 0x000d65d7

    Device Boot      Start         End      Blocks   Id  System
/dev/sdah1   *        2048     1026047      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sdah2         1026048  1464778751   731876352   8e  Linux LVM
[root@www ~]# 

If you use fdisk -u, you can see the actual partitioning, in sectors. And note that this was the default upstream EL6.1 partitioning, I did nothing special to get it aligned, it was automatic.  Although I'm not sure it's properly aligned to the chunk size of the particular RAID controller I'm using....

The CHS concept needs to go away for good, really.  LBA is the drive's actual interface, and needs to be used instead. 

For GPT, use parted or gdisk (not sure what repo gdisk is in for EL6, it's not in upstream's base server repo, nor is it in EPEL yet, and those are the only repos I have enabled on my upstream EL6.1 system).  I have to use gdisk on my Fedora  box every time I 'upgrade' Fedora, for some unusual reasons due to the particular bootloader I'm using, and the GPT formatting; this started with Fedora 12 and continues as of F14.  Parted gives the wrong partition type for this bootloader to work, but gdisk allows setting the right partition types.
 

ATOM RSS1 RSS2