From owner-freebsd-fs@FreeBSD.ORG Wed Apr 27 16:36:04 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5A5D106566C for ; Wed, 27 Apr 2011 16:36:04 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (apollo.backplane.com [65.120.238.197]) by mx1.freebsd.org (Postfix) with ESMTP id BC6E88FC08 for ; Wed, 27 Apr 2011 16:36:04 +0000 (UTC) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.14.4/8.14.1) with ESMTP id p3RGO6jb064718; Wed, 27 Apr 2011 09:24:06 -0700 (PDT) Received: (from dillon@localhost) by apollo.backplane.com (8.14.4/8.13.4/Submit) id p3RGO5ms064717; Wed, 27 Apr 2011 09:24:05 -0700 (PDT) Date: Wed, 27 Apr 2011 09:24:05 -0700 (PDT) From: Matthew Dillon Message-Id: <201104271624.p3RGO5ms064717@apollo.backplane.com> To: Jeremy Chadwick References: <4DB70949.6090104@FreeBSD.org> <20110426182017.GA92471@freebsd.org> <4DB70F13.6060002@FreeBSD.org> <4DB759A1.4050201@FreeBSD.org> <20110427054218.GA88420@DataIX.net> <864o5kgplh.fsf@gmail.com> <20110427101718.GA82324@icarus.home.lan> Cc: freebsd-fs@freebsd.org, "Jason J. Hellenthal" , Pan Tsu Subject: Re: Why not just name the cam-ata devices the same as the old names? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Apr 2011 16:36:05 -0000 :> Not sure if we have support for labels based on disk serial number :> similar to /dev/serno/* from DragonFlyBSD but :> :> /dev/serno/* :> * no extra step to setup, e.g. `gpart create' or `newfs' :> * survive wiping entire disk, no metadata stored on-disk :> * available on every ata disk : :How is this number generated within DFBSD? I have seen hard disks that :have literally no serial number (field is blank, and not space-padded :either). Some systems vendors do this. I'm wondering if the generated :number is based on a combination of details (ex. device model string + :serial number string + total drive capacity in bytes), rather than just :pure drive serial number. : :CC'ing Matt as he probably knows. :-) : :-- :| Jeremy Chadwick jdc@parodius.com | Basically what DragonFly does is extract the serial number if the device reports one (and it isn't trivially blank) and makes the drives and partitions available via /dev/serno/[.s#[a-o]], in addition to their device attachment point at /dev/daXX, /dev/adXX, etc. If no serial number is available the devices will not show up in /dev/serno/ but will still show up at their device attachment point. We try to discourage the use of device attachment points when the serial number is available. That is, we encourage the use of serial number specifications in /etc/fstab and /etc/rc.conf whenever possible. The installer will install w/ such specifications. This way the hard drive can be connected via multiple avenues or even switched between the IDE (ata) driver and the AHCI driver, or hot-plugged via E-Sata, or a port-multiplier, and it just works. Plus, of course, with multiple device drivers the probe order is not necessarily going to be consistent either for DAxx assignment, and PHY issues / drive dropouts or probe failures would renumber everything anyway. Device attachment points are a non-starter if you have more than one hard drive. Once users get used to /dev/serno and/or LVM the issue of trying to represent a consistent set of device attach points for different drivers goes away. I strongly discourage any attempt to make device attach points consistent... it's a lost cause from the start. I even discourage the use of LVM for simple installations. LVM labels (roughly equivalent to GEOM labels in FreeBSD) are useful for more complex situations but logical labels in simple situations (which is to say, 99% of the installations out there) are unnecessarily complex relative to the use of the drive serial number. -- Any IDE, SATA, or SCSI attached disk will have a real serial number. I've never come across disks attached that way which do not. VMWare and QEmu will generate a dummy serial number based on the order the drives are configured. VirtualBox does not support serial numbers. I think (not 100% sure). USB-connected sticks and USB drives which run through USB/SATA bridges (which is all of them) usually do not support serial numbers. Those bridge chips are broken in many ways :-( iSCSI drives... I don't know, it usually depends more on the mid-layer software. They are supposed to. RAID/OTHER - I don't know. I'd like to say that they had better support proper serial numbers but I don't have enough data points. -Matt