全部產品
Search
文件中心

Server Migration Center:出錯提示磁碟空間不足或者記憶體不足

更新時間:Jul 13, 2024

問題描述

在作業系統遷移時,出錯提示以下資訊:

  • Available system memory is less than 300M, memory requirement is not satisfied.

  • Total system memory is less than 512M, memory requirement is not satisfied.

  • Available system storage is less than 2G, storge requirement is not satisfied.

  • To ensure the migration, this machine must have 2G free space on disk and 300MB RAM available.

  • To ensure the migration, this machine must have 512MB RAM at least totally.

  • To ensure the migration, this machine must have 4G free space on disk and 600M RAM available

  • Memory detected: *MiB, required: *MiB

問題原因

待遷移的作業系統的根目錄磁碟空間不足或者記憶體不足,導致作業系統遷移失敗。不同報錯資訊對應的問題原因如下表所示:

遷移情境

報錯資訊

問題原因

  • CentOS 7 -> Alibaba Cloud Linux 2

  • CentOS 8 -> Alibaba Cloud Linux 3

  • RedHat 8 -> Alibaba Cloud Linux 3

Available system memory is less than 300M, memory requirement is not satisfied.

需要確保伺服器可用記憶體大於300 MiB。

Total system memory is less than 512M, memory requirement is not satisfied.

需要確保伺服器總記憶體大於512 MiB。

Available system storage is less than 2G, storge requirement is not satisfied.

需要確保伺服器系統硬碟有2 GiB的可用空間。

  • CentOS 7 -> AnolisOS 7

  • CentOS 8 -> AnolisOS 8

To ensure the migration, this machine must have 2G free space on disk and 300MB RAM available.

需要確保伺服器有2 GiB的系統硬碟可用空間和300 MiB的可用記憶體。

To ensure the migration, this machine must have 512MB RAM at least totally.

需要確保伺服器總記憶體大於512 MiB。

  • CentOS 7 -> Alibaba Cloud Linux 3

  • CentOS 7 -> AnolisOS 8

  • RedHat 7 -> Alibaba Cloud Linux 3

  • Alibaba Cloud Linux 2 -> Alibaba Cloud Linux 3

To ensure the migration, this machine must have 4G free space on disk and 600M RAM available

需要確保伺服器有4 GiB的系統硬碟可用空間和600 MiB的可用記憶體。

Memory detected: *MiB, required: *MiB

  • x86_64架構伺服器需要總記憶體滿足1.5 GiB。

  • aarch64架構伺服器需要總記憶體滿足2 GiB。

解決方案

  1. 遠端連線ECS執行個體。具體操作,請參見通過密碼或密鑰認證登入Linux執行個體

  2. 清理磁碟空間或者暫停業務程式。

    • 根目錄磁碟空間不足

      可以通過嘗試清理/tmp/var/log來釋放磁碟空間。

      警告

      刪除檔案時,請確保檔案不再需要,避免對您的業務造成影響。

      rm -rf /tmp/*
      rm -rf /var/log/syslog.*    #例如刪除舊的syslog檔案
    • 記憶體不足

      可以先暫停部分業務程式,例如,暫停Java程式或者Nginx進程等來釋放記憶體空間,等遷移完成後再手動拉起被暫停業務進程。

      ps aux | grep nginx   #查看Nginx進程PID
      kill -SIGSTOP <nginx-pid>   #暫停Nginx進程
  3. 問題排查解決後,運行SMC用戶端再試。具體操作,請參見運行SMC用戶端

  4. 如果暫停了進程,手動拉起被暫停業務進程。

    以拉起Nginx進程為例。

    kill -SIGCONT <nginx-pid>