Wouldn't that break (??) if the USB got unplugged and plugged in a
different USB port?  Seems like the UUID would be more stable/robust.

On Fri, Jan 19, 2024 at 12:49 PM Ben Koenig <techkoe...@protonmail.com>
wrote:

>
> On Friday, January 19th, 2024 at 12:05 PM, Rich Shepard <
> rshep...@appl-ecosys.com> wrote:
>
>
> > On Fri, 19 Jan 2024, Ben Koenig wrote:
> >
> > > Try using the various shortcuts in /dev/disk/. This folder contains
> > > symlinks to the usual /dev/sdX entries.
> >
> >
> > Ben,
> >
> > /dev/disk/by-uuid/ holds UUIDs for disk partitions. I used the disk UUID,
> > not the partition UUID. I'll try the partition UUIDs instead.
> >
> > > For this use case, I recommend referencing the drives via
> > > /dev/disk/by-path since these links are built from the physical
> hardware
> > > path of the device.
> >
> >
> > I've not before had an issue, it's only been with these momentary power
> > shutdowns and the kernel switches the Probox drive names between sdc-sdf
> and
> > sdf-sdi. Frustrating.
> >
> > Thanks,
> >
> > Rich
>
> 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.
>
> 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.
> -Ben
>

Reply via email to