[ale] Recovering PV/LVG without /etc/lvm/archive/file.vg

DjPfulio at jdpfu.com DjPfulio at jdpfu.com
Thu Jun 20 12:47:13 EDT 2024


I'd start with a vgscan and an lvscan before trying anything crazy.

VG names must be unique on a  system. That's always important to remember.


On June 20, 2024 12:40:00 PM EDT, Phil Turmel via Ale <ale at ale.org> wrote:
>Probably.
>
>Copies of the LVM metadata that you find in /etc/ also get written to part of the PV, near the beginning.  If you hex dump the first several megabytes you should find it.
>
>( I've recovered from similar boo-boos this way.  You may find the offset for that backup documented somewhere. )
>
>On 6/19/24 20:59, David Jackson via Ale wrote:
>> The subject says it.  I was installing a new drive and installing a fresh
>> OS onto the new drive, then transporting the old files over to the new
>> drive and OS (ie, /home/dsj)
>> 
>> I had booted from an archlinux ISO, was doing a manual partition.  But then
>> I made a boo boo with the new Logical Volume Group and wanted to blow it
>> away to start over.
>> 
>> My new system was on nvme1n1 and I blew away the PV and LV info for nvme0n1
>> which contained the PV/LV  info for all my previous data.  Very sad senior
>> moment!
>> 
>> Now, since I booted from an arch ISO usb stick, the /etc/lvm/archive files
>> were in volatile memory, so I don't have a copy of them.  When I load up my
>> new system, which I eventually installed just fine (I'm writing this email
>> from that system), everything works great.  But I'd like to recover the old
>> system (that's probably still on nvme0n1 in the second partition, When I
>> boot from the new system on nvme1n1, I can look in /dev/disk/by-uuid/ and
>> see the old PV for nvme0n1 uuid I think:
>> 2f1aede8-a033-4ec4-8c9f-290d7a7c3458
>> 
>> But there's no record for LVs or PVs on nvme0n1 anywhere in
>> /etc/lvm/archive.
>> 
>> Also, whenever I install Arch, I use a script that auto creates the same PV
>> and LV specs on the target drive.  The partition sizes won't have changed.
>> 
>> (Pretty much all the googling I've read assumes that a /etc/lvm/archive/
>> filename.vg exists somewhere. )
>> 
>> Is there any way I can restore the PV/LVG info on nvme0n1 with what I have
>> available?  Without the archive file?
>> 
>> Thanks!
>> 
>> Dave
>
>_______________________________________________
>Ale mailing list
>Ale at ale.org
>https://mail.ale.org/mailman/listinfo/ale
>See JOBS, ANNOUNCE and SCHOOLS lists at
>http://mail.ale.org/mailman/listinfo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.ale.org/pipermail/ale/attachments/20240620/4fad9a0f/attachment.htm>


More information about the Ale mailing list