Bananian Linux

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000009Bananian Linux[All Projects] Generalpublic2014-09-02 10:552015-04-28 20:45
ReporterNico 
Assigned ToNico 
PrioritynormalSeverityfeatureReproducibilityhave not tried
StatusassignedResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0000009: SATA installer
Descriptionprovide an option to install Bananian to SATA (optional)
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000051)
Thomas Kaiser (reporter)
2014-10-10 12:28

You should use 'parted -a optimal' to ensure proper partition alignment when bananian-config provides partitioning also. 

parted -s /dev/sda mklabel gpt
SectorCount=$(parted -s /dev/sda unit s print | awk -F": " '/^Disk \/dev\/sda/ {print $2}' | tr -d 's')
LastUsableSector=$(( ${SectorCount} / 2048 ))
parted -s /dev/sda --align optimal unit s mkpart primary ext4 2048 $(( ${LastUsableSector} * 2048 ))

A check with 'parted -s /dev/sda unit s print' should show first sector 2048. While this might waste some disk space it will ensure proper alignment (performance loss when done wrong) for almost all sorts of disks (advanced format, traditional and SSDs). Of course in some rare situations this might fail: http://h10025.www1.hp.com/ewfrf/wc/document?cc=de&lc=de&dlc=de&docname=c03479326 [^]

When /sys/block/sda/queue/rotational returns 0 then 'discard' should be added to the mount options in /etc/fstab to enable TRIM support for SSDs.
(0000052)
Thomas Kaiser (reporter)
2014-10-10 13:49

Oops, I just learned that the aforementioned 'rule of thumb' does not apply to each and every SSD, especially the one I use here with the BananaPi (Samsung Evo 840 120G). This SSD has an Erase Block Size of 1536KiB. Sectors: 3072 (512 * 3072 = 1572864 = 1024 * 1536)

And so I end up with these optimal settings:

LastUsableSector=$(( ${SectorCount} / 3072 ))
parted -s /dev/sda --align optimal unit s mkpart primary ext4 3072 $(( ${LastUsableSector} * 3072 ))
mkfs.ext4 -b 4096 -E stride=2,stripe-width=384 /dev/sda1

The performance seems to be the same (no wonder since the BananaPi's SATA implementation is the bottleneck here). So I withdraw from my former suggestion and would leave partitioning up to the user ;-)
(0000157)
Nico (manager)
2015-02-01 09:08

There is a first version available provided by hirnwunde. Thank you!
https://github.com/hirnwunde/bananian-rootfsmover [^]

- Issue History
Date Modified Username Field Change
2014-09-02 10:55 Nico New Issue
2014-09-02 11:07 Nico Assigned To => Nico
2014-09-02 11:07 Nico Status new => assigned
2014-10-10 12:28 Thomas Kaiser Note Added: 0000051
2014-10-10 13:49 Thomas Kaiser Note Added: 0000052
2014-12-02 15:03 guest Note Added: 0000101
2014-12-02 17:22 guest Note Deleted: 0000101
2015-02-01 09:08 Nico Note Added: 0000157
2015-03-07 07:38 Nico Target Version later => 16.04
2015-04-28 20:45 Nico Target Version 16.04 => later


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker