Here is how to create ext4 on the partition and which names will find it later.
mkfs.ext4 creates the filesystem: it writes the ext4 structures — the superblock, the inode table, the journal — to the partition. Whatever was on the partition before becomes unreachable, so mkfs is run only on a new or unwanted partition.
The -L option gives the filesystem a label, a short name for people: data, logs, backup. The label shows up in lsblk -f and blkid. Besides the label, the filesystem gets a UUID when it is created. Running mkfs again on the same partition gives a new UUID.
For a partition, blkid prints the fields of two owners on one line:
| Fields | Whose |
|---|---|
LABEL, UUID, TYPE |
the filesystem's: mkfs wrote them |
PARTLABEL, PARTUUID |
the partition's in the GPT table: mkpart data wrote PARTLABEL="data" |
Create a filesystem and mount the partition
Create an ext4 filesystem labelled data on the partition /dev/loop0p1, look up its UUID and mount the partition at /srv/data.
Goals · 0 of 2
- Create a labelled ext4 on the partition not done yet
- Mount the partition at /srv/data not done yet