On Mon, 15 Oct 2007, Edwards, David (JTS) wrote:
> > -----Original Message-----
> > From: Otto Moerbeek [mailto:[EMAIL PROTECTED]
> > Sent: Friday, 12 October 2007 5:53 PM
> > To: Raimo Niskanen
> > Cc: Edwards, David (JTS); [email protected]
> > Subject: Re: : Which remvable drive is connected to which USB port
> >
> >
> > On Fri, 12 Oct 2007, Raimo Niskanen wrote:
> >
> [snip]
> > >
> > > Missing is still some way to find out what the kernel device
> > > tree looks like - the kernel must know that sd0 is attached
> > > to scsibus1 targ 1 lun 0 which is attached to umass0 which
> > > is attached to uhub1 port 1. The question is if there is
> > > a way of finding that without parsing dmesg.
>
> I agree that's my problem in a nutshell.
>
> > I can see an easy way to identify disks, without any dependency on the
> > physical stuff like cables etc.
> >
> > Use the disklabel: it has a disk name field that can be edited.
>
> Thanks for the idea but unfortunately it doesn't help.
> Take three USB disks, plug them in and then tell me
> how to put the right label on the right physical disk?
Plug them in one by one and label them. That would be a manual process.
>
> It would work of course if our "restore" procedure went:
>
> for each backup disk available
> Plug in the disk and check the lable to see if it's the right one
> if it is the right one
> Restore from the disk
> end
> fi
> end
>
> I suspect this would get a bit tedious..
It's easy to make a script that produces the sdX -> label mappings and
vice versa.
-Oto