[olug] Drive letter assignments

Christopher Cashell topher-olug at zyp.org
Mon Apr 11 07:21:18 UTC 2011


On Sun, Apr 10, 2011 at 9:39 PM, Obi-Wan <obiwan at jedi.com> wrote:
> While I'm on the hard drive topic, it drives me crazy that every time
> I reboot my machine that contains five physical drives (one PATA, four
> SATA), the sdX drive letters get scrambled.  I label every partition,
> so this doesn't affect drive mounting, but it plays havoc with my
> MRTG setup because SNMP sorts its entries by drive letter (-ish).
>
> Is there any way around this?  I only reboot once every few months to
> catch kernel updates, but it's still annoying.

This can be forced using udev rules.  udev can be a little hairy to
deal with, though.  It be too late on a running system, but if you use
LVM to name and manage your dicks, you can usually get away with
(almost) completely ignoring the old /dev/sdaX naming, and always
using the LVM names.  I would assume that would work, but without
knowing more about your MRTG and SNMP setup, I can't say for sure.

If you go the udev route, there's a decent page on setting it up here:
 http://reactivated.net/writing_udev_rules.html

I've found 'scsi_id' to be the most reliable solution for my needs
with persistent disk naming udev.  Although, I generally only use it
for things like SAN attached storage in clustered FS setups.  The vast
majority of the time, LVM does the trick.

> --
> Ben "Obi-Wan" Hollingsworth                             obiwan at jedi.com

-- 
Christopher



More information about the OLUG mailing list