Linux increases swap virtual memory

Source: Internet
Author: User

User demand: Swap space is not enough, need to expand the swap

Operation Steps:

One: Partition

Fdis/dev/sdb #在sdb硬盘上划分一个分区给swap

N #创建一个新分区

P #创建主分区

+2g #给sdb1 2G of space

T #更改id

#swap的id为82

W #保存

Two: Formatting partitions

MKSWAP/DEV/SDB1 #格式化分区

Three: Write boot automatically mount

Vi/etc/fstab

Join:/DEV/SDB1 swap default 0 0

W: Save

Four: Activating the new swap partition

SWAPON/DEV/SDB1 (equivalent to the Mount command)

V: Verify that New is correct

Swapon-s

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5B/96/wKiom1UM3P6B6l9wAAB7sbPV4fU567.jpg "title=" 11.png "alt=" Wkiom1um3p6b6l9waab7sbpv4fu567.jpg "/>

/DEV/SDB1 join to swap successful




This article is from the "night Reading Wit Hope female Ghost" blog, please be sure to keep this source http://more3.blog.51cto.com/9929586/1622733

Linux increases swap virtual memory

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.