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.