Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jun 2006 08:41:36 +0200
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: Accessing disks via their serial numbers.
Message-ID:  <20060626064136.GD8499@garage.freebsd.pl>
In-Reply-To: <20060625.174838.2140534929.imp@bsdimp.com>
References:  <20060624174331.GB2134@garage.freebsd.pl> <20060625.174838.2140534929.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--5G06lTa6Jq83wMTw
Content-Type: text/plain; charset=iso-8859-2
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Jun 25, 2006 at 05:48:38PM -0600, M. Warner Losh wrote:
> In message: <20060624174331.GB2134@garage.freebsd.pl>
>             Pawel Jakub Dawidek <pjd@freebsd.org> writes:
> : I'd like to extend glabel(8) to create providers related to disks based
> : on their serial numbers and everntually driver name.
> : For example disk ad0 could also be accessed via /dev/disk/ata/3JX0LMGA
> : (/dev/disk/<driver>/<serial> or /dev/disk/<serial>).
>=20
> /dev/disk/ad/3JX0LMGA or /dev/disk/da/3JX0LMGA is the only thing
> you'll be able to do.  There's no mapping from the dev_t -> device_t,
> so you have no way of knowing what the parent of the disk's dev_t.
> All the I/O in the system is done with dev_t's.

Some drivers use disk(9) for their own, so we could have:

	/dev/disk/{ad,da,aac,amr,ida,ips,mlx,pst,twe,mfi}/<serial>

(if I understand things right)
But I'm not convinced about driver's name. If I've two controllers in
the system and will connect the same disk to a different driver I'd like
to be able to access it using the same name. That's the whole point,
right?

> If all the dev_t's had a device_t, then we could hang this information
> off of devd.  It could create whatever links you wanted when the
> device appeared, and remove them when it disappeared.  There'd really
> be no need to have geom involved at all :-).
>=20
> : It could be eventually useful to be able to ask the disk which
> : attributes it has, so we can fetch them in a loop. With BIO_GETATTR we
> : don't know which attributes provider can return.
>=20
> device_t's already have a number of bundles of attributes.  It would
> seem a shame to reinvent another mechnamism.

And what if I'd like to export a serial from gmirror, which has no
device_t nor dev_t (at least not controlled by me)?

--=20
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd@FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

--5G06lTa6Jq83wMTw
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFEn4GgForvXbEpPzQRAqe0AKCx8+wyLl9BzBjb7jCuuuBOn44OzQCeIp09
c8Y1ptGGZfVfrb4jdVEVpdA=
=KBET
-----END PGP SIGNATURE-----

--5G06lTa6Jq83wMTw--



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