Renaming USB device
Polytropon
freebsd at edvax.de
Tue Nov 10 23:34:33 UTC 2009
On Tue, 10 Nov 2009 17:19:39 -0600, Peter Steele <psteele at maxiscale.com> wrote:
> When a system has a USB drive present, the system typically
> names it /dev/da0. However, if the system has SATA drives
> hooked to an LSI controller, or if the system has SCSI drives,
> the same drive prefix is used as is for the USB drive.
All direct-access media (DASD) is represented as a da device,
even digital cameras may be.
> For our purposes, we'd like to separate the USB drive from
> the main hard drives as far as the drive prefix is concerned,
> for example something like /dev/usb0 would be ideal.
This prefix is already in use, see "man 4 usb".
> I realize this is something that likely has to be done in the
> form of a kernel patch, but the question is can it be easily
> done?
A kernel patch isn't needed and would surely break many working
subsystems. An option is to use aliases through the means of
/etc/devfs.conf, e. g.
link da3 usbdisk0
or, if you want to enter the field of partition names in /etc/fstab,
refer to the disks by their labels, so you don't need to know
which da device a certain disk or USB stick actually is - it
gives you independance from the order of detection by the
system (first detected, first device name).
If you could elaborate more on the goal you are seeking, other
useful information could come from this list. At the moment, it's
just my wild guessing. :-)
--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions
mailing list