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 - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-30-2015, 12:23 AM   #31
vpp
Member
 
Registered: Apr 2015
Posts: 62

Original Poster
Rep: Reputation: Disabled

Hello,
I tried the amd64 version of Gparted and to my surprise I found a function called Rescue in some menu.

However, when I selected it and pressed OK, the system froze. Something was still running, the real time was updated at the lower left corner of the graphical screen. After a while, I tried to interrupt and reboot the PC. Then the updates to real time stopped. I didn't know if it worked or not.

I am not sure, if the CD was even ok. There were lots of I/O errors during boot. I will make a new CD and retry.
 
Old 05-01-2015, 11:35 AM   #32
vpp
Member
 
Registered: Apr 2015
Posts: 62

Original Poster
Rep: Reputation: Disabled
Happy Mayday!
I tried with a newer version, maybe 0.22.-1. Also this version has some errors during start-up, but the graphical interface appeared. It is just the behaviour of the program that it does not tell what it is doing. Maybe the earlier version also worked, but I interrupted it.
I let it work overnight and in the morning I found the result:
"The disk scan by gpart did not find any recognizable file systems on this disk."
So, I understand when you remove a disk from LVM, it will be non-recognizable. I have also tried Testdisk and something else, but they haven't found any files either. I suppose nothing else can be done. Thanks for all help you have given.
 
Old 05-01-2015, 11:56 AM   #33
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
You're welcome.

If that is the case then you have to restore it from the backup as that is the only option I can think of. As I mentioned earlier removing and adding disk / partition to LVM would be considered as unallocated space whether you put it or take out.
 
Old 05-02-2015, 03:17 AM   #34
vpp
Member
 
Registered: Apr 2015
Posts: 62

Original Poster
Rep: Reputation: Disabled
Agreed.
There is something mystical in this PC. I guess as long as I run Fedora 10 in it, I cannot use these SATA disks in LVM, but only in the traditional way. I checked the drive connections. IDE disk goes to IDE1 on the mobo. 300GB SATA disk goes to SATA1. 2TB SATA disk goes to SATA2. CD drive goes to SATA4. If something disturbs the OS detection of them, I believe it's the CD drive. We can of course continue this discussion in another group...
 
Old 05-02-2015, 09:14 AM   #35
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Yes, we can have a separate thread for that discussion. You can mark this thread as solved as there is nothing much can be done on this issue.
 
Old 05-02-2015, 12:56 PM   #36
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
Quote:
Originally Posted by T3RM1NVT0R View Post
You can mark this thread as solved as there is nothing much can be done on this issue.
I disagree. This looks like it should be easily recoverable, depending on just what was done to remove the new disk from the volume group and whether any subsequent LVM configuration changes were made. You don't find any filesystem on that disk because the start of LogVol02, and thus the filesystem's primary super block, was on the smaller disk.

LVM doesn't care how the device names change. By default it searches all block devices for PV headers. The device names in the backup and archive files all carry a "# Hint only" comment.

Restoring the LVM configuration to its previous state should be just a matter of running
Code:
vgcfgrestore --file /path/to/the/archive/file VolGroup00
You might have to do that from something newer than Fedora 10. I'm not sure what the state of vgcfgrestore was back then, though I know it was working in Fedora 12. Do read the manpage for vgcfgrestore first, though.

Last edited by rknichols; 05-02-2015 at 12:57 PM.
 
1 members found this post helpful.
Old 05-02-2015, 03:28 PM   #37
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
I think you are missing something here, check the output he pasted for pvs:

Code:
pvs
 ===
 PV VG Fmt Attr PSize PFree 
 /dev/sdb2 VolGroup00 lvm2 a- 232.69G 32.00M
I don't see /dev/sda1 in the list of pvs output, which basically means that pvremove was issued. Once pvremove is issued it will wipe off the data and in that case vgcfgrestore is useless. We have to also keep in mind that pvremove will not be caught in vgcfgrestore archive as it is not about logical pooling / volume.

I do agree with your suggestion that vgcfgrestore is useful for restoring vg / lv information but the scenario here is different.

Last edited by T3RM1NVT0R; 05-02-2015 at 03:55 PM. Reason: wrote partition instead of volume
 
Old 05-02-2015, 03:36 PM   #38
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ vpp:

Just to confirm, the output of pvs that you shared here is when your other disk (big disk) was connected to the system but wasn't part of LV. Is that correct?
 
Old 05-02-2015, 03:56 PM   #39
vpp
Member
 
Registered: Apr 2015
Posts: 62

Original Poster
Rep: Reputation: Disabled
This is getting interesting. Of course I want to think it is possible to somehow make that big SATA disk once again part of LVM, but the method must be such that there will not be any need to reboot to make the disk contents visible. The actual issue was born after getting the system up with one small IDE disk, one small SATA disk and one bigger SATA disk. After that it was no longer possible to reboot until both SATA disks were taken out of LVM.
I kept the big SATA disk aside, but tested with the smaller one. All I found out was that this PC won't boot, if there is a SATA disk in LVM configuration. Now that SATA disk is part of the file system in traditional way.
During this discussion I have learned that it is also strange that the names of the disks change. They also changed during the tests I made. I don't know how this affects the boot with SATA disks in LVM. I suppose the age of the OS and/or initrd might be the reason/s for this behaviour.
At some point I tried vgcfgrestore only to notice that the command regards most archived LVM configurations invalid. However, of them is exactly the one containing the big SATA disk before removing, but invalid.
 
Old 05-02-2015, 04:00 PM   #40
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Alright lets do this, connect big SATA disk to your system and then share the output of pvs, if pvs shows that there is physical volume on that disk then there are chances of restoring it. If pvs output does not show pv on big SATA disk then there are two things: either you ran pvremove command when you were performing lvremove and vgreduce from rescue mode, or for some reason system is not able to see pv on big SATA disk. In both the cases I don't think data can be recovered.

Edit: Run: pvscan if it doesn't not show up initially in pvs output, if it does not show even after running pvscan then it is not there.

Last edited by T3RM1NVT0R; 05-02-2015 at 04:04 PM. Reason: additional info
 
Old 05-02-2015, 04:04 PM   #41
vpp
Member
 
Registered: Apr 2015
Posts: 62

Original Poster
Rep: Reputation: Disabled
Oh, I forgot to confirm that all these three disks have been connected to the mobo all the time I have had this issue.
Right now the output of pvs is
PV VG Fmt Attr PSize PFree
/dev/sda2 VolGroup00 lvm2 a- 232.69G 32.00M
Probably because I changed the socket of the bigger SATA disk from SATA3 to SATA2. Or maybe the device names just change arbitrarily.
 
Old 05-02-2015, 04:06 PM   #42
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Can you confirm if the result is the same even after running pvscan. I edited my initial post, I guess I wasn't fast enough.
 
Old 05-02-2015, 04:11 PM   #43
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
Quote:
Originally Posted by T3RM1NVT0R View Post
I don't see /dev/sda1 in the list of pvs output, which basically means that pvremove was issued. Once pvremove is issued it will wipe off the data and in that case vgcfgrestore is useless.
I didn't catch that. The pvremove command won't have wiped anything but the PV header, and it just means that one more step needs to be done first:
Code:
pvcreate --uuid sb4SLy-laOq-JGaX-zctr-mtkJ-9Zfb-23gPUB --restorefile /path/to/the/archive/file /dev/sd{X}1
Note that here you must use the device name that matches where the device is attached when you run the command. Now you will have a PV that is consistent with how it was defined before, and you can then run the vgcfgrestore command.

Last edited by rknichols; 05-02-2015 at 04:13 PM.
 
1 members found this post helpful.
Old 05-02-2015, 05:16 PM   #44
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Yes, you are right. I did more testing and was able to get back my pv by using initial uuid (reboot included). Had the wrong impression of the commands pvremove doesn't touch data but pvmove does.

Haven't encountered such scenario, long back I worked on a request to replace a failing disk and if I remember correctly I did pvmove and then pvremove. I was in the impression that direct pvremove will harm the data and that is the reason we get data off the disk first running pvmove and the pvremove.

Thanks for clarifying and pushing me to test this stuff. Glad that learned something new!!
 
Old 05-02-2015, 07:19 PM   #45
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
Now, if it can just help the OP as well, ... .

Yes, pvmove can be deadly, and especially a pvmove that was incorrectly interrupted.

BTW, getting the Fedora 10 boot to see the SATA drive might be as simple as going into the BIOS setup and configuring the SATA interfaces in "Legacy IDE" mode. I'm not at all sure about that 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
LVM issue circus78 Linux - Server 5 12-12-2014 01:32 AM
LVM issue call_krushna Linux - Virtualization and Cloud 0 10-30-2012 10:58 AM
LVM issue AndyD236 Linux - General 2 11-24-2009 07:26 AM
LVM Issue bondoq Linux - General 8 05-12-2009 09:35 AM
LVM issue pauloco Linux - Hardware 1 11-14-2006 11:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:18 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