2

We had a hard disc crash of one of two hard discs in a software raid with a LVM on top.

The server is running Citrix xenserver.

On the hard disk which is still intact, the volume group gets detected well, but only one LV is left. (some hashes replaced by "x")

# lvdisplay 
  --- Logical volume ---
  LV Name                /dev/VG_XenStorage-x-x-x-x-408b91acdcae/MGT
  VG Name                VG_XenStorage-x-x-x-x-408b91acdcae
  LV UUID                x-x-x-x-x-x-vQmZ6C
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                4.00 MiB
  Current LE             1
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
root@rescue ~ # vgdisplay 
  --- Volume group ---
  VG Name               VG_XenStorage-x-x-x-x-408b91acdcae
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               698.62 GiB
  PE Size               4.00 MiB
  Total PE              178848
  Alloc PE / Size       1 / 4.00 MiB
  Free  PE / Size       178847 / 698.62 GiB
  VG UUID               x-x-x-x-x-x-53w0kL

I could understand if a full physical volume is lost - but why only the logical volumes?

Is there any explanation for this?

Is there any way to recover the logical volumes?

EDIT We are here in a rescue system. The problem is that the whole server does not boot (GRUB error 22)

What we are trying to do is to access the root filesystem. But everything was in the LVM.

We have only this:

(parted) print                                                            
Model: ATA SAMSUNG HD753LJ (scsi)
Disk /dev/sdb: 750GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End    Size   Type     File system  Flags
 1      32.3kB  750GB  750GB  primary               boot, lvm

And this 750GB LVM volume is exactly what we see on top.

edit2

Output of vgcfgrestore, but from the rescue system, as there is no root to chroot to.

# vgcfgrestore --list VG_XenStorage-x-b4b0-x-x-408b91acdcae

  File:     /etc/lvm/archive/VG_XenStorage-x-x-x-x-408b91acdcae_00000.vg
  VG name:      VG_XenStorage-x-x-x-x-408b91acdcae
  Description:  Created *before* executing '/sbin/vgscan --ignorelockingfailure --mknodes'
  Backup Time:  Fri Jun 28 23:53:20 2013


  File:     /etc/lvm/backup/VG_XenStorage-x-x-x-x-408b91acdcae
  VG name:      VG_XenStorage-x-x-x-x-408b91acdcae
  Description:  Created *after* executing '/sbin/vgscan --ignorelockingfailure --mknodes'
  Backup Time:  Fri Jun 28 23:53:20 2013
Alex
  • 476
  • 13
  • 35
  • 1
    You appear to be running a rescue CD of some sort. chroot into your filesystem, and then run `vgcfgrestore --list VG_XenStorage-x-x-x-x-408b91acdcae`, then paste the output here. – Michael Hampton Jun 29 '13 at 01:12
  • edited the question. That filesystem is not accessible ... Another thing: I know about `vgcfgrestore` - does it also restore LV config or only VG config? The point is that the LV config is somehow valid; just all the LVs are lost. Maybe they just got deleted (by a hacker???) but this would be a strange coincidence as there was definitely a hardware defect. – Alex Jun 29 '13 at 06:32
  • So what was the output from that command? I don't see it anywhere in your edit. – Michael Hampton Jun 29 '13 at 15:10
  • Oh OK, the root is missing. I get it now. Not enough coffee... You might be out of luck. – Michael Hampton Jun 29 '13 at 15:18
  • `Metadata Sequence No 4` means that it is an almost freshly created volume group (this counter is incremented on every operation which changes the LVM metadata, such as creating or removing an LV). Therefore either the VG was recreated somehow, or your RAID mirroring did not actually work at all (BTW, how your software RAID was set up — using Linux MD, or something like dmraid?). – Sergey Vlasov Jun 29 '13 at 20:28

0 Answers0