Comments on: Recover LVM Volume Groups and Logical Volumes WITHOUT Backups http://blog.adamsbros.org/2009/05/30/recover-lvm-volume-groups-and-logical-volumes-without-backups/ Tue, 25 Apr 2017 14:19:45 +0000 hourly 1 https://wordpress.org/?v=5.2.2 By: Dave http://blog.adamsbros.org/2009/05/30/recover-lvm-volume-groups-and-logical-volumes-without-backups/comment-page-1/#comment-85970 Tue, 25 Apr 2017 14:19:45 +0000 http://blog.adamsbros.org/?p=7#comment-85970 This method also worked beautifully for me. My bacon was well and truly saved! Thank you!

]]>
By: Basudev Roy Choudhury http://blog.adamsbros.org/2009/05/30/recover-lvm-volume-groups-and-logical-volumes-without-backups/comment-page-1/#comment-63613 Sat, 22 Oct 2016 11:14:07 +0000 http://blog.adamsbros.org/?p=7#comment-63613 Hi I am using Iomega storecenter IX2 with 500GB RAID1. One day suddenly when the NAS box bootup, there is no data only default folders. I can access the HDD through NAS but there is no previous data. I don’t know how it happens. I took out the HDD and connect to aubunto pc and ran the commands. Please find the results below: If any one can advice me to get back the data.

500gb DISK2

root@basudev-UBUNTU:~# pvs -v
PV VG Fmt Attr PSize PFree DevSize PV UUID
/dev/sda5 ubuntu-vg lvm2 a– 297.61g 0 297.61g qzhOzn-YgK6-CFCH-d2oG-2dBi-PBZp-eSoOfY
/dev/sdb2 md1_vg lvm2 a– 464.79g 0 464.79g kKyZKa-h4dJ-zm6T-t8vi-93c5-Cl9Q-BmO092

root@basudev-UBUNTU:~# vgdisplay -v

— Volume group —
VG Name md1_vg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 464.79 GiB
PE Size 2.00 MiB
Total PE 237971
Alloc PE / Size 237971 / 464.79 GiB
Free PE / Size 0 / 0
VG UUID niI7Ih-8J1c-DUNj-ujxu-BURc-EzLG-zw3Ncj

root@basudev-UBUNTU:~# lvdisplay

— Logical volume —
LV Path /dev/md1_vg/md1vol1
LV Name md1vol1
VG Name md1_vg
LV UUID AhwrYy-Uutm-haZn-MZtE-g1OI-sTG8-XjeQvK
LV Write Access read/write
LV Creation host, time ,
LV Status available
# open 1
LV Size 464.79 GiB
Current LE 237971
Segments 1
Allocation inherit
Read ahead sectors auto
– currently set to 256
Block device 252:1

root@basudev-UBUNTU:~# pvck -d -v /dev/sdb2
Scanning /dev/sdb2
Found label on /dev/sdb2, sector 1, type=LVM2 001
Found text metadata area: offset=4096, size=192512

root@basudev-UBUNTU:~# hexedit /dev/sdb2

00000200 4C 41 42 45 4C 4F 4E 45 01 00 00 00 00 00 00 00 LABELONE……..
00000210 3C C3 D7 9B 20 00 00 00 4C 56 4D 32 20 30 30 31 <… …LVM2 001
00000220 6B 4B 79 5A 4B 61 68 34 64 4A 7A 6D 36 54 74 38 kKyZKah4dJzm6Tt8
00000230 76 69 39 33 63 35 43 6C 39 51 42 6D 4F 30 39 32 vi93c5Cl9QBmO092
00000240 00 00 7B 32 74 00 00 00 00 00 03 00 00 00 00 00 ..{2t………..

root@basudev-UBUNTU:~# vgchange -ay
2 logical volume(s) in volume group "ubuntu-vg" now active
1 logical volume(s) in volume group "md1_vg" now active

]]>
By: Joe http://blog.adamsbros.org/2009/05/30/recover-lvm-volume-groups-and-logical-volumes-without-backups/comment-page-1/#comment-50125 Sun, 30 Aug 2015 21:48:57 +0000 http://blog.adamsbros.org/?p=7#comment-50125 Thanks for this discussion – reading this let me know that recovery was a possibility, thus saving my weekend. Much appreciated.

]]>
By: Brian http://blog.adamsbros.org/2009/05/30/recover-lvm-volume-groups-and-logical-volumes-without-backups/comment-page-1/#comment-46437 Wed, 15 Jul 2015 21:45:55 +0000 http://blog.adamsbros.org/?p=7#comment-46437 ^ This worked beautifully. Thanks!

]]>
By: Mark http://blog.adamsbros.org/2009/05/30/recover-lvm-volume-groups-and-logical-volumes-without-backups/comment-page-1/#comment-19153 Mon, 01 Dec 2014 06:32:05 +0000 http://blog.adamsbros.org/?p=7#comment-19153 Thanks, just thanks. I found a disk from 2009 with data I’d long given up hope of recovering, I got the lot back!

]]>
By: JohnnyB http://blog.adamsbros.org/2009/05/30/recover-lvm-volume-groups-and-logical-volumes-without-backups/comment-page-1/#comment-16323 Tue, 18 Nov 2014 20:34:39 +0000 http://blog.adamsbros.org/?p=7#comment-16323 YES! Thank you – I just had the same problem. I think it’s an issue with me multibooting multiple distributions and inconsistent use of lvmetad. I’d seen a few invalid “missing pv” warnings lately but things worked fine. Suddenly during a reboot, I see “removing these pesky missing PVs – you won’t be needing them right?” Funny as it included PVs I’d safely removed about a month ago. And a blank screen as it couldn’t figure out my vol group. Unfortunately I had a lot more PVs and developed a quick script to sort out all my backups. No hex editor or binary calculators are necessary with head -c/tail -c:

# pvck -d -v /dev/sda2 > backups.txt

while IFS=$',' read -r offset size ignored
do
echo ${offset:34}
echo ${size:4}
echo 'tail -c +$offset /dev/sda2 | head -c $size > $offset.txt'
done save_backupus.sh

# Should have a script to save all backups as ./$offset.txt. Inspect it and run.
# Your spacing may vary.

bash ./save_backups.sh

# END
# This should extract all backups from your raw device using tail/head.
# Then it's easier to dig for the correct one.

]]>
By: sydney http://blog.adamsbros.org/2009/05/30/recover-lvm-volume-groups-and-logical-volumes-without-backups/comment-page-1/#comment-3623 Mon, 24 Feb 2014 23:11:59 +0000 http://blog.adamsbros.org/?p=7#comment-3623 Accidently deleted a Logical Volume in the Debian Installer. Chose storage/datastore instead of vgroot/datastore, no questions asked, simply deleted. Live System. No Backups, no Archives.

Well Sir, thank you very much. You might not know how many tears you have saved on the internet with this post.

]]>
By: Stefan http://blog.adamsbros.org/2009/05/30/recover-lvm-volume-groups-and-logical-volumes-without-backups/comment-page-1/#comment-1656 Tue, 05 Nov 2013 05:08:49 +0000 http://blog.adamsbros.org/?p=7#comment-1656 Another system’s data saved! Thank you!

]]>
By: Nagilum http://blog.adamsbros.org/2009/05/30/recover-lvm-volume-groups-and-logical-volumes-without-backups/comment-page-1/#comment-1506 Fri, 11 Jan 2013 22:23:09 +0000 http://blog.adamsbros.org/?p=7#comment-1506 Well really nice (and genious) post. I’ve seen that too late, but anyways I wouldn’t have had the time to dump all my existing Data to another storrage (and didn’t have enough spare-storrage where to copy the data) but I’ll remember it for the next time.
XenServer doesn’t make backup configs (/etc/lvm/archive) of your lvm and if you make a mistake… due to a hand of mistakes and crashed backups we lost 14 days of data (happily over christmas where not much ppl. have worked here). The night nor the days after where very funny.

Regards

]]>
By: Trenton http://blog.adamsbros.org/2009/05/30/recover-lvm-volume-groups-and-logical-volumes-without-backups/comment-page-1/#comment-1427 Fri, 31 Aug 2012 07:36:24 +0000 http://blog.adamsbros.org/?p=7#comment-1427 I would have thought that you should have been able to force a degraded RAID startup. But, who knows, there could be circumstances that prevent that perhaps?

]]>