There is one thing that I've always wondered about, and yet never seem to find when searching through google, tutorials, or even looking at programming textbooks.
The question seems easy enough, but the answer seems elusive.

How do you write your own Filesystem/Format?

I've always wanted to know how to write my own system for the learning experience.
I've worked on simple ones that read from a flatfile of a defined size, but never one that was on a fully formatted drive.

Where do I start? Are there any examples/tutorials?