Does centos support advanced format disk ?

General support questions including new installations
Post Reply
habernir
Posts: 12
Joined: 2008/10/02 13:39:11

Does centos support advanced format disk ?

Post by habernir » 2010/04/23 11:43:38

hi all i have a hard disk from WD and the name of model is WD10EARS

i just want to know if centos support it.

thanks a ahead , nir.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Does centos support advanced format disk ?

Post by pschaff » 2010/04/23 12:33:52

Are you asking if CentOS supports the (unspecified) current format of the disk, or if CentOS can partition and format the disk?

If the former then please show the results of running "./getinfo.sh disk" as described in [url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=25128&forum=47]How to provide information about your system[/url] with the disk connected.

If the latter, then try using fdisk to partition and mkfs.ext3 to format and see if it works.

habernir
Posts: 12
Joined: 2008/10/02 13:39:11

Re: Does centos support advanced format disk ?

Post by habernir » 2010/04/23 14:22:57

i ask if centos not only it can partition and format this disk .
but if it can work with 4k sector drivers
because all the linux OS that isee (include fedora 12) can't work with this driver normaly because the performance of the disk is lost when you use it .

pjwelsh
Posts: 2632
Joined: 2007/01/07 02:18:02
Location: Central IL USA

Re: Does centos support advanced format disk ?

Post by pjwelsh » 2010/04/23 15:01:50

A quick google'n of "4k sector centos" yields a comment of:
http://centos.org/modules/newbb/viewtopic.php?topic_id=24055&forum=37
and an issue of:
http://lists.centos.org/pipermail/centos-virt/2010-March/001701.html
Seems to be some possible "alignment" issues in general. Let us know what else you find, please.

gulikoza
Posts: 188
Joined: 2007/05/06 20:15:23

Re: Does centos support advanced format disk ?

Post by gulikoza » 2010/04/23 20:32:22

I have quite a few machines with advanced format disks. They indeed work a lot slower when not correctly formatted (raid sync works like 3 time slower). Maybe parted already aligns the partitions, but fdisk (which I mostly use) does not. While fdisk allows creating partitions on a specific sector, a bug will prevent creating partitions above 2^31 sectors plus it will nag about partitions not be cylinder aligned.
The solution is simple with a help of some math:
1. start every primary partition on a mod8 + 1 cylinder (1, 9, 17...)
2. end every primary partition (except the one before the extended p. which should end on mod8 + 1) on mod8 cylinder (32, 64...)
3. start extended partition and first logical drive on mod8 + 2 and end it (the logical p.) on mod8 +1 cylinder (ext. p. should obviously go to the end of the drive)
4. all other logical drives should start on mod8 +2 and end on mod8 +1 (this is because logical drives start 1 track inside the cylinder)
5. switch to sector view and fix first partition (move it to sector 1024 or 2048 or whatever windows does)
6. type p and confirm every partition starts on mod8 sector

That's it, all partitions perfectly aligned, no free space and full speed :-)

here's an example:
[code]
/dev/sda1 1 32 256528 fd Linux raid autodetect
/dev/sda2 33 4129 32909152+ fd Linux raid autodetect
/dev/sda3 4130 182401 1431969840 5 Extended
/dev/sda5 4130 18209 113097568+ fd Linux raid autodetect
/dev/sda6 18210 24609 51407968+ fd Linux raid autodetect
/dev/sda7 24610 26657 16450528+ fd Linux raid autodetect
/dev/sda8 26658 27681 8225248+ 82 Linux swap / Solaris
/dev/sda9 27682 182401 1242788368+ fd Linux raid autodetect
[/code]
[Moderator edit: Added [i]code[/i] tags to preserve formatting.]

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Does centos support advanced format disk ?

Post by pschaff » 2010/04/23 20:53:16

Ain't teamwork [b]great[/b]? :-D

Sounds like these ought to be labeled "Advanced [Administration Skills Required To] Format Disks". ;-)

habernir
Posts: 12
Joined: 2008/10/02 13:39:11

Re: Does centos support advanced format disk ?

Post by habernir » 2010/04/24 05:09:52

thanks all of you.

gulikoza
Posts: 188
Joined: 2007/05/06 20:15:23

Re: Does centos support advanced format disk ?

Post by gulikoza » 2010/04/25 16:44:29

It should be noted that this works as long as the filesystem begins at partition start. MD v0.90 metadata is at the end of partition, so you're safe there, but 1.1 is at the start of the partition so you need to make sure the real filesystem begins at a 4K aligned sector. The same goes for LVM and similar...and I guess filesystem should have atleast 4K (or multiple of) block size.
You can easily check if partition is properly aligned with hdparm -t. With unaligned partitions you get 70MB/s at the beginning of the disk (falling to somewhere >40MB/s at the end of the disk).
Another solution I read somewhere is to change the disk geometry in advanced fdisk settings. Instead of 63 sectors/track you set 56 sectors/track for example. But I don't know how that would affect other OSes installed on the same disk...

But I am still wondering why there is such a performance hit. Obviously yes, for an unaligned read of 4K filesystem block the hard disk needs to read 2 sectors instead of 1. But HDs rarely read just one sector from the platters, they should read at least 8 at a time and put the contents into onboard cache. The same should apply for writes...But I guess it doesn't work like that :-)

Post Reply