Why not just name the cam-ata devices the same as the old names?
Matthew Dillon
dillon at apollo.backplane.com
Wed Apr 27 16:36:05 UTC 2011
:> 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 at 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/<serialno>[.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
More information about the freebsd-fs
mailing list