Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 01 Oct 2014, 08:28
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Are there plans for 4096 byte H/D support in 32bit puppy?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [8 Posts]  
Author Message
Aitch


Joined: 04 Apr 2007
Posts: 6825
Location: Chatham, Kent, UK

PostPosted: Thu 04 Mar 2010, 12:31    Post subject:  Are there plans for 4096 byte H/D support in 32bit puppy?  

Big Terabyte hard drives are becoming more popular, and cheaper, but with them comes a new problem - 4096 byte sectors

It seems linux doesn't yet work with this setup

http://www.osnews.com/story/22872/Linux_Not_Fully_Prepared_for_4096-Byte_Sector_Hard_Drives

Are we ready for this?

Is it just a need to update to a later version of grub, or is there another problem?

Aitch Smile

Last edited by Aitch on Tue 23 Mar 2010, 12:31; edited 2 times in total
Back to top
View user's profile Send private message 
Aung

Joined: 19 Jan 2007
Posts: 119
Location: Hervey Bay

PostPosted: Sat 20 Mar 2010, 09:12    Post subject:  

Thanks for this one Aitch
When the author did his tests he gives results in real, user, and sys. I guess real would be from start to finish, can you tell me what user and sys times are. I bought a OCZ SSD to play with and went through this alignment thing with XP and diskpar.exe. with the bigger 4096-byte sectors.

"Some distros, like Ubuntu, use "parted", which has a very nice "--align optimal" option that will do the right thing."

Shock horror, I have just been into Gparted looking for align optimal, could not find it, but under partitions, imformation, sda1 starts at "first sector 63" which to me is not alligned.

"For /dev/sdc, I used fdisk the same as with sdd, but after creating the partition, I realigned it. I did this by entering expert mode ("x"), then setting the start sector ("b") to 64.
Once that was finished, I formatted both drives using the command "time mke2fs /dev/sdc1" (and sdd1)."

In doze XP the whole drive is aligned to 64 then the partitions are made with disk manager, the author created the partition first then aligned it then formated it. I dont know enough to argue about that one BUT when gparted formated the first partition to ext4 it has broken the alignment. Is this possible?
Me thinks we need a how to for this one. Aung
Back to top
View user's profile Send private message 
Aung

Joined: 19 Jan 2007
Posts: 119
Location: Hervey Bay

PostPosted: Tue 23 Mar 2010, 09:47    Post subject:  

In cfdisk it says 'Sectors per Track: 63'. Should this be 'Sectors per Track: 64' to be aligned. Aung
Back to top
View user's profile Send private message 
Aitch


Joined: 04 Apr 2007
Posts: 6825
Location: Chatham, Kent, UK

PostPosted: Tue 23 Mar 2010, 12:21    Post subject:  

Aung

AFAIK the differences are the Sector SIZES, changed from 512kb to 4096kb to get over the 2Tb limit of 32bit filesystems

see

http://en.wikipedia.org/wiki/Cylinder-head-sector#Sectors

I wouldn't advise trying to change sector numbers as these determine the drives overall structure, and changing that will screw up your drive's fat table, in the boot sector

I believe 63 is correct - code begins at 0, so 0-63=64, OK?

A utility for modifying drives, is testdisk...though care is needed, as you can end up with a drive which is unrecognised by either linux or windoze

see also

http://osdir.com/ml/help-grub-gnu/2009-07/msg00003.html


NOTE: my original query was about 64 bit coded drive access in 32 bit puppy's grub - which I don't think reads 64bit coded xxTbyte drives

I've edited my original post to make this clearer, thanks

best info I've found so far

https://ata.wiki.kernel.org/index.php/ATA_4_KiB_sector_issues

Aitch
Back to top
View user's profile Send private message 
Aung

Joined: 19 Jan 2007
Posts: 119
Location: Hervey Bay

PostPosted: Wed 24 Mar 2010, 09:49    Post subject:  

Thanks again, I shall read up on all your links. Aung
Back to top
View user's profile Send private message 
Aung

Joined: 19 Jan 2007
Posts: 119
Location: Hervey Bay

PostPosted: Thu 25 Mar 2010, 08:48    Post subject:  

Aitch, Yes I am off the track with 'sector per track 63' bit, understand that better now. But still worried about 'start sector 63', which is really sector 64 because the first sector is called '0' but should be really sector 65. It may be that Gparted didnt break what doze calls 'disk geometry' laid down by diskpar.exe but is, when makeing partitions, starting its first sector inside the 'hidden sectors' (doze calls them, for MBR and all that stuff I know nothing about)
Kirks fatdog 64 has fdisk but I could not enter expert mode to see whats in there I could play with. I guess I shall have to find a fdisk howto. Aung

from the author "For /dev/sdc, I used fdisk the same as with sdd, but after creating the partition, I realigned it. I did this by entering expert mode ("x"), then setting the start sector ("b") to 64."
Once that was finished, I formatted both drives using the command "time mke2fs /dev/sdc1" (and sdd1).

Here is a more detailed article about alignment from OCZ forum.
A disk's architecture is build using 64 sector tracks. Microsoft in it's archaic wisdom decided to use the first 63 sectors for the disk structure information when creating a partition using WinXP (as does most related partition editing tools), thereafter will create partitions starting at the beginning of sector 64 which is a great shame since the next track starts in just one more sector further on at the beginning of sector 65.

Starting the beginning of a partition at sector 64 (in this case on which to install Windows) has caused an extra IO for the drive mechanism while it attempts to write or read a 4k block of data spread across a barrier of two tracks at the boundary of sectors 64 & 65.
Look at it this way; the system uses the first 63 sectors for it's internal information (MBR, disk geometry, etc). Windows then writes data in blocks of 4096 bytes to the next available free sectors (starting at sector 64) the first 512bytes of data is written to that sector then all writing stops because the mechanism has reached the end of the current track, which then positions itself at the beginning of the next track and continues to write the remaining 3584bytes of the 4096bytes of data in one operation and will continue to do so until the next track boundary. If the mechanism could write the entire data into one track beginning at sector 65 then the drive would complete the task in one operation. With this misalignment flaw writing or reading data that crosses the track boundary takes two operations to accomplish, which now happens at every track boundary until the alignment is fixed.
Back to top
View user's profile Send private message 
Aung

Joined: 19 Jan 2007
Posts: 119
Location: Hervey Bay

PostPosted: Mon 29 Mar 2010, 09:50    Post subject:  

Aitch, now I understand what you are on about. This is from GPT fdisk.

"In conjunction with the near-universal sector size of 512 bytes, the 32-bit LBA pointers used by MBR partitions impose a 2 TiB limit on disk and partition size. This limit, unlike the earlier 8 GiB limit of CHS, is not easily overcome by a simple extension to MBR; there simply isn't space left in the size allocated to MBR data structures. With 2 TiB drives available now and larger drives expected soon, this problem is a very serious one."

"EFI GUID Partition support works on both 32bit and 64bit platforms. You must include GPT support in kernel in order to use GPT. If you don't include GPT support in Linux kernelt, after rebooting the server, the file system will no longer be mountable or the GPT table will get corrupted."

For an exercise I used GPT fdisk to replace MBR on a Compact flash card in a SATA adaptor. (aligned to use 4096 b sectors like the new HD's are) then formated with 'mkfs.ext4 /dev/sda -b 4096' There was an error message from some sort of 'dump2fs' When I tried to install fat-dog 64, Uv. installer could not find the MBR (now GPT) and through up the super floopy wizard. Next I used Gparted to delete the 'mkfs.ext4' patition and made a new ext4 partition with Gparted (512 b sectors I guess). But could not set the boot flag 'cant manage flag' message. Will kernel support for GPT fdisk work in Puppy? Aung
Back to top
View user's profile Send private message 
Aitch


Joined: 04 Apr 2007
Posts: 6825
Location: Chatham, Kent, UK

PostPosted: Mon 29 Mar 2010, 12:41    Post subject:  

Yes, now you arrive at the same question I had, hence my post in 'cutting edge'
I await an answer from someone more knowledgeable

BarryK, amigo, SHS, technosaurus, Dennis McC, ttuuxxx......etc.... IDK

Aitch Smile
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [8 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0690s ][ Queries: 11 (0.0084s) ][ GZIP on ]