Operating System - HP-UX
1849731 Members
8332 Online
104044 Solutions
New Discussion

Re: how to export volume group through CLI mode ?

 
SOLVED
Go to solution
Shah Gaurang B.
Frequent Advisor

how to export volume group through CLI mode ?

i have to export volume group through vgexport command but it gives error volume group is still active and for to solved this i tried to reduce volume group by command vgreduce and it says at least one physical volume must stay in volume group .
I have only one physical volume it it so how to solved this problem ?

Pl guide me thanks to all in advance
6 REPLIES 6
Pete Randall
Outstanding Contributor
Solution

Re: how to export volume group through CLI mode ?

Try:

vgchange -a n /dev/vgXX
vgexport -s -m /tmp/vgXX.map /dev/vgXX


Pete

Pete
Shameer.V.A
Respected Contributor

Re: how to export volume group through CLI mode ?

Hi Gaurang,
You have to deactivate the vg through vgchange command first
#vgchange -a n /dev/vgxx

Then you can export the vg ( You may use a map file , which can be useful for while importing the same vg on other server.

#vgexport -m /tmp/vgXX.map /dev/vgXX

shameer
.... See invisible, feel intangible and achieve impossible as everything is possible ....
Arunvijai_4
Honored Contributor

Re: how to export volume group through CLI mode ?

Hello,

Unmount the mount point first, then you can follow this steps,

# fuser -ku >device>
# umount
# vgchance -a n
# vgexport -v -f outfile /dev/vg01

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Arunvijai_4
Honored Contributor

Re: how to export volume group through CLI mode ?

Hello,

Unmount the mount point first, then you can follow this steps,

# fuser -ku >device>
# umount
# vgchance -a n
# vgexport -v -f outfile

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
rariasn
Honored Contributor

Re: how to export volume group through CLI mode ?

Hi Shah,

#vgexport -p -m /tmp/vg00.map vg00
vgexport: Volume group "vg00" is still active.
#ll /tmp/vg00.map
-rw-r----- 1 root sys 340 Jan 4 08:35 /tmp/vg00.map

This is ok.
System Unix
Frequent Advisor

Re: how to export volume group through CLI mode ?

Hi Shah,
you have to check that you don't have a swap device on this volume group, other wise you will not be able to change activation.

Reuven

Reuven