08-20-2013 12:19 PM
I have a script that I use to make snapshots of 3PAR vv's and present them to my host. As part of the script it removes the mpath and deletes the related disks from the system. I noticed that even though I use multipath -f <mp_device> the friendly name is still held in /etc/multipath/bindings with the wwid of the disk that was last used by that name. The snapshots will have a different wwid each time, so that file will fill up overtime. I manually removed the entries from the file, but it is somehow still holding friendly names somewhere. When I first started usinf the script I was at mpathb and now I am at mpathg.
# Multipath bindings, Version : 1.0
# NOTE: this file is automatically maintained by the multipath program.
# You should not need to edit this file in normal circumstances.
# alias wwid
I am wondering if there is a way to recycle the names. I have been digging around google and hove not been able to find anything. ANy ideas would be appreciated.
Solved! Go to Solution.
08-20-2013 12:57 PM
The bindings file is literally the only thing that keeps the names from getting recycled.
Note that it says "you should not need to edit this in normal circumstances" - well, having to deal with snapshots that have new WWIDs each time apparently places you outside the programmer's idea of "normal circumstances", so feel free to edit the file. Just make sure you don't remove any lines that currently have active multipath devices associated with them.
After editing the file, restart multipathd; it reads the bindings file at startup and might be remembering the lines you've deleted from the bindings file.
Alternatively, you could switch the friendly_names off: that way, you would get the WWID numbers as multipath device names. If you have some static WWIDs and the rest are snapshots (and thus keep changing), you could still specify human-friendly alias names for the static WWIDs in /etc/multipath.conf, and let the snapshots have WWID-based names.
08-20-2013 02:24 PM