Fixing the inconsistent path ordering when using friendly_names and a separate var partition on RHEL 5
cause
- RHEL 5 multipath bindings file is located in var
- /var isn't mounted before multipath is configured
- redhat does not include /var/lib/ in the initial ram disk which breaks multipath on boot
solution (work around)
dont forget to comment out vi /etc/multipath.conf
add the following lines to multipath config to set netapp specific settings
defaults {
user_friendly_names yes
bindings_file /etc/multipath/bindings ##changed
flush_on_last_del yes
max_fds max
pg_prio_calc avg
queue_without_daemon no
}
devices {
device {
vendor "NETAPP"
product "LUN"
path_checker tur
path_selector "round-robin 0"
getuid_callout "/sbin/scsi_id -g -u -s /block/%n"
# prio_callout "/sbin/mpath_prio_ontap /dev/%n"
prio_callout "/sbin/mpath_prio_alua /dev/%n"
# features "1 queue_if_no_path"
features "3 queue_if_no_path pg_init_retries 50"
# hardware_handler "0"
hardware_handler "1 alua"
path_grouping_policy group_by_prio
failback immediate
rr_weight uniform
rr_min_io 128
}
}
mkdir /etc/multipath
cp /var/lib/multipath/bindings /etc/multipath/bindings
cd /boot
cp initrd*img initrd*img.multipath-bak
mkinitrd -f initrd-`uname -r`.img `uname -r`
ls -ltr #make sure the file is correct size there seems to be a bug where it intermittently creates a initrd of half the size