![磁盘镜像失败的 Xencenter 服务器 - LVM - 我不确定如何继续](https://linux22.com/image/184261/%E7%A3%81%E7%9B%98%E9%95%9C%E5%83%8F%E5%A4%B1%E8%B4%A5%E7%9A%84%20Xencenter%20%E6%9C%8D%E5%8A%A1%E5%99%A8%20-%20LVM%20-%20%E6%88%91%E4%B8%8D%E7%A1%AE%E5%AE%9A%E5%A6%82%E4%BD%95%E7%BB%A7%E7%BB%AD.png)
我继承的运行 Xencenter 的旧服务器遇到了严重问题。 VM 将不再启动并出现 VDI 不可用错误。我开始尽可能多地进行故障排除,但我对 LVM 知之甚少,并且真的不想引起任何其他问题。我希望这里的一些专家能够帮助我或为我指明正确的方向。我了解 Linux 的使用,但是 LVM,我真的不明白我在看下面所示的输出。我需要尝试从卷中获取任何内容并将其移动到 ESX。我正在构建一个新服务器来托管这个特定的虚拟机,并将其放在我更喜欢使用的东西上。
感谢您提出的任何建议,以某种方式安装此组件,甚至是 RO,以便我可以将其复制下来。如果我遗漏了什么,我很抱歉。我真的不确定我在这里看到的是什么,据我所知,其中一个磁盘已损坏,但如果它是镜像,我应该能够以某种方式安装该卷?或者将磁盘映像添加到 nfs 服务器以安装在其他地方???
fdisk -l
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sdc: 640.1 GB, 640135028736 bytes, 1250263728 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
Disk /dev/sda: 640.1 GB, 640135028736 bytes, 1250263728 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: gpt
# Start End Size Type Name
1 46139392 83888127 18G Microsoft basic
2 8390656 46139391 18G Microsoft basic
3 83888128 84936703 512M BIOS boot parti
5 2048 8390655 4G Microsoft basic
6 84936704 87033855 1G Linux swap
Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/VG_XenStorage--17d1d6ae--7b5b--d2e6--ffa9--34f42e56bb48-MGT: 4 MB, 4194304 bytes, 8192 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
fdisk: cannot open /dev/mapper/VG_XenStorage--17d1d6ae--7b5b--d2e6--ffa9--34f42e56bb48-VHD--694760ca--8e18--451b--9c47--8b42922c6a5c-missing_0_0: Input/output error
vgchange-ay
[root@xen1 xenstored]# vgchange -ay
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 0: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 2151686275072: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 2151686332416: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 4096: Input/output error
Couldn't find device with uuid 1nDNEE-3cTf-lq02-Bdj8-xHOu-Qrce-j0leJQ.
Refusing activation of partial LV VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c. Use '--activationmode partial' to override.
2 logical volume(s) in volume group "VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48" now active
[root@xen1 xenstored]# vgchange -ay --activationmode partial
PARTIAL MODE. Incomplete logical volumes will be processed.
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 0: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 2151686275072: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 2151686332416: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 4096: Input/output error
Couldn't find device with uuid 1nDNEE-3cTf-lq02-Bdj8-xHOu-Qrce-j0leJQ.
2 logical volume(s) in volume group "VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48" now active
[root@xen1 xenstored]#
pvscan -v
[root@xen1 xenstored]# pvscan -v
Wiping cache of LVM-capable devices
Wiping internal VG cache
Walking through all physical volumes
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 0: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 2151686275072: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 2151686332416: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 0: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 4096: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 0: Input/output error
/etc/lvm/cache/.cache is empty
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 0: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 2151686275072: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 2151686332416: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 0: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 4096: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 0: Input/output error
Couldn't find device with uuid 1nDNEE-3cTf-lq02-Bdj8-xHOu-Qrce-j0leJQ.
There are 1 physical volumes missing.
PV /dev/sdb VG VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48 lvm2 [931.50 GiB / 931.50 GiB free]
PV /dev/sdc VG VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48 lvm2 [596.16 GiB / 596.16 GiB free]
PV /dev/sdd VG VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48 lvm2 [931.50 GiB / 931.50 GiB free]
PV unknown device VG VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48 lvm2 [2.73 TiB / 790.59 GiB free]
Total: 4 [5.13 TiB] / in use: 4 [5.13 TiB] / in no VG: 0 [0 ]
[root@xen1 xenstored]#
猫 /etc/lvm/backup/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48
[root@xen1 xenstored]# cat /etc/lvm/backup/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48
# Generated by LVM2 version 2.02.130(2)-RHEL7 (2015-12-01): Mon Oct 2 17:53:15 2017
contents = "Text Format Volume Group"
version = 1
description = "Created *after* executing '/sbin/lvremove -f /dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-06006f4d-25a9-4b02-a311-f660bc75672f'"
creation_host = "xen1" # Linux xen1 3.10.0+10 #1 SMP Thu Sep 22 12:31:44 UTC 2016 x86_64
creation_time = 1506991995 # Mon Oct 2 17:53:15 2017
VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48 {
id = "aMkrBC-uWJk-t8aE-OxPE-RYH1-U7F1-VhedHZ"
seqno = 98
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 = "1SiYGv-LHwC-10Iz-2aV8-pHg3-KvC5-f6QQaD"
device = "/dev/sdb" # Hint only
status = ["ALLOCATABLE"]
flags = []
dev_size = 1953525168 # 931.513 Gigabytes
pe_start = 22528
pe_count = 238464 # 931.5 Gigabytes
}
pv1 {
id = "LPdOu2-nmcV-WuOK-sXps-SRoF-faYh-6BiM5M"
device = "/dev/sdc" # Hint only
status = ["ALLOCATABLE"]
flags = []
dev_size = 1250263728 # 596.172 Gigabytes
pe_start = 22528
pe_count = 152617 # 596.16 Gigabytes
}
pv2 {
id = "FVD2cq-j4I5-xvPp-tAdB-1lwa-HglN-hR7M2G"
device = "/dev/sdd" # Hint only
status = ["ALLOCATABLE"]
flags = []
dev_size = 1953525168 # 931.513 Gigabytes
pe_start = 22528
pe_count = 238464 # 931.5 Gigabytes
}
pv3 {
id = "1nDNEE-3cTf-lq02-Bdj8-xHOu-Qrce-j0leJQ"
device = "/dev/sde" # Hint only
status = ["ALLOCATABLE"]
flags = []
dev_size = 5860533168 # 2.72902 Terabytes
pe_start = 22528
pe_count = 715394 # 2.72901 Terabytes
}
}
logical_volumes {
MGT {
id = "wkOhxx-6WJm-vEfK-NM7Q-f8qr-EwN6-bqcbRz"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_host = "localhost"
creation_time = 1485701988 # 2017-01-29 06:59:48 -0800
segment_count = 1
segment1 {
start_extent = 0
extent_count = 1 # 4 Megabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv0", 0
]
}
}
VHD-694760ca-8e18-451b-9c47-8b42922c6a5c {
id = "vY8Q6w-EWXs-d29t-wNSb-oAtf-0KjE-Zz4hdZ"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_host = "xen1"
creation_time = 1486094237 # 2017-02-02 19:57:17 -0800
segment_count = 1
segment1 {
start_extent = 0
extent_count = 513002 # 1.95695 Terabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv3", 0
]
}
}
}
}
[root@xen1 xenstored]#
光伏发电
[root@xen1 xenstored]# pvs
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 0: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 2151686275072: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 2151686332416: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 4096: Input/output error
Couldn't find device with uuid 1nDNEE-3cTf-lq02-Bdj8-xHOu-Qrce-j0leJQ.
PV VG Fmt Attr PSize PFree
/dev/sdb VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48 lvm2 a-- 931.50g 931.50g
/dev/sdc VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48 lvm2 a-- 596.16g 596.16g
/dev/sdd VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48 lvm2 a-- 931.50g 931.50g
unknown device VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48 lvm2 a-m 2.73t 790.59g
[root@xen1 xenstored]#
lvs-v
[root@xen1 xenstored]# lvs -v
Using logical volume(s) on command line.
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 0: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 2151686275072: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 2151686332416: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 0: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 4096: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 0: Input/output error
Found same device /dev/sdb with same pvid 1SiYGvLHwC10Iz2aV8pHg3KvC5f6QQaD
Found same device /dev/sdc with same pvid LPdOu2nmcVWuOKsXpsSRoFfaYh6BiM5M
Found same device /dev/sdd with same pvid FVD2cqj4I5xvPptAdB1lwaHglNhR7M2G
/etc/lvm/cache/.cache is empty
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 0: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 2151686275072: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 2151686332416: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 0: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 4096: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 0: Input/output error
Couldn't find device with uuid 1nDNEE-3cTf-lq02-Bdj8-xHOu-Qrce-j0leJQ.
There are 1 physical volumes missing.
There are 1 physical volumes missing.
LV VG #Seg Attr LSize Maj Min KMaj KMin Pool Origin Data% Meta% Move Cpy%Sync Log Convert LV UUID LProfile
MGT VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48 1 -wi-a----- 4.00m -1 -1 253 0 wkOhxx-6WJm-vEfK-NM7Q-f8qr-EwN6-bqcbRz
VHD-694760ca-8e18-451b-9c47-8b42922c6a5c VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48 1 -wi-a---p- 1.96t -1 -1 253 2 vY8Q6w-EWXs-d29t-wNSb-oAtf-0KjE-Zz4hdZ
[root@xen1 xenstored]#
** 编辑 ** 添加一些 xen 故障排除,此处显示许多相同的信息和错误消息。我已经阅读了删除 SR 并重新扫描的帖子,但我认为我的问题比这更严重..
[root@xen1 xenstored]# xe vm-start vm="Windows Server 2012 R2 (64-bit)"
Error code: SR_BACKEND_FAILURE_46
Error parameters: , The VDI is not available [opterr=Command ['/sbin/lvchange', '-ay', '/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c'] failed (5): /dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 0: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 2151686275072: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 2151686332416: Input/output error
/dev/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c: read failed after 0 of 4096 at 4096: Input/output error
Couldn't find device with uuid 1nDNEE-3cTf-lq02-Bdj8-xHOu-Qrce-j0leJQ.
Refusing activation of partial LV VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48/VHD-694760ca-8e18-451b-9c47-8b42922c6a5c. Use '--activationmode partial' to override.],
[root@xen1 xenstored]# list_domains
id | uuid | state
0 | 5947d140-648b-438b-96e3-b167c0fa5edd | R
[root@xen1 xenstored]# xe vm-disk-list uuid=5947d140-648b-438b-96e3-b167c0fa5edd
Error: No matching VMs found
[root@xen1 xenstored]#
并试图强制电源状态
[root@xen1 xenstored]# list_domains
id | uuid | state
0 | 5947d140-648b-438b-96e3-b167c0fa5edd | R
[root@xen1 xenstored]# xe vm-disk-list uuid=5947d140-648b-438b-96e3-b167c0fa5edd
Error: No matching VMs found
[root@xen1 xenstored]# xe vm-list
uuid ( RO) : a1a34843-beeb-e570-fef8-ada496efbb73
name-label ( RW): Windows Server 2012 R2 (64-bit)
power-state ( RO): halted
uuid ( RO) : 5947d140-648b-438b-96e3-b167c0fa5edd
name-label ( RW): Control domain on host: xen1
power-state ( RO): running
[root@xen1 xenstored]# xe vm-reset-powerstate force=true vm="Windows Server 2012 R2 (64-bit)"
[root@xen1 xenstored]# xe vm-list
uuid ( RO) : a1a34843-beeb-e570-fef8-ada496efbb73
name-label ( RW): Windows Server 2012 R2 (64-bit)
power-state ( RO): halted
uuid ( RO) : 5947d140-648b-438b-96e3-b167c0fa5edd
name-label ( RW): Control domain on host: xen1
power-state ( RO): running
[root@xen1 xenstored]#
答案1
看起来好像缺少磁盘:
- 在您的
vgchange
命令中,LVM 抱怨设备1nDNEE-3cTf-lq02-Bdj8-xHOu-Qrce-j0leJQ
丢失。 - 在您的
/etc/lvm/backup/VG_XenStorage-17d1d6ae-7b5b-d2e6-ffa9-34f42e56bb48
文件中,我们可以看到丢失的设备存储在/dev/sde
磁盘中 - 您
fdisk -l
没有报告任何/dev/sde
设备。
就这样 ...