System Management

A partition listed in /etc/fstab by UUID is reformatted with mkfs.ext4. What happens to the UUID that blkid reports for its filesystem?

Show the answer

Correct answerA. It changes, because mkfs generates a new filesystem UUID

AWhy this is right: The filesystem UUID is created by mkfs, so reformatting gives a new one and fstab must be updated.

BWhy not this: The partition table holds the PARTUUID, which does not change; the filesystem UUID does.

CWhy not this: The filesystem UUID is generated by mkfs, not taken from the disk's serial number.

DWhy not this: mkfs.ext4 assigns a UUID itself; tune2fs is needed only to change it.

A filesystem UUID is generated when the filesystem is created, so running mkfs again produces a new one. The partition keeps its device name and its PARTUUID, but entries in /etc/fstab that use the old filesystem UUID must be updated.