Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What is the name of the filesystem used for swap space?

share|improve this question

migrated from stackoverflow.com Dec 8 '10 at 4:56

This question came from our site for professional and enthusiast programmers.

    
Which operating system? Windows is different from Linux, etc. –  Cody Gray Dec 8 '10 at 5:58

4 Answers 4

The problem is, for Unix and Linux, swap is not a filesystem because it does not contain files, file metadata, and/or a file directory hierarchy. What swap is, is a memory mapped area of disk. That memory mapped area of disk might be a partition, or a file, but within it are not files, but pages.

For Linux, a swap partition on a PC formatted hard disk has a partition ID of 82. Once mkswap is run on it, the area inside is identified by having the text "SWAP_SPACE" or "SWAPSPACE2" in the last 10 bytes of the first page (usually 512 bytes).

If a file is used, the internal structure is the same, but the file should be created without any holes (unfragmented). The dd command is used for this.

share|improve this answer

You can read some notes about the makeup of the swap file here:

http://linux.die.net/man/8/mkswap

share|improve this answer

Whatever the OS, the swap space isn't a file system as it doesn't contain files in the first place but pages. It isn't either structured hierarchically, if at all, like most filesystems are.

share|improve this answer

The name of file system is swap.Have a nice day....

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.