main: factor out code to parse layout for raid10 and faulty.