Some time ago, vps deleted python lib by mistake, and the reinstallation still failed. Finally, we decided to reinstall the system. The previous personal website data was stored on a logical volume. Therefore, when you reinstall the system, you only need to retrieve the partition table.
The following are some operation steps to facilitate future query.
After reinstalling the system, run the following command to search for the volume group. Obtain the name of the previous volume group.
1: [root @ MyVPS ~] # Vgscan
2: Reading all physical volumes. This may take a while...
3: Found volume group "vg" using metadata type lvm2
4: Found volume group "VolGroup0064" using metadata type lvm
Here, we can see that the volume group vg is the volume group that previously stored data.
Next, perform the following operations:
1: [root @ MyVPS ~] # Pvdisplay
2: --- Physical volume ---
3: PV Name/dev/xvdb
4: VG Name vg
5: PV Size 10.00 GB/not usable 4.00 MB
6: Allocatable yes
7: PE Size (KByte) 4096
8: Total PE 2559
9: Free PE 511
10: Allocated PE 2048.
11: pv uuid PpfjU7-X0bY-3naD-FrIb-2CVJ-3zQB-9QmWuq
12:
13: --- Physical volume ---
14: PV Name/dev/xvda2
15: VG Name VolGroup0064
16: PV Size 7.90 GB/not usable 23.41 MB
17: Allocatable yes (but full)
18: PE Size (Kbytes) 32768
19: Total PE 252
20: Free PE 0
21: Allocated PE 252.
22: pv uuid EuF4s3-2IEu-vcFC-yJns-jaUe-dOIs-nteEwS
View the pv of the vg. We can determine that vg is allocated to vg from the/dev/xvdb disk.
Import xvdb to vg.
1: [root @ MyVPS ~] # Vgimport vg
Notify system logical volume group changes
1: [root @ MyVPS ~] # Vgchange-a y
View vgdisplay-v to view the detailed information of vg.
Then mount to the previous mount point and then fsck. This is omitted ......
This article is from the "wangyue Feiyu" blog