Thursday, 8 September 2011

How to enable swap on Red Hat Linux

Before formatting swap partition please disable that partition.To do that

step1:

#fdisk -l

  Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14         535     4192965   82  Linux swap / Solaris
/dev/sda3             536       30401   239898645   83  Linux

step2:

#swapoff /dev/sda2 (your /etc/fstab entry for swap).

step3:

Create Swap signature on that partition.to do that,

#mkswap -v1 /dev/sda2

step3:

Enable swap partition,

#swapon /dev/sda2

step4:

Check the status of swap partition.

#swapon -s

Filename                Type        Size    Used    Priority
/dev/sda2                               partition    4192956    0    -2


No comments:

Post a Comment