A way to sort on SD.

There are hundreds of papers that have optimal algorithms for polyphase merge sorts. Just google for disk examples.

You can use as few as three files.