Operating System - HP-UX
1829101 Members
2688 Online
109986 Solutions
New Discussion

Restoring entire system with shared vgs

 
hydrocct
Advisor

Restoring entire system with shared vgs

I will be restoring entirely my 2 node Service Guard cluster from backups. The vg00s of each node will be restored from ignite tapes. As for the shared vgs, they will be restored from Netbackup tapes (similar to omniback). The plan is to bring up the cluster in maintenance mode and mount all shared vgs on one node. Before launching the restore of the shared vgs, I must erase the old contents to ensure no unwanted files remain (even if the restore is done with overwrite switch on). My question is how? By doing rm -r * from each shared logical volume mount point?
Guichet DPT
5 REPLIES 5
Patrick Wallek
Honored Contributor

Re: Restoring entire system with shared vgs

The easier way would be to umount each LV, do a newfs on it, and then remount.

That would be MUCH MUCH faster than an 'rm -rf'.

hydrocct
Advisor

Re: Restoring entire system with shared vgs

Will newfs have any impact on mirroring?
Guichet DPT
Prashant Zanwar_4
Respected Contributor

Re: Restoring entire system with shared vgs

Yes newfs will be a good thing in order to erase the entire contents of LV.

you can do it like below: Make sure you want to go ahead:

then:

while read FS | `mount -v | awk '{print $1}'|egrep -v "vg00|floppy|cdrom"`
do
echo $FS
fuser -ku $FS
if [$(fuser -u $fs) -eq ""]; then
umount $FS
newfs -F vxfs -o options $FS
done

You are going to plan outage surely..This is something I thought..hope this helps
Prashant

"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
A. Clay Stephenson
Acclaimed Contributor

Re: Restoring entire system with shared vgs

Running newfs will have no impact on mirroring. Mirroring is done at the logical volume level and is thus completely invisible to the overlying filesystem. In fact, mirroring of raw volumes works as well -- with no filesystem at all.
If it ain't broke, I can fix that.
Prashant Zanwar_4
Respected Contributor

Re: Restoring entire system with shared vgs

As I believe it should be taking care of mirrored LV.

Do the newfs $FS && lvsync $FS

as in this case I am referring to lvol for the file system.

Hope it helps

Thanks
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."