[ale] SATA disk naming

Michael B. Trausch mike at trausch.us
Wed Nov 12 10:19:56 EST 2008


On Wed, 12 Nov 2008 09:24:47 -0500
"Jeff Lightner" <jlightner at water.com> wrote:
>
> The software RAID (md) puts info on the disks to identify which are
> part of the RAID which is why this worked for you.
> 
> It is also why they often suggest you use label on simple partions and
> refer to those in /etc/fstab instead of the partition names.
> 
> Only God knows why they can't just mark the disks at install and keep
> track of them in Linux like every other UNIX OS does.   I recall how
> frustrated I was when it turned out Solaris would rename tape drives
> based on discovery at boot rather than keeping the same name all the
> time.  At least they had a way to setup "persistence" in the st.conf.
> 

I know that you can do this for Ethernet controllers (e.g., on Ubuntu
in /etc/udev/rules.d/70-persistent-net.rules).  You can even name them
arbitrarily (beware, though:  some applications do _not_ like
nonstandard names for Ethernet interfaces!).

I use this functionality to name my Ethernet devices in my server
machine "inet0", "lan0", and "lan1":

# PCI device 0x1317:0x0985 (tulip)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address
=="00:02:2a:cb:41:98", ATTR{type}=="1", NAME="lan0"

# PCI device 0x10de:0x0057 (forcedeth)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:13:d3:15:32:c9", ATTR{type}=="1", NAME="inet0"

# PCI device 0x10b7:0x9200 (3c59x)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:04:75:e2:f7:6b", ATTR{type}=="1", NAME="lan1"

There appear to be rules for CD devices, as well, in
70-persistent-cd.rules in the same directory.  Presumably, you could
create symlinks for hard disks in the same way, and refer to those
disks with symlinks in /dev such that they have at least the appearance
of persistent naming.  The CD file uses a PCI identifier to create the
symlinks, so I don't know how you'd handle partitions on the device and
create the appropriate symlinks.  I suspect it can be done, though.

	--- Mike

-- 
My sigfile ran away and is on hiatus.
http://www.trausch.us/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://mail.ale.org/pipermail/ale/attachments/20081112/d99101d2/attachment.bin 


More information about the Ale mailing list