Operating System - HP-UX
1756758 Members
2868 Online
108852 Solutions
New Discussion юеВ

Re: creating a mapfile of a vg

 
SOLVED
Go to solution
Mark_543
New Member

creating a mapfile of a vg

Hi
I am looking for a way to create a mapfile the same that is created with "vgexport". I know this can be done with the volume group deactivated and issuing (while not having to export it):
vgexport -m vg##.mapfile -p

I am not able unmount the filesystems so this is not an option.

I can create my own script to map the minor numbers to the lvol names, thus creating the mapfile (as shown below), but I would prefer to use an inbuilt command as I know HP can do it. Even if I know it is not possible, at least I can move on.

typeset -i num
find /dev/vg06 -type b|xargs ls -ld|awk '{print $6" "$10}'|while read minor dev
do
num="$(echo $minor|cut -c6-)"
print "$num\t${dev##*/}"
done
5 REPLIES 5
Gary L. Paveza, Jr.
Trusted Contributor

Re: creating a mapfile of a vg

You don't need to unmount the filesystems.

vgexport -p -m
TwoProc
Honored Contributor
Solution

Re: creating a mapfile of a vg

If you run the vgexport in psuedo-mode (-p) - it will create the mapfile for you without unmounting anything.

It will complain saying:
Volume group "vg00" is still active.

but, it will STILL create the mapfile for you.

example:
vgexport vg00 -p -m vg00.mapfile
We are the people our parents warned us about --Jimmy Buffett
RolandH
Honored Contributor

Re: creating a mapfile of a vg

The key ist the -p option (preview).

vgexport -p -m /tmp/vg00.map vg00

This will print a warining:
vgexport: Volume group "vg00" is still active.

But the mapfile is created anyway.

Roland
Sometimes you lose and sometimes the others win
Mark_543
New Member

Re: creating a mapfile of a vg

Thanks for the quick response

I was doing the vgexport -p -m vg06.mapfile as stated in the original text, but after the error displayed, I just assumed that it did not create the file. I just checked and it does.

Cheers All
Mark...
Mark_543
New Member

Re: creating a mapfile of a vg

Thanks for the quick response

I was doing the vgexport -p -m vg06.mapfile as stated in the original text, but after the error displayed, I just assumed that it did not create the file. I just checked and it does.

Cheers All
Mark...