Date: Fri, 04 Sep 2009 10:36:38 -0400 From: Graham Todd <gtodd@bellanet.org> To: freebsd-fs@freebsd.org Subject: Re: Identifying disks with serial number Message-ID: <4AA125F6.1020003@bellanet.org> In-Reply-To: <4AA010C7.9020303@quip.cz> References: <4A9FF314.1080909@bellanet.org> <4AA010C7.9020303@quip.cz>
next in thread | previous in thread | raw e-mail | index | archive | help
Miroslav Lachman wrote: > Graham Todd wrote: >> Hello all, >> >> Quick question on disk serial numbers. Besides manually geom_label-ling >> disks by serial number is there an automagic way for geom to present >> serial numbers to the system/devfs? I'm not using ZFS or anything but >> I've got to the point where anything that helps with juggling disks would >> be nice. >> >> I noticed a newish DragonflyBSD feature that does this. They "label" >> disks with serial numbers, devfs seems to see them and then you can >> use convenience aliases in /etc/devtab to make the serial number ID >> referenceable in /etc/fstab). See: >> >> http://leaf.dragonflybsd.org/mailarchive/users/2009-08/msg00149.html >> >> Something similar was discussed in freebsd-arch thread long ago (by the >> usual suspects (-: ): >> >> http://lists.freebsd.org/pipermail/freebsd-arch/2006-June/005344.html >> >> Is there a documented way to "autolabel" disks by serial number in >> FreeBSD? > > It was discussed [1], but there are no labels by disk ID at this time. > There are auto labels for partitions. You can then use ufsid in your fstab. > > GEOM_LABEL: Label for provider ad4s1a is ufsid/4a985d01cb85f79f. > GEOM_LABEL: Label for provider ad4s1d is ufsid/4a985d015b316798. > GEOM_LABEL: Label for provider ad4s1e is ufsid/4a985d015260f27c. > > 1] http://lists.freebsd.org/pipermail/freebsd-geom/2009-July/003625.html Thanks for the reference. I'm already using geom labels for juggling file systems and it's great. I hope that can extend to disks in the future. One of the replies to Ivan Voras's original post asked about a use case. I think in the message to the dragonfly users mailing list (see link above) Matt Dillon lays one out: booting from a specific disk ID no matter how it is attached (firewire, USB, external/internal SATA etc.). Since that might involve changes to the boot loader perhaps it's not a great example. I wasn't thinking of ZFS in particular and didn't realize that the implications were complicated for zpools etc (nor that there was a particular devfs namespace pollution issue for disk labels). As far as I can tell the dfly feature isn't specific to hammer but maybe it is more useful in their particular case. Anyway, thanks to all for the excellent work on FreeBSD file systems and geom classes ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4AA125F6.1020003>