Most major Linux distributions create and assign UUID on disk partitions during system installation, which is then used as an identifier to mount the partition in /etc/fstab. Once set, UUID is static, and it addresses the issue with partition's device name that could change, which causes the fstab to no longer be valid and the filesystem not mounted.
Related: How to get disk partition UUID in Linux
Related: How to mount disk partition using UUID in Linux
You can create and assign UUID on newly created partitions or change UUID on existing partitions in Linux from the terminal.
$ uuidgen 39ea80c4-e748-47eb-835c-64025de53e26
uuidgen is normally installed by default in most Linux systems.
You can also get UUID from /proc/sys/kernel/random/uuid.
$ cat /proc/sys/kernel/random/uuid 5c27b2b3-58f4-4469-a717-45865f517400
$ sudo umount /dev/sdb1
$ sudo e2fsck -f /dev/sdb1 e2fsck 1.44.6 (5-Mar-2019) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information /dev/sdb1: 11/1310720 files (0.0% non-contiguous), 126322/5242624 blocks
$ sudo tune2fs /dev/sdb1 -U 39ea80c4-e748-47eb-835c-64025de53e26 tune2fs 1.44.6 (5-Mar-2019) Setting the UUID on this filesystem could take some time. Proceed anyway (or wait 5 seconds to proceed) ? (y,N) y
$ sudo blkid /dev/sdb1 /dev/sdb1: UUID="39ea80c4-e748-47eb-835c-64025de53e26" TYPE="ext4" PARTUUID="2c6a7a3a-01"
Comment anonymously. Login not required.