On Fri, 19 Jan 2024, Ben Koenig wrote:

This is exactly why I recommend using by-path. The links there only change
when the port you are connected to changes. In the event of a sudden USB
reset, the device will be redetected on the same port and at that moment
the drive letter will change, but the port NUMBER will not. by-path
references the physical hardware port number and maps it to whatever drive
letter happened to get assigned.

Ben,

Hokay. Makes sense to me. Now I have the Probox disks in /etc/fstab as:
PARTUUID=2880337a-ba6b-4eb3-ab93-7f57cf6e7340 /media/data2  ext4 auto,users,rw 
1  2
PARTUUID=467c17d5-37d3-4b6d-997d-6b9a3dd8f5c9 /media/data3  ext4 auto,users,rw 
1  2
PARTUUID=e67975e2-a4c6-452d-912d-b88543ae8c9e /media/bkup1  xfs auto,users,rw  
1  2
PARTUUID=def865cd-c933-43f2-beea-3120341648cc /media/bkup2  ext4 auto,users,rw 
1  2

They're mounted and I can access them.

If I use the by-path partition numbers:
pci-0000:05:00.0-usb-0:1:1.0-scsi-0:0:0:0-part1
pci-0000:05:00.0-usb-0:1:1.0-scsi-0:0:0:1-part1
pci-0000:05:00.0-usb-0:1:1.0-scsi-0:0:0:2-part1
pci-0000:05:00.0-usb-0:1:1.0-scsi-0:0:0:3-part1

how do I tell the kernel what they are? They're not LABELs, PARTUUIDs, or
/dev/sdn.

Is this not exactly what you are asking for? I don't understand why the
/dev/disk/by-path links are so invisible to people when it is literally
the solution to this type of problem.

As an end user of linux I had no idea there was a /dev/disk with all its
subdirectories.

Regards,

Rich

Reply via email to