Option 1 was untested. Presumably, the savevg reads the file on finding it and expects to search the filesystems listed. Maybe creating dummy directories of the required name might get this through, maybe not.
Option 2 requires you to use a few commands:-
cd /
restore �x �f /disaster/datavg.structure
You can then read the files in /tmp/vgdata/datavg to build the structures you need based on the original. A bit of scripting to read in a loop will do it.
Option 3 is perhaps the easiest.
restvg -q -f /disaster/datavg.structure hdisk2 hdisk3
....or whatever disks are appropriate. This will restore the structure of your volume group along with a format and mount of the filesystems assuming that there are no conflicts.
You can then:-
lsvg -l datavg | egrep -v "MOUNT|N\/A|:" | tr -s " " | cut -f7 -d " " | sort -r | xargs -tn 1 umount
For each filesystem you need to change you simply
chfs -m newfs origfs
Then to remount them (first time only)
lsvg -l datavg | egrep -v "MOUNT|N\/A|:" | tr -s " " | cut -f7 -d " " | sort | while read fs
do
if [ ! -d $fs ] # If the mount point does not exist....
then
mkdir $fs # .....create it
fi
mount $fs
done
The loop is done in this way to ensure that all the mount points exist and if there are filesystems mounted under other filesystems that they are all in the right place. There has been many occasions where people would create filesystems such as:-
/a
/a/b
/a/c
/a/d
... creating the mount points and then mount /a which works and then they get confused why /a/b does not exist when they just created it. Of course they will have created /a/b in the root filesystem and then mounted /a which is empty.
You may find some mount-points for re-named filesystems get left behind by this as chfs will not delete them.
If you want to rename the logical volumes too, you need to add a step:-
chlv -n newlv oldlv
You may need to edit /etc/filesystems afterwards and verify that each logical volume update has been applied. I have had occasions where this didn't happen, but I think that has now been fixed, so it depends on the patches applied.
Robin