You are not logged in.
Can't find any information on how to align the disk to 4kib on your wiki about partitioning:
https://wiki.archlinux.org/index.php/Partitioning
Under partition alignment and SSD: "NVMe drives should be aligned to 4KiB. "
Sorry for being a noob but even though I work with computers daily i've a hard time understanding all the aspects of blocks and sectors, virtual and physical sector size, alignment. If you have resource on your hands, much obliged.
Offline
Just use gdisk to partition; the alignment is automatic.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
To expand on what graysky said, if you use an up to date arch iso all the tools should do the right thing and leave everything aligned.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
I think i've mixed up different aspects of partitioning. What i'm after is why and if you want the sector size changed to advanced format? https://wiki.archlinux.org/index.php/Advanced_Format
I've read somewhere (can't find the resource now) that some has improved perfomance with changing the sector size to 4096 bytes. But when I do a fdisk -l on the machine with the nvme disk the physical sector size is 512 bytes, so I guess that the drive can't utilize a 4096 bytes sector size?
And also I guess that it depends on what enviroment you use your disk in. Here's a article with changing data center nvme's to 4096 bytes size for a oracle db http://www.cadalyst.com/%5Blevel-1-with … 3700-23534
So withour a proper resource from samsung discussing the best sector size of choice I wonder what you recommend?
And even without support for 4k adv. format is it even possible to adjust the sector size?
Offline
Things align to MiB by default which should be fine for any device. Most filesystems (exception like FAT) already use 4k as smallest unit anyhow.
And even without support for 4k adv. format is it even possible to adjust the sector size?
These drives report 512 sector size for compatibility reasons... unless you manage to hack the firmware somehow you can't change it. (Some USB enclosures emulate 4K sector size on their own accord but it causes more problems than it solves)
Last edited by frostschutz (2016-05-17 10:59:53)
Offline
Okey so everything is fine! fantastic, that explains the difficulties with finding information about the topic. Thanks alot!
Offline
Okey so everything is fine!
If in doubt you can check it... for example
for f in /sys/block/*/*/start
do
start=$(cat $f)
echo $f : $start : $(($start % 8)) : $(($start % 2048))
done
This prints start sector for each partition as well as it's 4K alignment (% 8) and MiB alignment (% 2048). Ideally both of these should be 0.
/sys/block/sdd/sdd1/start : 2048 : 0 : 0
/sys/block/sdd/sdd2/start : 488380416 : 0 : 0
/sys/block/sdd/sdd3/start : 976758784 : 0 : 0
/sys/block/sdd/sdd4/start : 1465137152 : 0 : 0
/sys/block/sdd/sdd5/start : 1953515520 : 0 : 0
/sys/block/sdd/sdd6/start : 2441893888 : 0 : 0
/sys/block/sdd/sdd7/start : 2930272256 : 0 : 0
/sys/block/sdd/sdd8/start : 3418650624 : 0 : 0
You can safely ignore alignment issues for a few partitions... in msdos partition table, for the extended partition (only primary and logical partitions matter). In GPT for a bios_grub partition (sometimes it's squeezed in before the 1st MiB).
Offline