linux為伺服器磁碟擴容時,分區提示錯誤資訊如何解決?,linux錯誤資訊
問題:為伺服器磁碟擴容時,分區提示如下錯誤資訊
解決辦法:
1、查看磁碟分割情況
[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、可以看到/dev/vdb有兩個分區,一個用於SWAP,一個是儲存資料的。
問題肯定是出在SWAP了,使用命令關閉swap,重新fdisk後還是提示一樣的錯誤
swapoff /dev/vdb1
3、進入/etc/fstab 注釋掉掛載的磁碟,reboot,重新fdisk
4、reboot 重啟後,重新fdisk即可