Which TWO statements about swap space on a Linux system are correct?

LPIC-1 Exam 101-500, objective 102. Linux installation and package management medium

Machine-checked — no person has signed for it. This question was read against the source cited below by an automated pass, which found no contradiction. That is a weaker claim than it sounds: the same kind of process wrote the question, so it can confirm its own mistake.

Treat it as a good draft rather than as settled fact, and read the source below before you rely on it. It is not used in mock exams here — only questions a person has signed for are.

How these questions are written — where each question comes from, what the verification ledger records, and what happens when one is found wrong.

The options

Choose 2.

Correct A swap area may be a regular file on an existing filesystem, not only a whole partition.

Correct. swapon accepts a file as well as a block device, which is how swap is added to a system whose partitions are already allocated.

Correct A partition or file must be prepared with mkswap before swapon will accept it.

Correct. mkswap writes the swap signature, page size and UUID; swapon refuses an area that carries no valid signature.

Not correct A swap partition is activated by mounting it on /swap with mount.

Wrong. Swap holds no directory tree and is never mounted; fstab entries for swap use the pseudo mount point none or swap for exactly that reason.

Not correct A system can have only one active swap area at a time.

Wrong. Several swap areas may be active simultaneously, and each can be given a priority so the kernel prefers the faster device.

Not correct Swap must always be exactly twice the size of installed RAM.

Wrong. That is an old rule of thumb, not a requirement; the size is a design decision driven by workload and by whether suspend-to-disk is needed.

Why

Swap is prepared in two steps and used outside the directory tree: mkswap formats the area, swapon hands it to the kernel, and swapoff takes it back. Because swap is not part of the namespace it has no mount point, and because the kernel tracks each area independently a machine may run several at different priorities. Permanent activation comes from an fstab line with filesystem type swap, applied at boot by swapon -a.

Where this comes from

Cited
manual page swapon(8)

Practise this

Reading one question is not practice. The trainer will draw a short set from objective 102 and space the ones you get wrong.

Practise LPIC-1 Exam 101-500

More questions on this objective

All questions on Linux installation and package management

Practise LPIC-1 Exam 101-500