md: improve partition detection in md array