Operating System - HP-UX
1829643 Members
1659 Online
109992 Solutions
New Discussion

Re: i-node edit recovery plan

 
SOLVED
Go to solution
TrustNo1
Regular Advisor

i-node edit recovery plan

This question requires a little background.
We have a filesystem that contains corrupted data in the form of three files.
The "corrupted" filenames appear as /mount/dir1/dir2//mount/dir1/dir2/file1

Note the double // , the actual filename as the system sees it is "/mount/dir1/dir2/file1" the PATH to the file is /mount/dir1/dir2

Anyway, with some HP supplied documentation (we were previously supported), I plan to edit the i-node table tonight to remove these anomalies.

The LV the data is located on is NOT in VG00
It is in a mirrored 50GB LV that is the sole member of VGMAT

Question:
Can I unmirror the lv, do the inode edit, and if something goes awry, use the secondary disks to recover from?
(I DO have a tape backup but it would take hours to restore.)

IE: Can I vgexport AFTER the unmirror. and use the secondarys with vgimport?
OR
Could I place the secondaries where the primarys were and just remount?


You might ask, "How did this happen"?
A new datawarehouse API accessing an older "unsupported" version of the Db.
NO it was not me.......:) God bless the industrious user....

Any suggestions are greatly appreciated.

Thanks , ~jdk
Dare to Dream
5 REPLIES 5
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: i-node edit recovery plan

Actually, all you would need is an lvsplit. Note that you can lvmerge in either direction so that you can easily restore to the previos version AS LONG AS YOU DON'T REBOOT before running lvmerge. Because all the split/merge operations occur at LVOL level as opposed to the filesystem, any changes you make to the filesystem can be easily reversed with lvmerge.

If it ain't broke, I can fix that.
TrustNo1
Regular Advisor

Re: i-node edit recovery plan

Thanks Clay,
After the i-node edit, I need to duplicate the warehouse install on another box.
Would an unmirror, then a VG export, then take the previously mirrored set (along with export file) to the new box for a vgimport work?

Thanks, ~jdk
Dare to Dream
Caesar_3
Esteemed Contributor

Re: i-node edit recovery plan

Hello!

As was sayed the lvsplit will split then you
can do the fix and you can mount the
other lv from the split and continue to work
til you will fix the disk and made marge back.
This way your users will work.

Caesar
A. Clay Stephenson
Acclaimed Contributor

Re: i-node edit recovery plan

Rather than doing it that way, I would unmirror, unmount the filesystems, and do a vgchange -a n of the volume group. Now, do a
dd if=/dev/rdsk/c5t6d0 of=/dev/rdsk/c6t6d0 bs=1024k

(of course set if= and of= to the proper source and destination drives)

for each physical drive in the volume group.
This does assume that the drives are identical in size.

The idea is after unmirroring, we are going to make exact copies of to disks to the former mirror physical disks. You can then remove the copies and do a vgimport on the new box.

You can then activate the vg on both boxes and mount the filesystems.

WARNING: This approach does leave you with a mirror on either box so you need to mirror them to additional drives ASAP.

If it ain't broke, I can fix that.
TrustNo1
Regular Advisor

Re: i-node edit recovery plan

Mr. Stephenson,
You are the GREATEST!

Thanks again!!
~jdk
Dare to Dream