When linux is used to resize a server disk, how does one solve the partition error message ?, Linux error message

Source: Internet
Author: User

When linux is used to resize a server disk, how does one solve the partition error message ?, Linux error message

Problem: when resizing a server disk, the following error message is displayed in the partition.

Solution:

1. View Disk Partitions

[root@hotdata ~]# fdisk -lDisk /dev/vda: 21.5 GB, 21474836480 bytes255 heads, 63 sectors/track, 2610 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x00078f9c   Device Boot      Start         End      Blocks   Id  System/dev/vda1   *           1        2611    20970496   83  LinuxDisk /dev/vdb: 322.1 GB, 322122547200 bytes16 heads, 63 sectors/track, 624152 cylindersUnits = cylinders of 1008 * 512 = 516096 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0xb8c71e5c   Device Boot      Start         End      Blocks   Id  System/dev/vdb1               1       16643     8388040+  82  Linux swap / Solaris/dev/vdb2           16644      208050    96469128   83  Linux  

2. You can see that/dev/vdb has two partitions, one for SWAP and the other for storing data.

The problem must be caused by SWAP. Use the command to disable swap. After fdisk is replayed, the same error is returned.

swapoff  /dev/vdb1      

3. Enter/etc/fstab to comment out the mounted disk, reboot, and re-fdisk

4. After reboot is restarted, restart fdisk.

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.