Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I reboot my Linux server the swap space reads 0 in top.

  • I am running a vanilla install of CentOS 5.2
  • /etc/fstab looks fine from what I can tell

    /dev/VolGroup00/LogVol01 swap swap defaults 0 0
  • swapon -a returns "invalid params" error message for /dev/VolGroup00/LogVol01

Doing a mkswap /dev/VolGroup00/LogVol01 and then swapon -a works.

But each time I reboot the swap space goes back to 0 in top.

share|improve this question
1) Are you sure the error is "invalig params" not "invalid argument"? Don't retype manually, copy-paste everything. 2) Can you test whether reading from the logical volume is possible without errors (dd if=/dev/VolGroup00/LogVol01 bs=512 count=10 of=/dev/null)? – Aleksander Adamowski Jun 11 '11 at 8:16

In /etc/fstab, all fields should be separated by whitespace. You have the last 2 fields' (fs_freq and fs_passno) values (zeros in both cases) separated by a comma.

Instead of this:

/dev/VolGroup00/LogVol01 swap swap defaults 0,0

You should have:

/dev/VolGroup00/LogVol01 swap swap defaults 0 0
share|improve this answer
nice spotting. I wouldn't have seen that immediately :) – Server Horror Jun 7 '11 at 18:45
I mistyped that line, it does not contain a comma. I just confirmed this on the machine. (I edited the question.) – Jared Brown Jun 9 '11 at 17:04
/dev/VolGroup00/LogVol01 swap                   swap    defaults        0 0


# swapoff -a
# umount /dev/VolGroup00/LogVol01
# mount -a

then post the output.

share|improve this answer
# umount: /dev/VolGroup00/LogVol01: not mounted – Jared Brown Jun 14 '11 at 14:42
When I do swapon -a I get swapon: /dev/VolGroup00/Log01: Invalid argument – Jared Brown Jun 14 '11 at 14:44
But doing a mkswap /dev/VolGroup00/LogVol01 and then swapon -a works. – Jared Brown Jun 14 '11 at 14:44

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.