You are not logged in.

#1 2024-02-24 02:55:47

MeanTeacher
Member
Registered: 2023-09-24
Posts: 13

The UUID and the disk name in /etc/fstab doesn't match.

Hi guys, I just install archlinux on one of my SSD(should probably be  /dev/nvme1n1), and I want to add another disk (/dev/nvme0n1). I run "fdisk -x" to check the UUID of /dev/nvme0n1. However,the disk name and UUID shown by "fdisk -x" doesn't match which is shown in /etc/fstab.

This is the output from "fdisk -x"

~$ sudo fdisk -x
Disk /dev/nvme1n1: 953.87 GiB, 1024209543168 bytes, 2000409264 sectors
Disk model: ADATA SX8200PNP                         
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: E34375C9-7760-471C-B795-69AB05A92205
First usable LBA: 34
Last usable LBA: 2000409230
Alternative LBA: 2000409263
Partition entries starting LBA: 2
Allocated partition entries: 128
Partition entries ending LBA: 33

Device            Start        End    Sectors Type-UUID                            UUID                                 Name Attrs
/dev/nvme1n1p1     2048    1050623    1048576 C12A7328-F81F-11D2-BA4B-00A0C93EC93B 089F4E8C-C8BF-4151-B215-44B4B6C6A1FE      
/dev/nvme1n1p2  1050624   42993663   41943040 0FC63DAF-8483-4772-8E79-3D69D8477DE4 BE20912E-6726-47D1-B75D-F0F4C99EC18A      
/dev/nvme1n1p3 42993664 2000406527 1957412864 0FC63DAF-8483-4772-8E79-3D69D8477DE4 D813D092-1638-4FBD-99D7-EFE9E4CDEA85      


Disk /dev/nvme0n1: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: CT1000P3PSSD8                           
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 0B36CC7D-6BED-403D-8B41-F509F0DF92A9
First usable LBA: 34
Last usable LBA: 1953525134
Alternative LBA: 1953525167
Partition entries starting LBA: 2
Allocated partition entries: 128
Partition entries ending LBA: 33

Device         Start        End    Sectors Type-UUID                            UUID                                 Name Attrs
/dev/nvme0n1p1  2048 1953523711 1953521664 933AC7E1-2EB4-4F13-B844-0E14E2AEF915 1C9AEFC6-D5AD-4C1F-A35A-2CB05694CE6A      


Disk /dev/zram0: 4 GiB, 4294967296 bytes, 1048576 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

And this is the content of /etc/fstab:

# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/nvme0n1p2
UUID=f8b1051b-5b41-463a-b2c2-3e0dd783e961	/         	ext4      	rw,relatime	0 1

# /dev/nvme0n1p1
UUID=155E-1FC5      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro0 2

# /dev/nvme0n1p3
UUID=4edf4a56-672c-4225-bf50-1ea6458c7535	/home     	ext4      	rw,relatime	0 2

Which is correct? Also,I want to add the new disk into ~/extradisk. Is adding the disk(nvme0n1) this way save when the other disk(nvme1n1,the disk system is installed) has some problem and lost all the things in it?

Last edited by MeanTeacher (2024-02-24 06:11:01)

Offline

#2 2024-02-24 03:28:47

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: The UUID and the disk name in /etc/fstab doesn't match.

fdisk deals with partitions. It's showing you the UUID of the partition, which the kernel refers to as PARTUUID. See blkid instead of fdisk.

Offline

#3 2024-02-24 06:10:07

MeanTeacher
Member
Registered: 2023-09-24
Posts: 13

Re: The UUID and the disk name in /etc/fstab doesn't match.

Scimmia wrote:

fdisk deals with partitions. It's showing you the UUID of the partition, which the kernel refers to as PARTUUID. See blkid instead of fdisk.

So I run "blkid /dev/nvme1n1p1" the UUID is match. However,the diskname still unmatch

blkid:

$ sudo blkid /dev/nvme1n1p1
/dev/nvme1n1p1: UUID="155E-1FC5" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="089f4e8c-c8bf-4151-b215-44b4b6c6a1fe"

/etc/fstab:

# /dev/nvme0n1p1
UUID=155E-1FC5      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro0 2

Which one is correct? What should I configure?

Last edited by MeanTeacher (2024-02-24 06:12:12)

Offline

#4 2024-02-24 06:39:38

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: The UUID and the disk name in /etc/fstab doesn't match.

nvme0n1p1 vs nvme1n1p1 is semi-random, that's the reason for using persistent names like the UUID.

Last edited by Scimmia (2024-02-24 06:39:53)

Offline

Board footer

Powered by FluxBB