centos7 create a SWAP partition

learning target:

Through this experiment to master the creation and management under Linux swap partition.

Steps:

1, in the second a new hard disk partition 1G, the type is set to swap

2, activate the new swap partition, and the boot can automatically enable new swap

Command:

The first step: disk partition

fdisk -l to see whether the new hard drive found
Here Insert Picture Description

The following steps partition type 82 as swap

Here Insert Picture Description

Step two: the new partition as swap

Here Insert Picture Description

NOTE: The new partition must first activate before use by partprobe

The third step: Mount swap

Here Insert Picture Description

The fourth step: activate the new swap, and view

Here Insert Picture Description

Before activating only one swap, activated by the swapon -a, you can see the new swap

Here Insert Picture Description

Guess you like

Origin blog.csdn.net/qq_37257758/article/details/94590330