This is my bash script to automatically partitioning new disk on Ubuntu.
The new disk will be partitioning as EXT4 filesystem.
I'm made this to automatically partition disk on Google Cloud Platform Ubuntu VM. But of course you can use this to any Ubuntu VM.
The list of command is get from https://cloud.google.com/compute/docs/disks/add-persistent-disk#expandable-2.