0

I have a raspberry Pi 4 NAS with 4 externals HDDs connected to it, which are formatted using LVM2, and OpenMediaVault installed on the RP4. After moving to a new apartment, I tried restarting the NAS but I found one of the drives is dead now (maybe bumped too much during transit). Plugging the single drive in, the drive will sometimes show up under lsblk and sometimes not. Attempting to run commands like smartctl, lvs, fsck, etc. hang because the drive is unresponsive. So the drive is dead. When I set up the LVM2 partitions, I setup a mirrored volume of the primary one

Heres the output of pvdisplay -m after issuing vgchange --activate y --partial Main

  WARNING: Couldn't find device with uuid 1agTwi-tGTi-Zs59-sSaa-dBrT-s2AI-9iyRe5.
  WARNING: VG Main is missing PV 1agTwi-tGTi-Zs59-sSaa-dBrT-s2AI-9iyRe5 (last written to /dev/sda).
  --- Physical volume ---
  PV Name               /dev/sda
  VG Name               Main
  PV Size               465.73 GiB / not usable 4.00 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              119226
  Free PE               0
  Allocated PE          119226
  PV UUID               3Ss27s-5VhO-7Bul-Fk1G-Ar2C-M8eZ-uqQpEa
   
  --- Physical Segments ---
  Physical extent 0 to 119225:
    Logical volume  /dev/Main/mainlv_rimage_1
    Logical extents 715382 to 834607
   
  --- Physical volume ---
  PV Name               /dev/sde
  VG Name               Main
  PV Size               931.48 GiB / not usable 0   
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              238459
  Free PE               0
  Allocated PE          238459
  PV UUID               bxxLkf-pdOc-9WfT-ink5-XIlC-o8Nf-OcNmMm
   
  --- Physical Segments ---
  Physical extent 0 to 238458:
    Logical volume  /dev/Main/mainlv_rimage_1
    Logical extents 476923 to 715381
   
  --- Physical volume ---
  PV Name               [unknown]
  VG Name               Main
  PV Size               <3.64 TiB / not usable <3.84 MiB
  Allocatable           yes 
  PE Size               4.00 MiB
  Total PE              953861
  Free PE               7086
  Allocated PE          946775
  PV UUID               1agTwi-tGTi-Zs59-sSaa-dBrT-s2AI-9iyRe5
   
  --- Physical Segments ---
  Physical extent 0 to 0:
    Logical volume  /dev/Main/mainlv_rmeta_0
    Logical extents 0 to 0
  Physical extent 1 to 886047:
    Logical volume  /dev/Main/mainlv_rimage_0
    Logical extents 0 to 886046
  Physical extent 886048 to 937486:
    Logical volume  /dev/Main/mainlv_rimage_1
    Logical extents 834608 to 886046
  Physical extent 937487 to 942130:
    Logical volume  /dev/Main/mainlv_rimage_0
    Logical extents 886047 to 890690
  Physical extent 942131 to 946774:
    Logical volume  /dev/Main/mainlv_rimage_1
    Logical extents 886047 to 890690
  Physical extent 946775 to 953860:
    FREE
   
  --- Physical volume ---
  PV Name               /dev/sdc
  VG Name               Main
  PV Size               <1.82 TiB / not usable 0   
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              476924
  Free PE               0
  Allocated PE          476924
  PV UUID               gGktd6-W4Ae-TM73-UueM-lKRW-scgP-PxP6q2
   
  --- Physical Segments ---
  Physical extent 0 to 0:
    Logical volume  /dev/Main/mainlv_rmeta_1
    Logical extents 0 to 0
  Physical extent 1 to 476923:
    Logical volume  /dev/Main/mainlv_rimage_1
    Logical extents 0 to 476922

The physical volume thats dead (PV Name [unknown]) has pieces from both logical volumes, but the pieces is has from the image volume /dev/Main/mainlv_rimage_1 are small.

Is it possible to recover the data lost from the failed physical volume using the image volumes on the other drives?

shanedrum
  • 101
  • You should try clone the drive using HDDSuperClone or ddrescue. But this may be too late in which case a data recovery lab may be able to help you. Also see https://superuser.com/questions/241817/how-do-i-recover-lost-inaccessible-data-from-my-storage-device – Joep van Steen Mar 29 '23 at 19:23

0 Answers0