Vsphere vcenter环境 6.5
环境异常关闭后,启动一虚拟机发现报错
进入修复阶段
1 进入单用户模式,执行命令--不行
2 进入紧急模式--不行
3 光盘修复--不行
4 --数据拷贝
vmware 启动、修复失败,数据拷贝方案
1 卸载原有虚拟机的硬盘,记住存储的位置
2 创建新的虚拟机,添加现有的硬盘2
3 启动新的虚拟机,并挂载原因的硬盘2
[root@localhost ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 50G 0 disk ├─sda1 8:1 0 1G 0 part /boot └─sda2 8:2 0 49G 0 part ├─centos00-root 253:0 0 44G 0 lvm / └─centos00-swap 253:1 0 5G 0 lvm [SWAP] sdb 8:16 0 100G 0 disk ├─sdb1 8:17 0 1G 0 part └─sdb2 8:18 0 99G 0 part sr0 11:0 1 1024M 0 rom [root@localhost ~]# df -Th Filesystem Type Size Used Avail Use% Mounted on /dev/mapper/centos00-root xfs 44G 1.3G 43G 3% / devtmpfs devtmpfs 3.9G 0 3.9G 0% /dev tmpfs tmpfs 3.9G 0 3.9G 0% /dev/shm tmpfs tmpfs 3.9G 9.0M 3.9G 1% /run tmpfs tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup /dev/sda1 xfs 1014M 148M 867M 15% /boot tmpfs tmpfs 783M 0 783M 0% /run/user/0 [root@localhost ~]# mkdir /olddata [root@localhost ~]# mount /dev/sdb2 /olddata/ mount: unknown filesystem type 'LVM2_member' [root@localhost ~]# pvs PV VG Fmt Attr PSize PFree /dev/sda2 centos00 lvm2 a-- <49.00g 0 /dev/sdb2 centos lvm2 a-- <99.00g 4.00m [root@localhost ~]# vgs VG #PV #LV #SN Attr VSize VFree centos 1 3 0 wz--n- <99.00g 4.00m centos00 1 2 0 wz--n- <49.00g 0 [root@localhost ~]# lvdisplay --- Logical volume --- LV Path /dev/centos00/swap LV Name swap VG Name centos00 LV UUID RtTbc9-90DU-he1U-Ozuv-HeeX-E7bh-eYjSuA LV Write Access read/write LV Creation host, time localhost.localdomain, 2023-03-16 04:38:22 -0400 LV Status available # open 2 LV Size 5.00 GiB Current LE 1280 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 8192 Block device 253:1 --- Logical volume --- LV Path /dev/centos00/root LV Name root VG Name centos00 LV UUID M0BW0v-hl1h-4WMW-PzW6-1Hkc-yTCo-ggm1D0 LV Write Access read/write LV Creation host, time localhost.localdomain, 2023-03-16 04:38:22 -0400 LV Status available # open 1 LV Size <44.00 GiB Current LE 11263 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 8192 Block device 253:0 --- Logical volume --- LV Path /dev/centos/swap LV Name swap VG Name centos LV UUID p3ZwnD-rp4W-nq2S-qYoL-eOBf-PSwJ-hCxhHd LV Write Access read/write LV Creation host, time localhost, 2022-02-09 20:32:12 -0500 LV Status NOT available LV Size <7.88 GiB Current LE 2016 Segments 1 Allocation inherit Read ahead sectors auto --- Logical volume --- LV Path /dev/centos/home LV Name home VG Name centos LV UUID hI3bJH-1AFw-BTQ7-b8x8-Www3-tRMu-d6pIxM LV Write Access read/write LV Creation host, time localhost, 2022-02-09 20:32:13 -0500 LV Status NOT available LV Size <41.12 GiB Current LE 10526 Segments 1 Allocation inherit Read ahead sectors auto --- Logical volume --- LV Path /dev/centos/root LV Name root VG Name centos LV UUID TeD01q-dnKZ-RcN2-ww3Y-yFIR-hNma-plMOEt LV Write Access read/write LV Creation host, time localhost, 2022-02-09 20:32:14 -0500 LV Status NOT available >>不可用 LV Size 50.00 GiB Current LE 12800 Segments 1 Allocation inherit Read ahead sectors auto [root@localhost ~]# vgchange -ay /dev/centos 3 logical volume(s) in volume group "centos" now active [root@localhost ~]# mount /dev/sdb2 /olddata/ mount: unknown filesystem type 'LVM2_member' [root@localhost ~]# mount /dev/centos/root /olddata/ [root@localhost olddata]# mkdir /oldhome [root@localhost olddata]# mount /dev/centos/home /oldhome/ [root@localhost olddata]# ll /oldhome/ total 0 [root@localhost ~]# df -Th Filesystem Type Size Used Avail Use% Mounted on /dev/mapper/centos00-root xfs 44G 1.3G 43G 3% / devtmpfs devtmpfs 3.9G 0 3.9G 0% /dev tmpfs tmpfs 3.9G 0 3.9G 0% /dev/shm tmpfs tmpfs 3.9G 9.0M 3.9G 1% /run tmpfs tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup /dev/sda1 xfs 1014M 148M 867M 15% /boot tmpfs tmpfs 783M 0 783M 0% /run/user/0 /dev/mapper/centos-root xfs 50G 14G 37G 27% /olddata /dev/mapper/centos-home xfs 42G 65M 42G 1% /oldhome
数据正式挂载成功,后期可以最大的还原数据
标签:olddata,Vsphere,--,虚拟机,dev,tmpfs,root,localhost,3.9 From: https://www.cnblogs.com/yhq1314/p/17237067.html