重启后逻辑卷丢失

重启后逻辑卷丢失

Centos-6,系统挂起并硬重启后的 LVM2。

lvdisplay并且lvscan不返回任何卷。它之前有卷...如何恢复?

LV(逻辑卷)上有数据 - 作为 NFS 导出共享。

VG 列在 /etc/lvm/backup/datastore1 下。有什么办法可以恢复LV吗?

vgdisplay  
  -- Volume group --  
  VG Name               datastore1  
  System ID  
  Format                lvm2  
  Metadata Areas        1  
  Metadata Sequence No  1  
  VG Access             read/write  
  VG Status             resizable  
  MAX LV                0  
  Cur LV                0  
  Open LV               0  
  Max PV                0  
  Cur PV                1  
  Act PV                1  
  VG Size               10.92 TiB  
  PE Size               4.00 MiB  
  Total PE              2861467  
  Alloc PE / Size       0 / 0  
  Free  PE / Size       2861467 / 10.92 TiB  
  VG UUID               7uq001-dUxd-I1WS-PPu2-ljT3-FybY-D9ddx2

猫 /etc/lvm/backup/datastore1

datastore1 {
    id = "7uq001-dUxd-I1WS-PPu2-ljT3-FybY-D9ddx2"
    seqno = 2
    status = ["RESIZEABLE", "READ", "WRITE"]
    flags = []
    extent_size = 8192              # 4 Megabytes
    max_lv = 0
    max_pv = 0
    metadata_copies = 0

    physical_volumes {

            pv0 {
                    id = "kRGDrz-YFyf-EIKk-0om6-9H78-jgle-9z0B27"
                    device = "/dev/cciss/c0d1p1"    # Hint only

                    status = ["ALLOCATABLE"]
                    flags = []
                    dev_size = 23441142637  # 10.9156 Terabytes
                    pe_start = 2048
                    pe_count = 2861467      # 10.9156 Terabytes
            }
    }

}

答案1

如果您要从备份文件恢复 LVM 分区方案,您可以尝试:

vgcfgrestore datarestore1

如果一切正常,请尝试通过以下方式激活所有 LV:

vgchange -ay

并对所有卷执行 fsck fsck,例如fsck /dev/datarestore1/XX

如果没有发生错误,请尝试通过以下方式安装它们mount -a

相关内容