Direct disk access

Is there any way to write to disk sector by sector, without any files, filesystems etc. I did that in DOS, but that was DOS.

Databases often do that. You write to /dev/rdsk/something where something depends on the os in question.

So, if I create raw disk device, it'll possible to use it as one big random access file with fseek()'s

You should not need to create it, it is usually there.