Can a foreign drive's mirrors be prevented from joining identically
named mirrors?
Peter Steele
psteele at maxiscale.com
Sat May 8 17:45:58 UTC 2010
Say I have two systems with two hot-swappable drives and have created mirrors for root, var, and swap across those two drives on each system. If I take a drive from one system and insert it into the other system, it appears that the mirror providers on that drive automatically insert themselves into the identically named mirrors on the system where the drive has been inserted. What's worse, they may also become recognized as the mirrors with the most recent data, even though they came from a different system and should in fact be immediately flagged as dirty and synchronized with the mirrors on the receiving system.
The only solution we've found is that drives being inserted into an existing system should be thoroughly wiped first. The problem with that is we cannot be certain a user will follow that guideline. The alternative is to make sure that the mirrors are uniquely named across all systems. So for example instead of having mirrors named root, var, and swap, we could name them root-<macId>, var-<macId>, and swap-<macId>, where <macId> is a unique ID based on the MAC address of a given system's Ethernet interface. This is a 100% solution but it would likely solve most of the problems we've encountered.
My question is whether there is any other way to accomplish this? We do not want the mirrors on a drive being inserted into another system to automatically added to the receiving systems identically named mirrors.
More information about the freebsd-questions
mailing list