Use dd to add swap size

Source: Internet
Author: User
Use dd to add the swap size. The current swap size is 5951 MB. create an empty file www.2cto.com 512M [root @ zwc ~]. # Free-mtotalusedfreesharedbufferscachedMem: 3947... use dd to add the swap size. The current swap size is 5951 MB, and create an empty M file www.2cto.com [root @ zwc ~] # Free-m total used free shared buffers cached Mem: 3947 793 3154 0 15 367-/+ buffers/cache: 410 3537 5951 Swap: 651 5300 [root @ zwc ~] # [Root @ zwc ~] # Dd if =/dev/zero of =/swap_mount bs = 1024 count = 524288 524288 + 0 records in 524288 + 0 records out 536870912 bytes (537 MB) copied, 1.49614 seconds, 359 MB/s [root @ zwc ~] # [Root @ zwc ~] # Ls-h/swap_mount [root @ zwc ~] # Ls-hl/swap_mount-rw-r -- 1 root 512 M Jan 24/swap_mount Mount swap_mount to swap www.2cto.com [root @ zwc ~] # Mkswap/swap_mount Setting up swapspace version 1, size = 536866 kB [root @ zwc ~] # Swapon/swap_mount [root @ zwc ~] # [Root @ zwc ~] # Free-m total used free shared buffers cached Mem: 3947 1317 2630 0 16 885-/+ buffers/cache: 415 3532 6463 Swap: 651 5812 [root @ zwc ~] # Add to automatic mounting upon startup [root @ zwc ~] # Echo "/swap_mount swap defaults 0 0">/etc/fstab [root @ zwc ~] # Cat/etc/fstab/dev/VolGroup00/LogVol00/ext3 defaults 1 1 LABEL =/boot ext3 defaults 1 2 tmpfs/dev/shm tmpfs defaults 0 0 devpts/dev/ pts devpts gid = 5, mode = 620 0 0 sysfs/sys sysfs defaults 0 0 proc/proc defaults 0 0/dev/VolGroup00/LogVol01 swap defaults 0 0/swap_mount swap defaults 0 0

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.