Force consistant hardware mappings across reboots

Partition mount points

/etc/fstab

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# /dev/mapper/system-root /
UUID=1e6d957c-5f9f-484e-99cb-4c068ac16ba1 / ext4 noatime,errors=remount-ro 0 1
# /dev/md0 /boot
UUID=39b8423d-e831-40f8-8ab6-c16aff22a984 /boot ext4 noatime 0 2
# /dev/mapper/system-home /home
UUID=b0677542-d6ca-4d80-8dec-e89d02433b4c /home ext4 noatime 0 2
# /dev/mapper/system-tmp /tmp
UUID=95dd18be-815c-40e6-8713-a9b64daf3b0c /tmp ext4 noatime 0 2
# /dev/mapper/system-var /var
UUID=c6c23b39-b611-4b2c-b172-51cbb6d93696 /var ext4 noatime 0 2
# /dev/mapper/system-swap swap
UUID=9be44e9c-d7f6-424e-8d94-7757ce89509c none swap sw 0 0

References

Hard drives

Network interfaces

/etc/udev/rules.d/70-persistent-net.rules

# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
 
# PCI device 0x10de:0x0057 (forcedeth)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:14:4f:49:f7:18", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
 
# PCI device 0x10de:0x0057 (forcedeth)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:14:4f:49:f7:19", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
 
# PCI device 0x8086:0x1010 (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:14:4f:49:f7:1a", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
 
# PCI device 0x8086:0x1010 (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:14:4f:49:f7:1b", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"

RAID Devices

/etc/mdadm/mdadm.conf

# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#
 
# by default, scan all partitions (/proc/partitions) for MD superblocks.
# alternatively, specify devices to scan, using wildcards if desired.
DEVICE partitions
 
# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes
 
# automatically tag new arrays as belonging to the local system
HOMEHOST <system>
 
# instruct the monitoring daemon where to send mail alerts
MAILADDR root
 
# definitions of existing MD arrays
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=0b97a661:714c0c61:55ac34b1:8b37b7ca
ARRAY /dev/md1 level=raid1 num-devices=2 UUID=4433950a:a2b749b8:9600c122:bd466c99

Leave a Reply

Your email address will not be published. Required fields are marked *

*