Bug 9594 - 'help' button on partitioning
Summary: 'help' button on partitioning
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Installer (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Documentation Team
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-02 22:22 CEST by Scott Westlake
Modified: 2014-06-17 21:46 CEST (History)
4 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments

Description Scott Westlake 2013-04-02 22:22:41 CEST
In help text at the bottom
'
Custom
 This gives..
'

and there's an '!' in red circle about 'SSD'

The tip here with '!' about SSD's and using Gparted

If someone wants to 'Round to nearest Mb' (installer doesn't say this), it can be done with Gparted.. (Gparted live cd preferably)

Also if there can be an online reference about the issue of 'aligning' partitions with SSD-- because I never heard of 'alignment' issues other than the mechanical platter 4k harddrives. SSD's work in a very different fashion and I would be interested in learning on a link about it

Thanks..
Comment 1 Marja Van Waes 2013-04-03 13:21:58 CEST
Hi Scott,

Thanks for your report.
(For others who read this: this is about the Warning at the bottom of this page, 
http://docteam.mageia.nl/installer/content/doPartitionDisks.html
which currently says:

*****************************************************
If you have a SSD (Solid State Drive) instead of a hard disk, at the time this help was written, it was inadvisable to create the partitions with this tool because they would not be aligned. The SSD would work but with reduced speed and lifetime. Use a partitioning tool such as Gparted instead with these partition alignment settings for each partition :

Free space preceding (MiB) : 2

Round to cylinders : unchecked
*****************************************************

That help text was written with https://bugs.mageia.org/show_bug.cgi?id=1215#c19 in mind.

Unfortunately, documentation team does not have enough knowledge to know what to do with this warning.

@ Dave Hodgins

I think you mentioned some time ago that this does not only apply to some SSDs, but that it can apply to some other storage devices, too. Do I remember correctly?

If so, would the following text then be better?

*******************************************************

If you create new partitions, most storage devices will work fine with alignment to 1 MiB boundaries, like our diskdrake tool does. However, some drives will need alignment to 2 MiB boundaries. 
If your storage device needs that, too, then please use a tool like gparted instead and choose the following settings:
"Align to" "MiB" 
"Free space preceding (MiB)" "2"

*********************************************************

and if not, do you have a suggestion for a better text?

CC: (none) => davidwhodgins, marja11
Assignee: bugsquad => doc-bugs

Comment 2 Marja Van Waes 2013-04-03 20:53:24 CEST
@ pterjan

Or can you help?

CC: (none) => pterjan

Marja Van Waes 2013-04-03 20:53:39 CEST

Hardware: i586 => All

Comment 3 Scott Westlake 2013-04-04 07:54:28 CEST
If I can also comment on this, but that thread with #c19 refers to a model that has an available firmware update for it.. Sometimes firmware updates can overcome the problem-- I'm no expert on SSD's but I know firmware updates can fix alot of strange things (including the one discussed about SSD drives compatibility)
Comment 4 Marja Van Waes 2013-04-04 08:10:10 CEST
(In reply to Scott Westlake from comment #3)
> If I can also comment on this, but that thread with #c19 refers to a model
> that has an available firmware update for it.. Sometimes firmware updates
> can overcome the problem-- I'm no expert on SSD's but I know firmware
> updates can fix alot of strange things (including the one discussed about
> SSD drives compatibility)

Yes, of course you can comment :-D

Did you see (or do you have time to figure out) whether that update changed the erase block size to 1 MiB or 512 KiB? (If possible at all).
Comment 5 Scott Westlake 2013-04-04 08:28:59 CEST
I'm assuming it would be a case-by-case.. but I do know for a fact that "firmware" updates either for "bios" or harddrives themselves make a big difference.  I know a case I helped someone on #linux irc, where a laptop bios update fixed a freezing issue (and he was using a dual boot setup, each OS was freezing)..
I wouldn't happen to know in detail but there's a .zip for all oses, and there's not readme anywhere (zip contains a tinycore Linux bootable iso )
(http://ocz.com/consumer/download/firmware ,  oz3)

http://www.ocztechnologyforum.com/forum/showthread.php?105168-NEW!!-OCZ-Bootable-Toolbox-PC-Edition-%28REBUILD%29

"7. You can choose your parameters for the partition from here, you want 1MiB for the "Free space preceding" and you want the "Align" to field to say "MiB" as shown. If you do not want the full size of the drive as a partition, this is where you select it, just set the size you want. The example shows the full 1GB selected as partition size.
"

The instructions given is from an official staff.. This is nice, they're showing full pictures with Gparted :).. I never used SSD's but there must be more that would need to be tinkered (Like trim and scheduling, perhaps a tip or two along side the partitioning tip? just a thought)
Comment 6 Marja Van Waes 2013-04-04 20:00:56 CEST
(In reply to Scott Westlake from comment #5)

Thanks, Scott :)

I'll cc André, who originally wrote the part about SSDs

My brain isn't smart enough to process the additional information you gave :-/

@ André

In my proposal for a new text, in comment 1, I changed 
"Round to cylinders : unchecked"
to
"Align to" "MiB"
because in current gparted there is no checkbox anymore for this setting, but a drop-down menu instead.

Would you have time to look into comment 5?

CC: (none) => lebarhon

Comment 7 Scott Westlake 2013-04-05 03:21:29 CEST
? I don't use SSD's drives :(
If you meant "erase block size to 1 MiB or 512 KiB" from the previous comment, I actually would know alot less than everybody.. but why is it that there needs to be an alignment? according to these two articles from http://www.micro-isv.asia/, it doesn't seem otherwise.. My understanding with SSD's is very limitted unfortunately 

"
Modern SSDs even lie to the operating system. If the operating system tells the drive to save a file in blocks 728, 729, and 730, the drive may decide to write it to blocks 17, 7829, and 78918 instead, if it determines that those blocks havenât been worn out as much yet. The drive keeps a lookup table of all its blocks, so that when the OS wants to read blocks 728 through 730, the drive reads blocks 17, 7829, and 78918. With such drives, defragmentation software canât possibly work. The software will think and tell the user that file X was nicely defragmented and stored in blocks 728, 729, and 730, while it actually has no idea where the data is stored physically on the drive.
"

Now according to the http://www.ocztechnologyforum.com/forum/showthread.php?105168-NEW!!-OCZ-Bootable-Toolbox-PC-Edition-%28REBUILD%29 post, it mentions about alignment, and the user who posts instructions is labelled as 'official staff'.. so I'm sort of left baffled
Comment 8 Dave Hodgins 2013-04-05 04:56:36 CEST
The ssd will write whatever the erase block size is.

If the os tries to write a 4k block that is not on the
erase size boundary, then two blocks have to be read,
the write merged, and both blocks written.

While the physical blocks may be written anywhere in the
drive, they are still blocks that logically have to be kept
aligned.

Regarding the warning.  Unless Richard can find some way to
confirm the ssd drive is really using a 2MB erase block,
which I doubt, I would not mention anything about ssd drives,
as the 1MB alignment should be fine.

The only warning I'd put in, is ...

Some newer drives are now using 4096 byte logical sectors,
instead of the previous standard of 512 byte logical sectors.
Due to lack of available hardware, the partitioning tool used
in the installer has not been tested with such a drive.  It may
be safer to pre-partition the drive, using a tool such as
gparted.
Comment 9 Scott Westlake 2013-04-05 06:52:37 CEST
I thought the 4k block high capacity drives in the earlier days was a concern for alignment, as later on manufacturers found ways to not worry about it-- but these are for platter harddisks.. I know seagate uses something where no alignment has to be done (and assuming 512byte blocks is perfectly safe with it)  there's an article about it.. I'm sure you know about it, but I do not understand why you say "now".. Are you referring to SSD drives that require a 4k alignment? 4k block capacity platter drives have been out already for quite some time.. and I think gparted is able address this.. i do not know how popular they are, but I do know manufacturers have been using trick optimizations to allow any user to still configure them as 512-byte block drives but with a "slight" penalty (according to the following link)

http://knowledge.seagate.com/articles/en_US/FAQ/221411en

http://en.wikipedia.org/wiki/512e#512e

can you guys please speak in geek terminology? ;)

Any storage device to me is seen as a "linear device" (like a ruler, length from 0 to X# of blocks, where each block is traditionally a 512bytes)

https://ata.wiki.kernel.org/index.php/ATA_4_KiB_sector_issues#L-2._Userspace_tools_status_.28thanks_to_Karel_Zak.5B13.5D.29

^ I do not know if that wiki is up to date for the latest kernels, but none theless it looks pretty nicely laid showing which tools recognize 4kib logical sector sizes..

Here's tips on moving with fdisk (perhaps this can be good for the wiki somewhere)

http://www.novell.com/support/kb/doc.php?id=7007193

..
from experience, the first partition of a drive usually starts from sector#63 (which means 512*63==32256 bytes offset)-- but this is for dosmbr drives.. 

What if the user is using gpt? 

according to 
http://en.wikipedia.org/wiki/GUID_Partition_Table
"
Such a misalignment occurs by default if the first partition is placed immediately after the GUID partition table, as the next block is LBA 34, whereas the next 4 KiB boundary begins with LBA 40.
"

..This tells me that to have a safe 4k alignment on a GPT drive, a first partition would be optimal if it starts from LBA 40.


.. When i was talking about the 63 sectors for dosmbr partition table, the "gap" between sector 0 and sector 63 is nicely phrased from ^ wikipage
"
This typically causes the first primary partition to start at LBA 63 on disks accessed via LBA, leaving a gap of 62 sectors with MBR-based disks, sometimes called "MBR gap", "boot track" or, "embedding area".
"

(
Some bootloaders (like old Mswindows), and perhaps grub too, inject bootstage code in this area.. So little things like this is helpful to know to take as a convention not to have things start at places where bootloader code can be injected..

^ dosmbr
)


(
I'm occassionaly facing this issue, but is not a very big concern for most people, but I believe it'll one day be fixed for all linux distros. Linux distro installers are not able to setup a bios_grub partition for GPT on non-EFI bios hardware. No Linux installer is able to do this.. and I learned the hardway when I installed a Linux on GPT for nonEFI bios only to find out I needed a bios_grub partition-- no reinstall was needed, but I was able to fix it quite easily using Gparted live cd, was a mere graphical solution, and if a user falls in this trap I can probably make a wiki for it. On non-efi hardware for GPT drives, an EFI bootpartition does not have to be used.. Some people think EFI bootpartitions are mandatory, but the specification doesn't say so-- using a GPT drive without an efi partition doesn't break any specs according to my understanding.. 
)


For me I know, the first partition on dosmbr shouldn't start less than sector63, and for GPT it looks like it's around LBA40, but LBA40 strictly for alignment of 4k drives..

I'm not very knowledgable in this area, but I can join a mailinglist to see if that kernel.org's wikipage is somewhat out of date.. 

If someone wants me to wiki highlights I pickup here or there I can try to narrate on this subject because the information looks a bit scattered all over the web.. it looks like you guys need more help on this topic.. I don't know how much I can contribute, but I can try to write up a bit on a wikipage or something..
Comment 10 Marja Van Waes 2013-04-05 08:48:23 CEST
(In reply to Dave Hodgins from comment #8)

> 
> The only warning I'd put in, is ...
> 
> Some newer drives are now using 4096 byte logical sectors,
> instead of the previous standard of 512 byte logical sectors.
> Due to lack of available hardware, the partitioning tool used
> in the installer has not been tested with such a drive.  It may
> be safer to pre-partition the drive, using a tool such as
> gparted.

Thx a lot, Dave :-D

For now, I'll change the text to that, but I'll also tell the translators there is still a chance the text will be changed again.

(In reply to Scott Westlake from comment #9)


> 
> I'm not very knowledgable in this area, but I can join a mailinglist to see
> if that kernel.org's wikipage is somewhat out of date.. 
> 
> If someone wants me to wiki highlights I pickup here or there I can try to
> narrate on this subject because the information looks a bit scattered all
> over the web.. it looks like you guys need more help on this topic.. I don't
> know how much I can contribute, but I can try to write up a bit on a
> wikipage or something..

Thx for digging into this, Scott, and for the offer to write a wiki page :-D

It would indeed be good to make sure the information you dig up is not outdated, before writing that page.

I won't be able to review it, because I lack the needed brain power. I'm hoping Dave will find time to do the reviewing (and maybe he has some suggestions about what (not) to include on the page?)
Comment 11 Scott Westlake 2013-04-08 02:18:42 CEST
The ! red icon help warning about SSD alignment, is the installer using something like PSS? PSS is described over here. It's a technique to discover if a drive is using a 4k blocksize

https://ata.wiki.kernel.org/index.php/ATA_4_KiB_sector_issues#S-2._The_proper_solution.

The url says "The proper solution", (which I don't mean to place right up front)

is this way still supported for detecting a 4k blocksize drive ? Perhaps have a notification to the user if such a drive is detected but not aligned :)
Comment 12 Dave Hodgins 2013-04-08 03:45:18 CEST
(In reply to Scott Westlake from comment #11)
> The ! red icon help warning about SSD alignment, is the installer using
> something like PSS? PSS is described over here. It's a technique to discover
> if a drive is using a 4k blocksize
> 
> https://ata.wiki.kernel.org/index.php/ATA_4_KiB_sector_issues#S-2.
> _The_proper_solution.
> 
> The url says "The proper solution", (which I don't mean to place right up
> front)
> 
> is this way still supported for detecting a 4k blocksize drive ? Perhaps
> have a notification to the user if such a drive is detected but not aligned
> :)

What's described in that wiki only works for drives that accurately tell
the kernel what physical sector size it's using.  Many advanced format
drives tell the kernel it's using a 512 byte physical sector size, but
in reality, are using a 4096 byte physical sector size.

I've sent a message explaining the problem, and it's history to the
doc-discuss mailing list.  The warning should be changed to ...


        Some newer drives are now using 4096 byte logical sectors,
	instead of the previous standard of 512 byte logical sectors.
	Due to lack of available hardware, the partitioning tool used
	in the installer has not been tested with such a drive.
 
        Also some ssd drives now use an erase block size over 1 MB.
 
 	We suggest to pre-partition the drive, using an alternative
 	partitioning tool like gparted, if you own such a device, and
	to use the following settings:
		"Align to" "MiB"
		"Free space preceding (MiB)" "2"
        Also make sure all partitions are create with an even number
        of megabytes.
Comment 13 Scott Westlake 2013-04-09 09:56:44 CEST
Perhaps it should be mandatory on a blank drive to land on a 4k segment.. (1 meg is nothing for sparing) :).. I know this sounds like the easy way out, but I mean I think other operating systems by default ignores like 1 or 2 megs..

May I ask why 2 megs, and not 1? a 4k blocksize would land on the 1 meg..

Also the post I gave above for a particular SSD's model referenced from another bug-- I checked their site and their instructions show using Gparted of using 1 MB untouched..

"Also make sure all partitions are create with an even number of megabytes."

Since 4096 bytes is always going to land on a megabyte?

^ But I mean as long as Align to the "Mib" is set to "1"..and the first partition has at least 1Mb unused space in front of it.. unless there's something I'm not counting on, like consecutive partition mis-alignments or something, is there a reason why using the round-to Mib to 1 is problematic?(and leaving any X Mb gap, to me this doesn't matter as long as X is minimally 1 MB :)
Comment 14 Scott Westlake 2013-04-09 10:01:51 CEST
'Also some ssd drives now use an erase block size over 1 MB' -- ok i missed that part.. sorry i missed that :/
Comment 15 Marja Van Waes 2013-04-21 10:08:46 CEST
The updated help for this screen, with the text as suggested by Dave in comment 12, is waiting to be freeze-pushed and can then be checked with a network install.

Status: NEW => ASSIGNED

Comment 16 Marja Van Waes 2014-06-17 21:46:09 CEST
fixed long ago

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.