Show Table of Contents
4.3.14. 將卷冊群組移至另一部系統
您可將整個 LVM 卷冊群組移至另一部系統上。我們建議您使用
vgexport 和 vgimport 指令來這麼作。
vgexport 指令會使得系統無法存取一個未啟用的卷冊群組,這能讓您將它的實體卷冊拆卸。vgimport 指令會使得卷冊群組在由 vgexport 指令使其停用後能再次地被系統存取。
若要將卷冊群組由一部系統移至另一部系統,請執行下列步驟:
- 請確認沒有用戶正在存取卷冊群組中啟用中卷冊上的檔案,然後再將邏輯卷冊卸載。
- 請使用
vgchange指令的-a n引數來將卷冊群組標記為停用,這可避免在卷冊群組上再有任何活動進行。 - 請使用
vgexport指令來匯出卷冊群組。這可避免它被您要從之移除的系統存取它。當您匯出了卷冊群組後,當您執行pvscan指令時,實體卷冊便會顯示在一個已匯出的卷冊群組中。#
pvscanPV /dev/sda1 is in exported VG myvg [17.15 GB / 7.15 GB free] PV /dev/sdc1 is in exported VG myvg [17.15 GB / 15.15 GB free] PV /dev/sdd1 is in exported VG myvg [17.15 GB / 15.15 GB free] ...當系統關閉後,您便可將構成卷冊群組的磁碟拔除然後將它們連接至新的系統上。 - 當磁碟被插入新的系統上時,請使用
vgimport指令來匯入卷冊群組,並使新的系統能夠存取它。 - 請使用
vgchange指令的-a y引數來啟用卷冊群組。 - 掛載檔案系統來使它能被使用。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.