Proxmox 升級重啟後某個lvm硬碟無法掛載

TASK ERROR: activating LV 'local-4tb/local-4tb' failed:
Activation of logical volume local-4tb/local-4tb is prohibited while logical volume local-4tb/local-4tb_tmeta is active

1.先備份
cp /etc/lvm/lvm.conf /etc/lvm/lvm.backup

2.編輯 nano /etc/lvm/lvm.conf
加以下列
thin_check_options = [ "-q", "--skip-mappings" ]
存檔後執行 update-initramfs -u
重新開機

3.lvchange -a n lvm/lvm_tmeta
lvchange -a n lvm/lvm_tdata
lvchange -ay

例如
lvchange -a n local-4tb/local-4tb_tmeta
lvchange -a n local-4tb/local-4tb_tdata


proxmox 災難回復

如果原來系統的安裝方式是  ext4 local-lvm:
1.用新的硬碟在新的服務器安裝成 zfs
2.將舊硬碟接上.
3.在 web 介面 數據中心->儲存->添加->lvm-thin
先選'卷組', 再選'精簡池'
4.建立虛擬機,
KVM:  到  /etc/pve/qemu-server 底下修改 xxx.conf 成原來硬碟.
LXC:   到  /etc/pve/lxc 底下修改 xxx.conf 成原來硬碟.
5.收工.
-------------------------------------------------------------------------------------------------------------------
1.先用其他硬碟安裝 proxmox
2.將原來硬碟接上, 用新硬碟開機
3.按照這篇文章 , 更改 pve 成 pve_old
更改舊的 vg name
vgs -o name,uuid

如果是ZFS格式, ct 虛擬機檔案在 /rpool/data

PROXMOX 新增第二顆硬碟

SDA is the drive where the proxmox installation is running
SDB is the new drive that will be added to the proxmox.

Open the Proxmox Shell
With fdisk you can find your drives that you want to add, if you are not sure what the device name is for your hard drive that you want to add.

Type: fdisk -l

Find the “Disk" with no valid partition table. That will be probably your hard drive you want to add.

“Disk /dev/sdb doesn’t contain a valid partition table"
To make a partion on the new drive type the following:

Type: cfdisk /dev/sdb

Choose the following options:

New  –>  Primary  –>  Specify size in MB
Write
Quit

Now a physical volume has to be created.

Type: pvcreate /dev/sdb1

Create a volume group. The name “Data-Storage" is an example. You can name it anyway you want. Consider a logical name, because this is the name that will be used in the proxmox web interface:

Type: vgcreate Data-Storage /dev/sdb1

Add the storage in ProxMox
–       In the webinterface click on the directory Datacenter and then click on tab Storage.

–       Click Add – LVM Group

o    Type an ID Name for example data-storage

 

o    Base Storage: Existing Volume Groups

 

o    Volume Group: Data-Storage

 

o    Enabled: Checked
o    Other options should be adjusted accordenly to what you want with it.
Now the extra storage has been added in Proxmox and ready for use.