怎么恢复丢失掉LVM 卷的组?我不能使用vgscan
和 lvmdiskscan
检测到。
我一个老机器系统坏掉了,数据都在上面,然后我重新用了一个新的机器,然后把老机器的硬盘卸载,安装到新机器上面。
我使用vgscan
去检测我的旧的磁盘,但是没有发现任何volume group.
我使用lvmdiskscan
去寻找我的旧的物理磁盘, 但是lvmdiskscan
没有找到它。 下面就是我的 lvmdiskscan
输出结果:
[root@localhost mapper]# lvmdiskscan
/dev/ram0 [ 16.00 MiB]
/dev/loop0 [ 930.53 GiB]
/dev/root [ 50.00 GiB]
/dev/ram1 [ 16.00 MiB]
/dev/sda1 [ 500.00 MiB]
/dev/VolGroup/lv_swap [ 7.05 GiB]
/dev/ram2 [ 16.00 MiB]
/dev/sda2 [ 931.02 GiB]
/dev/VolGroup/lv_home [ 873.97 GiB]
/dev/ram3 [ 16.00 MiB]
/dev/ram4 [ 16.00 MiB]
/dev/ram5 [ 16.00 MiB]
/dev/ram6 [ 16.00 MiB]
/dev/ram7 [ 16.00 MiB]
/dev/ram8 [ 16.00 MiB]
/dev/ram9 [ 16.00 MiB]
/dev/ram10 [ 16.00 MiB]
/dev/ram11 [ 16.00 MiB]
/dev/ram12 [ 16.00 MiB]
/dev/ram13 [ 16.00 MiB]
/dev/ram14 [ 16.00 MiB]
/dev/ram15 [ 16.00 MiB]
/dev/sdb1 [ 500.00 MiB]
/dev/sdb2 [ 931.02 GiB] LVM physical volume
3 disks
20 partitions
0 LVM physical volume whole disks
1 LVM physical volume
lvmdiskscan
只能发现LVM physical volume
, 是我新的机器的 lvm
它是, /dev/sdb2
.
下面是 fdisk -l
的输出结果:
[root@localhost mapper]# fdisk -l
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x2cbfcf8a
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 121602 976248832 8e Linux LVM
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xe8a4e8a4
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sdb2 64 121602 976248832 8e Linux LVM
Disk /dev/mapper/VolGroup-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
/dev/sda2
是我的旧的磁盘的 lvm
。
这里有一些操作建议,你可以试试:
https://superuser.com/questio...
另外一个思路是找一个能启动的Ubuntu 的Live CD, 系统启动时会扫描加载分区, 你可以试试.