UUID を取得する
root@yamato:~# ls -l /dev/disk/by-uuid/
合計 0
lrwxrwxrwx. 1 root root 15 5月 8 15:43 03e19ef0-0232-4d04-8c52-340349bb5a03 -> ../../nvme0n1p1
lrwxrwxrwx. 1 root root 15 5月 8 15:43 20DC-C3A7 -> ../../nvme2n1p1
lrwxrwxrwx. 1 root root 11 5月 8 15:43 237cdc5d-bd3b-4bd0-ba96-5a0558cd170b -> ../../zram0
lrwxrwxrwx. 1 root root 15 5月 8 15:43 36b57f58-3063-4265-bee0-af9fcfacc47c -> ../../nvme2n1p2
lrwxrwxrwx. 1 root root 15 5月 8 15:43 48C61343C61330A4 -> ../../nvme1n1p3
lrwxrwxrwx. 1 root root 15 5月 8 15:43 7EEE13AAEE135A2B -> ../../nvme1n1p4
lrwxrwxrwx. 1 root root 15 5月 8 15:43 EE12-E564 -> ../../nvme1n1p1
lrwxrwxrwx. 1 root root 15 5月 8 15:43 ca6b79fc-b366-43bf-b37d-87fd7bb3fb37 -> ../../nvme2n1p3
root@yamato:~# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Wed May 7 19:28:36 2025
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
UUID=ca6b79fc-b366-43bf-b37d-87fd7bb3fb37 / btrfs subvol=root,compress=zstd:1 0 0
UUID=36b57f58-3063-4265-bee0-af9fcfacc47c /boot ext4 defaults 1 2
UUID=20DC-C3A7 /boot/efi vfat umask=0077,shortname=winnt 0 2
UUID=ca6b79fc-b366-43bf-b37d-87fd7bb3fb37 /home btrfs subvol=home,compress=zstd:1 0 0
UUID=03e19ef0-0232-4d04-8c52-340349bb5a03 /home/KanraKara/2TB btrfs defaults 0 0
UUID はデバイスのシンボリックリンクとして「/dev/disk/by-uuid/」に格納されている。
この UUID を使ってハードディスクなどを「/etc/fstab」に指定して自動マウントさせる事が出来る。
なお、「/etc/fstab」に「btrfs」を指定しているが、これは作成したパーティションの形式である。
