linux為伺服器磁碟擴容時,分區提示錯誤資訊如何解決?,linux錯誤資訊

來源:互聯網
上載者:User

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即可

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.