Two new methods for creating SWAP space in Linux (1)

Source: Internet
Author: User
Two new methods for creating SWAP space in Linux operating system (1) -- Linux general technology-Linux technology and application information. For more information, see the following. Linux SWAP space can be created in two ways: partition and file. That is to say, the space provided as a SWAP can be provided in the form of partitions and files!

Partition type:

1. To use a partition for SWAP, prepare an unused partition, such as/dev/hdd4. Use the t option of the fdisk tool to modify the tag of this partition and change it to 82.

2. Use the mkswap tool format.

For example:

[Root @ RAID/] # mkswap/dev/hdd4

3. Use the swapon command to activate the/dev/hdd4 partition as the SWAP

For example:

[Root @ RAID/] # swapon/dev/hdd4

4. Use swapon-s to check whether swapon-s is used.

For example:

[Root @ RAID/] # swapon-s
Filename Type Size Used
/Dev/mapper/VolGroup00-LogVol01 partition 327672 680
/Dev/hdd4 partition 362872 0
File Type:
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.