I am partitioning a disk with the intent to have an ext4 filesystem on the partition. I am following a tutorial, which indicates that there are two separate steps where the ext4 filesystem needs to be specified. The first is by parted when creating the partition:
sudo parted -a opt /dev/sda mkpart primary ext4 0% 100%
The second is by the mkfs.ext4 utility, which creates the filesystem itself:
sudo mkfs.ext4 -L datapartition /dev/sda1
My question is: what exactly are each of these tools doing? Why is ext4 required when creating the partition? I would have thought the defining of the partition itself was somewhat independent of the constituent file system.
(The tutorial I'm following is here: https://www.digitalocean.com/community/tutorials/how-to-partition-and-format-storage-devices-in-linux)