Linux/parted

parted
GNU Parted - a partition manipulation program

Used by OpenELEC to create SD card partitions: (create_sdcard) DISK = /dev/sdh

parted -s /dev/sdh mklabel msdos
 * 1) writing new disklabel on $DISK (removing all partitions)...

parted -s "$DISK" unit cyl mkpart primary fat32 -- 0 16 parted -s "$DISK" unit cyl mkpart primary ext2 -- 16 -2
 * 1) creating partitions on $DISK...

parted -s "$DISK" set 1 boot on
 * 1) make partition active (bootable)

partprobe "$DISK"
 * 1) tell kernel we have a new partition table

mkfs.vfat "$PART1" -I -n System mkfs.ext4 "$PART2" -L Storage
 * 1) create filesystem
 * 2) creating filesystem on $PART1...
 * 1) creating filesystem on $PART2...

sync
 * 1) sync disk

Larger than 2TB RAID
To get larger than 2TB you need GPTs

parted /dev/sdb mklabel gpt print free mkpart primary 1M 4TB p set 1 raid on  align-check optimal 1 q

mdadm --create --verbose /dev/md0 --level=5 --raid-devices=4 /dev/sd[iklm]1

mkfs.ext4 /dev/md0 -L /ci

cat /proc/mdstat

---

parted -a optimal /dev/sdf

Ref:
 * server - How can I create a RAID array with >2TB disks? - Ask Ubuntu - https://askubuntu.com/questions/350266/how-can-i-create-a-raid-array-with-2tb-disks
 * A guide to mdadm - Linux Raid Wiki - https://raid.wiki.kernel.org/index.php/A_guide_to_mdadm
 * Using parted to create a RAID primary partition — Lucid Solutions - https://plone.lucidsolutions.co.nz/linux/io/using-parted-to-create-a-raid-primary-partition

lsblk
List block devices: lsblk

How To - Linux List Disk Partitions Command - nixCraft - https://www.cyberciti.biz/faq/linux-list-disk-partitions-command/

List SCSI Devices
lsscsi

Use different unit
parted -ls /dev/sda 'unit s' parted /dev/sda 'unit s print'

[parted] How to list start/end/size sectors? - https://www.linuxquestions.org/questions/linux-software-2/%5Bparted%5D-how-to-list-start-end-size-sectors-4175461903/

Specify TB
unit TB unit GB