Re: Managing USB device names

2007-05-25 Thread Giorgos Keramidas
On 2007-05-25 09:09, Chris Kottaridis <[EMAIL PROTECTED]> wrote:
> I am using USB to connect an external disk drive. It seems to get
> assigned a different device name when it connects in. The names seem to
> cycle through /dev/da* where * is changing on each disconnect and
> reconnect.
>
> With this going on I can't add a /etc/fstab entry.
>
> Is there a tool/package that can manage things so that when I plug in
> the device it will get mounted to a specific directory without manual
> intervention ?

GEOM_LABEL can help a lot here.

I have a USB stick which contains a UFS file system created with:

# newfs -L GKER /dev/da0s1a

Now if geom_label.ko is loaded and this USB disk is attached, the
GEOM_LABEL support creates a special /dev node at `/dev/ufs/GKER':

: kobe kernel: umass0:  on uhub4
: kobe kernel: umass0: Get Max Lun not supported (STALLED)
: kobe root: Unknown USB device: vendor 0x058f product 0x6387 bus uhub4
: kobe kernel: da0 at umass-sim0 bus 0 target 0 lun 0
: kobe kernel: da0:  Removable Direct Access SCSI-2 
device
: kobe kernel: da0: 40.000MB/s transfers
: kobe kernel: da0: 979MB (2007038 512 byte sectors: 64H 32S/T 979C)
: kobe kernel: GEOM_LABEL: Label for provider da0s1a is ufs/GKER.

# ls -ld /dev/ufs/GKER
crw-r-  1 root  operator  -   0, 176 May 26 04:31 /dev/ufs/GKER
#

The device node at `/dev/ufs/GKER' is directly mountable:

# mount -o ro /dev/ufs/GKER /mnt/flash
# mount | fgrep /mnt/flash
/dev/ufs/GKER on /mnt/flash (ufs, local, read-only)
#

Using GEOM_LABEL support and the geom_label.ko kernel module, you can
assign names to your filesystems which persist across mount operations,
so it will be easier to mount them at predictable places.

Regards,
Giorgos


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Managing USB device names

2007-05-25 Thread Jonathan Horne
On Friday 25 May 2007 14:12:19 Kevin Downey wrote:
> On 5/25/07, Chris Kottaridis <[EMAIL PROTECTED]> wrote:
> > I am using USB to connect an external disk drive. It seems to get
> > assigned a different device name when it connects in. The names seem to
> > cycle through /dev/da* where * is changing on each disconnect and
> > reconnect.
> >
> > With this going on I can't add a /etc/fstab entry.
> >
> > Is there a tool/package that can manage things so that when I plug in
> > the device it will get mounted to a specific directory without manual
> > intervention ?
> >
> > Thanks
> > Chris Kottaridis([EMAIL PROTECTED])
>
> man glabel

i use sysutils/desktopbsd-tools.  not quite automatically, but you click on 
the volume to mount, and it does it.  youll need to check their wiki on their 
site under 'tips and howtos' (i think it was) to get all the particulars 
ready (devfs.rules changes, etc etc).  ive been pretty happy with it.
-- 
Jonathan Horne
http://dfwlpiki.dfwlp.org
[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Managing USB device names

2007-05-25 Thread Kevin Downey

On 5/25/07, Chris Kottaridis <[EMAIL PROTECTED]> wrote:

I am using USB to connect an external disk drive. It seems to get
assigned a different device name when it connects in. The names seem to
cycle through /dev/da* where * is changing on each disconnect and
reconnect.

With this going on I can't add a /etc/fstab entry.

Is there a tool/package that can manage things so that when I plug in
the device it will get mounted to a specific directory without manual
intervention ?

Thanks
Chris Kottaridis([EMAIL PROTECTED])


man glabel

--
"The biggest problem with communication is the illusion that it has
occurred." G. B. Shaw
www.thelastcitadel.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Managing USB device names

2007-05-25 Thread Chris Kottaridis
I am using USB to connect an external disk drive. It seems to get
assigned a different device name when it connects in. The names seem to
cycle through /dev/da* where * is changing on each disconnect and
reconnect.

With this going on I can't add a /etc/fstab entry.

Is there a tool/package that can manage things so that when I plug in
the device it will get mounted to a specific directory without manual
intervention ?

Thanks
Chris Kottaridis([EMAIL PROTECTED])
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"