When we use disks as a backup medium for swapped-out pages, the information stored on disks is transient. If the computer system crashes, doesn't matter if we loose info on disk, because we've already lost the (more important) info in memory.
When secondary strorage is used as a filesystem, however, we expect the information there to survive crashes, and certainly to survive reboots. Robustness of the filesystem is an important consideration.
(Can be software crashes or disk crashes.)
We won't go into this in depth, but consider some of the things which might go wrong in the filesystem if the system crashes:
Most filesystems nowadays come with a program which inspects the filesystem structure, and detects inconsistancies, and tries to correct them. For example, recent versions of Windows95, when it boots up, if the system did not properly shut down last time, runs a disk checking program.
UNIX has a daemon which wakes up every 30 seconds and makes a SYNC call to the OS, which flushes filesystem buffers, and makes sure that data on the disk is up-to-date. This way, no more than 30-seconds worth of modified data is likely to be lost in event of a crash.
Stable storage: some systems very conservitively write out two copies of each block, and check that both copies match. This is a technique which avoids any inconsistancy in event of a crash. (If a crash occurs, a little data may be lost, but the filesystem is guaranteed to be consistant.)
Also problem with physical defects of the disk or disk drive hardware. One approach, RAID, is to use many disks, and access them in parallel. In the simplest arrangement, two disks are used, and the same data is written to both of them. If one fails, the other may still be used while the failed disk is replaced. More complicated schemes spread data across as many as 100s of disks, and also achieve increases in performance by spreading the load evenly across all the disks.
Most smaller computer systems deal with hardware problems simply by taking note of bad blocks, and attempting to work round the damage as best they can.
To avoid losing even a single datum, a journalling system may be used. In this scheme, each transaction (typically in a database system) is written to a log file (and the secondary storage used is stable). In the event of a crash, even if the database has not been updated on disk, all the transactions are still on the log file (which could be on a mag tape, or other disks). The filesystem may be recovered by running the transactions from the log. In this way, even very sensitive data may be protected from loss.
Mere mortals, however (as opposed to merchant banks) usually make do with backing up data occasionally.