LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-01-2017, 09:47 AM   #1
rbaevergreen
LQ Newbie
 
Registered: Jul 2017
Posts: 1

Rep: Reputation: Disabled
Trying to restore LVM configuration


I deleted a partition that was a physical volume part of a volume group. I also tried at the same time to expand a logical volume.

I try to restore but get errors:

[root@server ~]# pvcreate --restorefile /etc/lvm/archive/vg_nas_00037-357471831.vg --uuid UMWCdg-NYnK-5e3B-b4uT-M4ze-AUXH-cva41T /dev/sdc1
Couldn't find device with uuid byRq7r-cGBg-v1Vc-fXbm-GrFt-VzLW-oVjIo9.
Couldn't find device with uuid UMWCdg-NYnK-5e3B-b4uT-M4ze-AUXH-cva41T.
Physical extents end beyond end of device /dev/sdc1.
Format-specific initialisation of physical volume /dev/sdc1 failed.
Failed to setup physical volume "/dev/sdc1"
 
Old 07-01-2017, 12:19 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
That first "Couldn't find device ..." is normal, and expected if the old LVM header on that partition has been overwritten. That "Physical extents end beyond end of device /dev/sdc1" sounds like you re-created that partition with a size smaller than it was previously. In that saved configuration file, look at the "dev_size = ..." line for that partition. Your partition must have at least that number of 512-byte sectors.
 
Old 07-01-2017, 06:49 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
The new partition might be getting megabyte aligned wher it gadn't previously - would explain a small change maybe.
 
Old 07-01-2017, 07:40 PM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
... and of course if you expect to recover the filesystem(s) previously in that PV, you must have the starting location exactly where it was before. If the PV header is still there, you can use hexedit to look for the ASCII string "LABELONE" at the start of a sector, and that would be the 2nd sector of its partition.
 
Old 07-02-2017, 04:56 AM   #5
voleg
Member
 
Registered: Oct 2013
Distribution: RedHat CentOS Fedora SuSE
Posts: 354

Rep: Reputation: 51
And, there are two PVUUID missing, when you restoring only one.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Restore fs from lvm? mabenbein Linux - Desktop 1 09-13-2013 01:38 AM
LVM backup/restore question rakrhn Linux - Server 4 06-28-2009 03:10 PM
Tampered with LVM on Fedora 9: need to restore configuration lonip Linux - Newbie 9 06-19-2009 05:22 PM
how to restore lvm tomes? lindemidux Linux - General 1 07-08-2008 03:09 PM
LXer: Back Up (And Restore) LVM Partitions With LVM Snapshots LXer Syndicated Linux News 0 04-17-2007 11:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration