[Rear-users] Recent udev changes (devtmpfs and modalias)

Les Mikesell lesmikesell at gmail.com
Fri Jan 27 17:48:25 CET 2012


On Fri, Jan 27, 2012 at 8:17 AM, Schlomo Schapiro <schlomo at schapiro.org> wrote:
> On 27 January 2012 15:00, Les Mikesell <lesmikesell at gmail.com> wrote:
>>
>> And perhaps the various versions/distros nail down the
>> NIC names to match config files?
>
>
> Most modern distros use /etc/udev/rules.d/70-persistent-* for the mapping.

Where 'modern' does not include the still-supported RHEL 5 line, I
assume?   Where the 70-persist file is used, it seems to be
auto-created.  What does that and under what conditions?  I'd like to
know how to pick up the PCI card location of NICs in the backup and if
the restored MACs are different have an option that will glue the
original configuration/IPs to the NICs in the same physical position
without the operator needing to know anything else.   And for cloning,
how to pin the names of the interfaces to physical locations (if you
don't they will autodetect in a more or less random order), so that
you can predict which config file to use for each IP.

> RHEL likes to put a HWID=<MAC> line into their ifcfg- files, at least on
> RHEL6

That goes back to at least RHEL3, but the code that checked it was
broken.  Interface detection order was predictable in the 2.4 kernel
so it didn't matter that much.  But, somewhere in a mid-release update
it started checking the HWADDR against the NIC MAC and not bringing up
the interface unless it matched.  It was a fun time to have a lot of
cloned boxes in remote locations...

In RHEL 4 and 5, putting the correct HWADDR= value in the ifcfg-xxx
file was enough.  As long as all of the ifcfg-xxx files are correct,
those systems will actually rename the interface to match the device
name specified in the file.  This doesn't work in RHEL 6.

> SLES used to call the ifcfg files with a MAC address in the name.
>
> And ReaR can handle all of this when mapping NICs to MACs :-)

But that's almost never the right thing to do.  The old box is dead or
I wouldn't be restoring a backup, and the replacement will be
something similar grabbed from generic replacement stock.  The box
will probably have 6 NICs and I'll want 2 to 4 IP's assigned.   And, I
want to be able to do it outside of ReaR (although perhaps with a
ReaR-based script).  In most cases I'd rather swap the disks to the
new chassis instead of taking the time for the restore.  And if you
are cloning, you want the interface names to stick to the
corresponding positions, but you'll want to replace the IP, which you
may or may not be able to do programmaticly at the time the clone is
created.  If you can, you need to be able to access some kind of
MAC->IP table.   If you can't, it would still nice to be able to
script the operation later, still just supplying a table with the
mapping.

> I guess that ATM the best documentation is our scripts... :-(

Yes, but when the scripts don't do what I want in the first place,
that's not going to be much help...

-- 
   Les Mikesell
     lesmikesell at gmail.com




More information about the rear-users mailing list