Operating System - HP-UX
1834479 Members
3482 Online
110067 Solutions
New Discussion

Hard disk information recovery.

 
SOLVED
Go to solution
Alfonso_4
Advisor

Hard disk information recovery.

Is there a way to recover information of a hard disk when I previously deleted it's volume group? Is it possible to recover the last configuration of the disk?
I will appreciate any help.
Thanks.
13 REPLIES 13
Patrick Wallek
Honored Contributor
Solution

Re: Hard disk information recovery.

You could always try doing a vgimport. If the disk was the ONLY disk in the volume group then there is a pretty good chance it will work. If there was more than 1 disk in the VG and you are just trying to import 1, then it may not work.

Try these steps (I am using vg02 as an example, use whatever VG name and minor number is appropriate for your site):

# cd /dev
# mkdir vg02
# mknod vg02/group c 64 0x020000

(I am using /dev/dsk/c1t2d0 as an example -- again use whatever is appropriate in your case)

# vgimport -v /dev/vg02 /dev/dsk/c1t2d0

If it works you should get a list of LVOLs that were on the disk labeled starting with lvol1.

You can now activate the VG and mount the LVOLs.

# vgchange -a y vg02
# mount /dev/vg02/lvol1 /mnt

Good luck.
Joseph Loo
Honored Contributor

Re: Hard disk information recovery.

hi,

when u mention delete, did you rm everything or pvremove the whole disk?

if u have done the above, it is quite impossible to recover anything from the disk unless you have backup before the deletion.

regards.
what you do not see does not mean you should not believe
Dani Seely
Valued Contributor

Re: Hard disk information recovery.

Sorry, I believe only a restore can get this back. I'd love to learn otherwise, I'll continue to check back.
Together We Stand!
Michael Tully
Honored Contributor

Re: Hard disk information recovery.

Patrick's suggestion will work depending on how the volume group was removed. It it was just:

# vgexport /dev/myvg
then you have a good chance of recovery.

If you did this, then no.

# lvremove /dev/myvg/mylvol
# vgreduce .....
# vgremove .....
Anyone for a Mutiny ?
lawrenzo
Trusted Contributor

Re: Hard disk information recovery.

look at vgcfgrestore on the man pages,

I believe LVM will backup the header and then be replaced once the command has run.

try vgcfgrestore VGXX

If the disk is mirrored then run vgsync
hello
Alfonso_4
Advisor

Re: Hard disk information recovery.

Thanks for your help guys!
I tried patrick's suggestion, but this was the result:

# mkdir vg01
# mknod vg01/group c 64 0x010000
# vgimport -v /dev/vg01 /dev/dsk/c3t5d0
Beginning the import process on Volume Group "/dev/vg01".
vgimport: Warning: Volume Group contains "0" PVs, "1" specified. Continuing.
vgimport: Quorum not present, or some physical volume(s) are missing.
Volume group "/dev/vg01" has been successfully created.
Warning: A backup of this volume group may not exist on this machine.
Please remember to take a backup using the vgcfgbackup command after activating the volume group.
# vgchange -a y vg01
vgchange: Warning: Couldn't attach to the volume group physical volume "/dev/dsk/c3t5d0":
Cross-device link
vgchange: Warning: couldn't query physical volume "/dev/dsk/c3t5d0":
The specified path does not correspond to physical volume attached to
this volume group
vgchange: Warning: couldn't query all of the physical volumes.
vgchange: Couldn't activate volume group "vg01":
Quorum not present, or some physical volume(s) are missing.

Is there anything else I can do?
Patrick Wallek
Honored Contributor

Re: Hard disk information recovery.

In this case I'd say you are pretty much out of luck. Sorry.
Dani Seely
Valued Contributor

Re: Hard disk information recovery.

Don't know if this would matter or not, but were you in multi-user or single-user mode? Again, just hanging around to learn.
Together We Stand!
Tonya Underwood
Regular Advisor

Re: Hard disk information recovery.

# vgchange -a y vg01
vgchange: Warning: Couldn't attach to the volume group physical volume "/dev/dsk/c3t5d0":
Cross-device link
vgchange: Warning: couldn't query physical volume "/dev/dsk/c3t5d0":
The specified path does not correspond to physical volume attached to
this volume group
vgchange: Warning: couldn't query all of the physical volumes.
vgchange: Couldn't activate volume group "vg01":
Quorum not present, or some physical volume(s) are missing.

Is there anything else I can do?


***********************************

Regarding the above, you do not have quorum present... meaning GREATER THAN 50% of the disks. Here, simply add an option to not require quorum...

# vgchange -a y -q n vg01

Hope this helps!

Tonya Underwood
Alfonso_4
Advisor

Re: Hard disk information recovery.

Thanks Tonya, I tried your suggestion but it didn´t work either:
vgchange -a y -q n vg01
vgchange: Warning: Couldn't attach to the volume group physical volume "/dev/dsk/c3t5d0":
Cross-device link
vgchange: Warning: couldn't query physical volume "/dev/dsk/c3t5d0":
The specified path does not correspond to physical volume attached to
this volume group
vgchange: Warning: couldn't query all of the physical volumes.
vgchange: Couldn't activate volume group "vg01":
Quorum not present, or some physical volume(s) are missing

Dani, I'm in multi-user mode, with the root's account.

Thank you al
Alfonso_4
Advisor

Re: Hard disk information recovery.

Thanks Tonya, I tried your suggestion but it didn´t work either:
vgchange -a y -q n vg01
vgchange: Warning: Couldn't attach to the volume group physical volume "/dev/dsk/c3t5d0":
Cross-device link
vgchange: Warning: couldn't query physical volume "/dev/dsk/c3t5d0":
The specified path does not correspond to physical volume attached to
this volume group
vgchange: Warning: couldn't query all of the physical volumes.
vgchange: Couldn't activate volume group "vg01":
Quorum not present, or some physical volume(s) are missing

Dani, I'm in multi-user mode, with the root's account.

Thank you al
Tonya Underwood
Regular Advisor

Re: Hard disk information recovery.

Regarding the cross-device link...

vgcfgrestore -n /dev/vg01 /dev/rdsk/

NOTE THE rdsk not dsk!!!!


Maybe that will help...
Tonya Underwood
Tonya Underwood
Regular Advisor

Re: Hard disk information recovery.

One more thing... if the above does not work...

Does that disk show up in lvmtab under vg01?
If so, run:
vgreduce -l /dev/vg01

If that does not work run:
vgreduce -f /dev/vg01

IF that works, it will tell you the next steps to take!

Let me know if any of this works!

Thanks!
Tonya Underwood