You must initialize a disk before logical disk manager can access it after is lvm inactive

armanom

New Member
Aug 16, 2023
9
0
1
Hello!
I had a problem, I previously had a Windows server 2016 system on my server, I installed new disks and loaded Proxmox 8 there, everything worked for more than a month. And one day I needed to restore some files on the old system. After starting Windows, I clicked on Disk Management and it asks me you must initialize a disk before logical disk manager can access it, I hastily clicked on Yes. After rebooting and I see that the systems located on the DATA disk do not boot. The disk shows lvm inactive. Then I realized that I erased the partition table... How can I restore functionality?

Details:
root@pve5:~# pveversion -v
proxmox-ve: 8.2.0 (running kernel: 6.8.4-2-pve)
pve-manager: 8.2.2 (running version: 8.2.2/9355359cd7afbae4)
proxmox-kernel-helper: 8.1.0
proxmox-kernel-6.8: 6.8.4-2
proxmox-kernel-6.8.4-2-pve-signed: 6.8.4-2
ceph-fuse: 17.2.7-pve3
corosync: 3.1.7-pve3
criu: 3.17.1-2
glusterfs-client: 10.3-5
ifupdown2: 3.2.0-1+pmx8
ksm-control-daemon: 1.5-1
libjs-extjs: 7.0.0-4
libknet1: 1.28-pve1
libproxmox-acme-perl: 1.5.0
libproxmox-backup-qemu0: 1.4.1
libproxmox-rs-perl: 0.3.3
libpve-access-control: 8.1.4
libpve-apiclient-perl: 3.3.2
libpve-cluster-api-perl: 8.0.6
libpve-cluster-perl: 8.0.6
libpve-common-perl: 8.2.1
libpve-guest-common-perl: 5.1.1
libpve-http-server-perl: 5.1.0
libpve-network-perl: 0.9.8
libpve-rs-perl: 0.8.8
libpve-storage-perl: 8.2.1
libspice-server1: 0.15.1-1
lvm2: 2.03.16-2
lxc-pve: 6.0.0-1
lxcfs: 6.0.0-pve2
novnc-pve: 1.4.0-3
proxmox-backup-client: 3.2.0-1
proxmox-backup-file-restore: 3.2.0-1
proxmox-kernel-helper: 8.1.0
proxmox-mail-forward: 0.2.3
proxmox-mini-journalreader: 1.4.0
proxmox-offline-mirror-helper: 0.6.6
proxmox-widget-toolkit: 4.2.1
pve-cluster: 8.0.6
pve-container: 5.0.10
pve-docs: 8.2.1
pve-edk2-firmware: 4.2023.08-4
pve-esxi-import-tools: 0.7.0
pve-firewall: 5.0.5
pve-firmware: 3.11-1
pve-ha-manager: 4.0.4
pve-i18n: 3.2.2
pve-qemu-kvm: 8.1.5-5
pve-xtermjs: 5.3.0-3
qemu-server: 8.2.1
smartmontools: 7.3-pve1
spiceterm: 3.3.0
swtpm: 0.8.0+pve1
vncterm: 1.8.0
zfsutils-linux: 2.2.3-pve2
----------------------------------
root@pve5:~# ls -l /etc/lvm/archive
total 44
-rw------- 1 root root 936 Aug 22 15:56 DATA_00000-133896217.vg
-rw------- 1 root root 1386 Aug 22 15:56 DATA_00001-1903205959.vg
-rw------- 1 root root 1809 Aug 23 09:21 DATA_00002-875926760.vg
-rw------- 1 root root 2242 Aug 23 09:21 DATA_00003-830213952.vg
-rw------- 1 root root 2676 Aug 23 09:21 DATA_00004-1837955517.vg
-rw------- 1 root root 3110 Aug 23 09:21 DATA_00005-1055152557.vg
-rw------- 1 root root 3538 Aug 28 15:40 DATA_00006-1350761795.vg
-rw------- 1 root root 3971 Aug 28 15:40 DATA_00007-1804075052.vg
-rw------- 1 root root 3474 Aug 22 14:33 pve_00000-1688680760.vg


------------------------------
root@pve5:~# lvscan
ACTIVE '/dev/pve/data' [<319.61 GiB] inherit
ACTIVE '/dev/pve/swap' [8.00 GiB] inherit
ACTIVE '/dev/pve/root' [96.00 GiB] inherit

-------------------------------
root@pve5:~# pvs
PV VG Fmt Attr PSize PFree
/dev/sdb3 pve lvm2 a-- <446.13g 16.00g
--------------------------------
root@pve5:~# vgs
VG #PV #LV #SN Attr VSize VFree
pve 1 3 0 wz--n- <446.13g 16.00g
--------------------------------
root@pve5:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
data pve twi-a-tz-- <319.61g 0.00 0.52
root pve -wi-ao---- 96.00g
swap pve -wi-ao---- 8.00g
-------------------------------
root@pve5:~# nano /etc/lvm/lvm.conf
GNU nano 7.2 /etc/lvm/lvm.conf
# This is an example configuration file for the LVM2 system.
# It contains the default settings that would be used if there was no
# /etc/lvm/lvm.conf file.
#
# Refer to 'man lvm.conf' for further information including the file layout.
#
# Refer to 'man lvm.conf' for information about how settings configured in
# this file are combined with built-in values and command line options to
# arrive at the final values used by LVM.
#
# Refer to 'man lvmconfig' for information about displaying the built-in
# and configured values used by LVM.
#
# If a default value is set in this file (not commented out), then a
# new version of LVM using this file will continue using that value,
# even if the new version of LVM changes the built-in default value.
#
# To put this file in a different directory and override /etc/lvm set
# the environment variable LVM_SYSTEM_DIR before running the tools.
#
# N.B. Take care that each setting only appears once if uncommenting
# example settings in this file.


# Configuration section config.
# How LVM configuration settings are handled.
config {

# Configuration option config/checks.
# If enabled, any LVM configuration mismatch is reported.
# This implies checking that the configuration key is understood by
# LVM and that the value of the key is the proper type. If disabled,
# any configuration mismatch is ignored and the default value is used
# without any warning (a message about the configuration key not being
# found is issued in verbose mode only).
# This configuration option has an automatic default value.
# checks = 1

# Configuration option config/abort_on_errors.
# Abort the LVM process if a configuration mismatch is found.
# This configuration option has an automatic default value.
# abort_on_errors = 0

# Configuration option config/profile_dir.
# Directory where LVM looks for configuration profiles.
# This configuration option has an automatic default value.
# profile_dir = "/etc/lvm/profile"
___________________
Please, help..
 
root@pve5:~# vgcfgrestore --list DATA

File: /etc/lvm/archive/DATA_00000-133896217.vg/DATA_00000-133896217.vg
VG name: DATA
Description: Created *before* executing '/sbin/lvcreate -aly -Wy --yes --size 528k --name vm-100-disk-0 --addtag pve-vm-100 DATA'
Backup Time: Thu Aug 22 15:56:40 2024


File: /etc/lvm/archive/DATA_00001-1903205959.vg/DATA_00001-1903205959.vg
VG name: DATA
Description: Created *before* executing '/sbin/lvcreate -aly -Wy --yes --size 786432000k --name vm-100-disk-1 --addtag pve-vm-100 DATA'
Backup Time: Thu Aug 22 15:56:40 2024


File: /etc/lvm/archive/DATA_00002-875926760.vg/DATA_00002-875926760.vg
VG name: DATA
Description: Created *before* executing '/sbin/lvcreate -aly -Wy --yes --size 528k --name vm-101-disk-0 --addtag pve-vm-101 DATA'
Backup Time: Fri Aug 23 09:21:12 2024


File: /etc/lvm/archive/DATA_00003-830213952.vg/DATA_00003-830213952.vg
VG name: DATA
Description: Created *before* executing '/sbin/lvcreate -aly -Wy --yes --size 536870912k --name vm-101-disk-1 --addtag pve-vm-101 DATA'
Backup Time: Fri Aug 23 09:21:13 2024


File: /etc/lvm/archive/DATA_00004-1837955517.vg/DATA_00004-1837955517.vg
VG name: DATA
Description: Created *before* executing '/sbin/lvcreate -aly -Wy --yes --size 536870912k --name vm-101-disk-2 --addtag pve-vm-101 DATA'
Backup Time: Fri Aug 23 09:21:13 2024


File: /etc/lvm/archive/DATA_00005-1055152557.vg/DATA_00005-1055152557.vg
VG name: DATA
Description: Created *before* executing '/sbin/lvcreate -aly -Wy --yes --size 536870912k --name vm-101-disk-3 --addtag pve-vm-101 DATA'
Backup Time: Fri Aug 23 09:21:13 2024


File: /etc/lvm/archive/DATA_00006-1350761795.vg/DATA_00006-1350761795.vg
VG name: DATA
Description: Created *before* executing '/sbin/lvcreate -aly -Wy --yes --size 528k --name vm-102-disk-0 --addtag pve-vm-102 DATA'
Backup Time: Wed Aug 28 15:40:23 2024


File: /etc/lvm/archive/DATA_00007-1804075052.vg/DATA_00007-1804075052.vg
VG name: DATA
Description: Created *before* executing '/sbin/lvcreate -aly -Wy --yes --size 681574400k --name vm-102-disk-1 --addtag pve-vm-102 DATA'
Backup Time: Wed Aug 28 15:40:24 2024


File: /etc/lvm/backup/DATA/DATA
VG name: DATA
Description: Created *after* executing '/sbin/lvcreate -aly -Wy --yes --size 681574400k --name vm-102-disk-1 --addtag pve-vm-102 DATA'
Backup Time: Wed Aug 28 15:40:24 2024

Will this recovery data be useful?
 
pvscan
PV /dev/sdb3 VG pve lvm2 [<446.13 GiB / 16.00 GiB free]
Total: 1 [<446.13 GiB] / in use: 1 [<446.13 GiB] / in no VG: 0 [0 ]
root@pve5:~# pvesm status
Name Type Status Total Used Available %
DATA lvm inactive 0 0 0 0.00%
local dir active 98497780 30346740 63101492 30.81%
local-lvm lvmthin active 335134720 0 335134720 0.00%
root@pve5:~# blkid
/dev/mapper/pve-root: UUID="8d408bf9-7e0b-4655-a43b-7e6e6434b703" BLOCK_SIZE="40 96" TYPE="ext4"
/dev/nvme0n1p1: LABEL="M-PM-^RM-PM->M-QM-^AM-QM-^AM-QM-^BM-PM-0M-PM-=M-PM->M-PM- 2M-PM-8M-QM-^BM-QM-^L" BLOCK_SIZE="512" UUID="343EF0453EF00222" TYPE="ntfs" PART LABEL="Basic data partition" PARTUUID="693f2cf5-dfaf-42b0-99a7-c35e620a7a2c"
/dev/nvme0n1p4: BLOCK_SIZE="512" UUID="0A3CFADA3CFAC02D" TYPE="ntfs" PARTLABEL=" Basic data partition" PARTUUID="228760eb-f14c-49a2-8850-26d78eeeae33"
/dev/nvme0n1p2: LABEL="ESP" UUID="E2F0-776C" BLOCK_SIZE="512" TYPE="vfat" PARTLA BEL="EFI system partition" PARTUUID="36377d3b-2333-4c82-9831-c2029f78d656"
/dev/sdb2: UUID="5827-0143" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="789efc14-f850 -4364-81ba-0ceeee6630cb"
/dev/sdb3: UUID="5tZmTB-efwg-8nV1-GCww-fgqv-QuNf-8eNmEK" TYPE="LVM2_member" PART UUID="1489afae-4fda-49d6-be85-2f22e44fda71"
/dev/mapper/pve-swap: UUID="5255d35a-032a-48eb-be76-cc26e6652559" TYPE="swap"
/dev/nvme0n1p3: PARTLABEL="Microsoft reserved partition" PARTUUID="8b502cb5-0bd5 -445e-b5e7-452a51375da2"
/dev/sdb1: PARTUUID="7ed9228b-59ee-4a25-91df-4d7e2e3fa786"
/dev/sdc4: LABEL_FATBOOT="AdminPE" LABEL="AdminPE" UUID="B4FE-5315" BLOCK_SIZE=" 512" TYPE="vfat" PARTUUID="cad4ebea-04"
/dev/sda: PTUUID="d9e05e03" PTTYPE="dos"
 
()

Task viewer: VM 102 - Start

OutputStatus

Stop

Download
Volume group "DATA" not found
TASK ERROR: can't activate LV '/dev/DATA/vm-102-disk-1': Cannot process volume group DATA
 
# Generated by LVM2 version 2.03.16(2) (2022-05-18): Wed Aug 28 15:40:24 2024

contents = "Text Format Volume Group"
version = 1

description = "Created *after* executing '/sbin/lvcreate -aly -Wy --yes --size 681574400k --name vm-102-disk-1 --addtag pve-vm-102 DATA'"

creation_host = "pve5" # Linux pve5 6.8.4-2-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.4-2 (2024-04-10T17:36Z) x86_64
creation_time = 1724841624 # Wed Aug 28 15:40:24 2024

DATA {
id = "DdT5al-Sqp1-uWW9-0KcR-mvJy-7XxV-N6kApw"
seqno = 9
format = "lvm2" # informational
status = ["RESIZEABLE", "READ", "WRITE"]
flags = []
extent_size = 8192 # 4 Megabytes
max_lv = 0
max_pv = 0
metadata_copies = 0

physical_volumes {

pv0 {
id = "U1JmOb-2Gip-RoFi-Z0pP-Waqz-uXF6-EmPNhl"
device = "/dev/sda" # Hint only

status = ["ALLOCATABLE"]
flags = []
dev_size = 7501476528 # 3.49315 Terabytes
pe_start = 2048
pe_count = 915707 # 3.49314 Terabytes
}
}

logical_volumes {

vm-100-disk-0 {
id = "nzwei4-AS5J-OaBD-UmK6-edDf-VbEZ-8WnUDX"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
tags = ["pve-vm-100"]
creation_time = 1724324200 # 2024-08-22 15:56:40 +0500
creation_host = "pve5"
segment_count = 1

segment1 {
start_extent = 0
extent_count = 1 # 4 Megabytes

type = "striped"
stripe_count = 1 # linear

stripes = [
"pv0", 0
]
}
}

vm-100-disk-1 {
id = "XIBOTb-YqPs-Q0og-4LRS-qwyb-S3kF-I0hMzP"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
tags = ["pve-vm-100"]
creation_time = 1724324200 # 2024-08-22 15:56:40 +0500
creation_host = "pve5"
segment_count = 1

segment1 {
start_extent = 0
extent_count = 192000 # 750 Gigabytes

type = "striped"
stripe_count = 1 # linear

stripes = [
"pv0", 1
]
}
}

vm-101-disk-0 {
id = "mTQyDl-nnlt-44cU-cezA-OFYV-bS75-DykF3b"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
tags = ["pve-vm-101"]
creation_time = 1724386872 # 2024-08-23 09:21:12 +0500
creation_host = "pve5"
segment_count = 1

segment1 {
start_extent = 0
extent_count = 1 # 4 Megabytes

type = "striped"
stripe_count = 1 # linear

stripes = [
"pv0", 192001
]
}
}

vm-101-disk-1 {
id = "2KWfTE-71b0-H89h-VESG-0BEZ-5yHT-v1CGTh"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
tags = ["pve-vm-101"]
creation_time = 1724386873 # 2024-08-23 09:21:13 +0500
creation_host = "pve5"
segment_count = 1

segment1 {
start_extent = 0
extent_count = 131072 # 512 Gigabytes

type = "striped"
stripe_count = 1 # linear

stripes = [
"pv0", 192002
]
}
}

vm-101-disk-2 {
id = "3WbXZw-4z3w-0MWX-e3TW-kkTP-4jDQ-mGKWxK"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
tags = ["pve-vm-101"]
creation_time = 1724386873 # 2024-08-23 09:21:13 +0500
creation_host = "pve5"
segment_count = 1

segment1 {
start_extent = 0
extent_count = 131072 # 512 Gigabytes

type = "striped"
stripe_count = 1 # linear

stripes = [
"pv0", 323074
]
}
}

vm-101-disk-3 {
id = "UVM6qo-9xM0-BJ3l-aNfc-Rm59-KluC-Nac6Yi"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
tags = ["pve-vm-101"]
creation_time = 1724386873 # 2024-08-23 09:21:13 +0500
creation_host = "pve5"
segment_count = 1

segment1 {
start_extent = 0
extent_count = 131072 # 512 Gigabytes

type = "striped"
stripe_count = 1 # linear

stripes = [
"pv0", 454146
]
}
}

vm-102-disk-0 {
id = "68dQdi-QoPQ-nyuX-PBEM-IuYW-z5aP-t0LUG8"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
tags = ["pve-vm-102"]
creation_time = 1724841623 # 2024-08-28 15:40:23 +0500
creation_host = "pve5"
segment_count = 1

segment1 {
start_extent = 0
extent_count = 1 # 4 Megabytes

type = "striped"
stripe_count = 1 # linear

stripes = [
"pv0", 585218
]
}
}

vm-102-disk-1 {
id = "FaWT0g-n5SH-HrAd-t555-XHp3-Rxe0-5U97AA"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
tags = ["pve-vm-102"]
creation_time = 1724841624 # 2024-08-28 15:40:24 +0500
creation_host = "pve5"
segment_count = 1

segment1 {
start_extent = 0
extent_count = 166400 # 650 Gigabytes

type = "striped"
stripe_count = 1 # linear

stripes = [
"pv0", 585219
]
}
}
}

}
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!