How to recover an incorrectly formatted swap partition

Source: Internet
Author: User
Keywords Swap partition
Tags aliyun delete display how to http information linux name

Wind Network (ithov.com) original article: In the process of managing Linux, accidentally hand mistakenly, delete the swap partition, and the format, how to restore it? After querying the relevant information, finally found a way, write to share to everyone!

We need to use two commands:

Mkswap

Usage:mkswap [-c] [-ppagesz] [-l-label] [-U-UUID]/dev/http://www.aliyun.com/zixun/aggregation/11696.html ' >name [ Blocks]

Swapon

Usage:
swapon-a [-E] [-v] [-f] enable all swaps From/etc/fstab
Swapon [-P priority] [-V] [F] <special> enable given swap
Swapon-s Display Swap Usage Summary
Swapon-h Display Help
SWAPON-V Display version

The <special> parameter:
{-L label | Label=label} label of device to is used
{-U uuid | UUID=UUID} UUID of device to is used
<device> name of device to is used
<file> name of file to is used

Example:

[Root@localhost/]# Mkswap/dev/sda7
[Root@localhost/]# Swapon/dev/sda7

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.