Parted

    Create partition

    Windows

    parted -s /dev/sdX mklabel msdos mkpart primary ntfs 0% 100%
    mkfs.ntfs /dev/sdX1
    
    parted -s /dev/sdX align-check optimal 1
    

    Linux

    parted -s /dev/sdX mklabel gpt mkpart primary ext4 0% 100%
    mkfs.ext4 /dev/sdX1
    
    parted -s /dev/sdX align-check optimal 1
    

    In the case of a raid software

    The partition is not specified (e.g. ext4)

    parted -s /dev/sdX mklabel gpt mkpart primary 0% 100% set 1 raid on
    

    Note: set raid flag on partition 1

    source