Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Nov 2009 00:34:30 +0100
From:      Polytropon <freebsd@edvax.de>
To:        Peter Steele <psteele@maxiscale.com>
Cc:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Re: Renaming USB device
Message-ID:  <20091111003430.a95d79c8.freebsd@edvax.de>
In-Reply-To: <7B9397B189EB6E46A5EE7B4C8A4BB7CB3394F75F@MBX03.exg5.exghost.com>
References:  <7B9397B189EB6E46A5EE7B4C8A4BB7CB3394F75F@MBX03.exg5.exghost.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 10 Nov 2009 17:19:39 -0600, Peter Steele <psteele@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, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091111003430.a95d79c8.freebsd>