Загрузка данных


cd /tmp
grep -a -b -o "Generated by LVM2" mda.bin | cut -d: -f1 > offs.txt
i=0
while read off; do
  i=$((i+1))
  start=$((off-2))
  dd if=mda.bin bs=1 skip=$start count=65536 2>/dev/null \
    | tr -cd '\11\12\40-\176' \
    | awk '{print} /^}$/{exit}' > vg$i.txt
  echo "== vg$i.txt (offset $start)"
  grep -m1 seqno vg$i.txt
  tail -n 1 vg$i.txt
  grep -c "q1m7Hw-Udaq-GSiV-1xY1-SP2R-vJs9-SU22cI" vg$i.txt
  grep -c "logical_volumes" vg$i.txt
done < offs.txt