Currently i’m a little bit confused. I’m trying to take care about the correct 4k alignment to get best performance for new HDDs with size > 2TiB. I’m using the following command till now, but i know it is not the optimal setting, but how to tell parted to auto-align the partition?
parted -s — ${device} mklabel gpt mkpart primary 0 -1
Using
parted -s -a optimal — ${device} mklabel gpt mkpart primary 0s -1s
does not fix the problem. Everytime the partition layout looks like
# fdisk -lu /dev/sdd
WARNING: GPT (GUID Partition Table) detected on ‘/dev/sdd’! The util fdisk doesn’t support GPT. Use GNU Parted.
Disk /dev/sdd: 106 MB, 106954752 bytes
255 heads, 63 sectors/track, 13 cylinders, total 208896 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: 0×00000000
Device Boot Start End Blocks Id System
/dev/sdd1 1 208895 104447+ ee GPT
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(0, 0, 1) logical=(0, 0, 2)
Partition 1 has different physical/logical endings:
phys=(1023, 254, 63) logical=(13, 0, 51)
which is not optimal. Any tipps?
Please give me a final release date, your wonderful creations. At least approximately.
It’s released when it’s done ;-)
Off topic, but check this out!
http://www.debian.org/ports/kfreebsd-gnu/
Best of both worlds, the merger of OMV and FreeNAS! :D
What an abortion!
Interesting info here http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/
I’ve been running a bunch of WD EARS drives and it has always been a pain. The drive doesn’t report the actual physical sector size.
I simply use the following command in parted to manually align it: mkpart primary 64 -1
I’m fairly certain you can also align it on mkpart primary 40 -1 (and a few others)
You might just keep a small list of drive names that have 4k sectors and apply the right scheme. It is ugly and a hack–but it is probably less pain. Eventually the drives will stop lying to us.
If you do so, what is shown if you execute ‘parted -l /dev/sdX’ ? Is the entered start point used or has it been changed by parted. If i use 2048s 100% the list command displayes me something like 17.9k for the start point of the partition. But i have to say that ‘parted /dev/sdX align-check opt 1′ tells me the partition is aligned correctly.
I use dd if=/dev/zero of=/dev/sd* for a ten seconds, then CTRL+C, then gdisk without problem. http://www.rodsbooks.com/gdisk/walkthrough.html
I haven’t looked at it in a while… I sold off my WD EARS drives because of the hassle and don’t regret it.
gdisk – \GPT fdisk\ per the authors site should do the right thing on 4k drives, but it’s only in sid and even the sid version is from before support was added and the debian package appears unmaintained.
So far in my search, aside from the latest gdisk the only other tool that claims it should always do the right thing is gparted. Any other tools (parted, fdisk, etc) are vague in thier changlogs or require manual intervention. Sadly if the drives didn’t lie the tools could do the right thing without hacks.
I made a mistake – The version of gdisk in Sid is current, the date on the authors site is wrong. I’m assuming you want to use tools available in Squeeze though, rather than workarounds or self hosting.
> I’m assuming you want to use tools available in Squeeze though, rather than workarounds or self hosting.
That’s right.
Volker take a look here:
http://www.cyberciti.biz/tips/fdisk-unable-to-create-partition-greater-2tb.html
“if you are using Debian or Ubuntu Linux, you need to recompile the kernel. Set CONFIG_EFI_PARTITION to y to compile this feature.”
The alternative is to use fdisk with 4k align and use ext3-4
Debian Squeeze already supports GPT.
Hi Volka,
Not totally sure, but is this a result of the following bug?
http://bugs.gentoo.org/show_bug.cgi?id=304727
Sorry if I’ve thrown you a red herring and wasted your time.
PS Keep up the good work
this might give you some insight:
http://www.ibm.com/developerworks/linux/library/l-4kb-sector-disks/index.html?ca=drs-#gpt_solution
Volker, there is a patch for the 4k problem with parted. Ubuntu 10.04 included the patch to fix the 4k problem. While some people still complain about it not working, it seems as it might not be a solution to the problem.
What about using fdisk instead for 4k alignment?
fdisk does not support GPT.