Operating System - HP-UX
1752782 Members
5940 Online
108789 Solutions
New Discussion

Re: I can not remove a volume group

 
SOLVED
Go to solution
esmadscc01p
Occasional Advisor

I can not remove a volume group

Hello,

I am a HPUX 11.11 administrator.

I have a volume group  I can not remove, neither using vgremove or vgexport, because is activated and has still missing logical volumen associated.  The logical volumens were deleted by force, removed from directly from /etc/fstab , so the file system associated.

 

In this way, if I try to execute a vgexport , I get the error :

vgexport: Volume group "/dev/caprep" is still active.

vgexport. Couldn´t export volume group "/dev/caprep"

 

And if I try to deactivate it, fails too:

vgchange : Couldn´t deactivate volume group "caprep"

 

Any idea, how can I force the deletion?

 

Thank you in advance

 

 

 

18 REPLIES 18
rariasn
Honored Contributor

Re: I can not remove a volume group

Hi:

 

# fuser -u /dev/caprep

 

# vgdsiplay -v  /dev/caprep

 

rgs

esmadscc01p
Occasional Advisor

Re: I can not remove a volume group

--- Volume groups ---
VG Name                     /dev/caprep
VG Write Access             read/write    
VG Status                   available                
Max LV                      255   
Cur LV                      5     
Open LV                     0     
Max PV                      16    
Cur PV                      1     
Act PV                      1     
Max PE per PV               35004       
VGDA                        2  
PE Size (Mbytes)            8              
Total PE                    17499  
Alloc PE                    14063  
Free PE                     3436   
Total PVG                   0       
Total Spare PVs             0             
Total Spare PVs in use      0                    


   --- Physical volumes ---
   PV Name                     /dev/dsk/c11t0d0
   PV Status                   available               
   Total PE                    17499  
   Free PE                     3436   
   Autoswitch                  On       

and fuser output:

/dev/caprep:

 

There is not any reference to the old file systems, neither the directory. In this way , I do not know whay it is still busy.

 

Regards

 

rariasn
Honored Contributor

Re: I can not remove a volume group

Hi:

 

# ll /dev/caprep

 

rgs,

esmadscc01p
Occasional Advisor

Re: I can not remove a volume group

#ll /dev/caprep

cr--r--r--    1  root    sys    64 0x020000 Mar 16 2007 group

 

 

rariasn
Honored Contributor

Re: I can not remove a volume group

Hi:

 

do you have /etc/lvmconf/caprep.mapfile file?

 

# cat /etc/lvmconf/caprep.mapfile

 

for each lvol:

 

mknod /dev/caprep/rlvname1  c 64 0x020001

mknod /dev/caprep/lvname1   b 64 0x020001

 

mknod /dev/caprep/lvname2   b 64 0x020001

mknod /dev/caprep/rlvname2  c 64 0x020001

...

 

mknod /dev/caprep/lvname5   b 64 0x020001

mknod /dev/caprep/rlvname5  c 64 0x020001

 

# vgchange -a n caprep

 

# vgexport -p -m /tmp/caprep.map caprep

 

# vgexport -m -m /tmp/caprep.map caprep

 

rgs,

 

 

rariasn
Honored Contributor

Re: I can not remove a volume group

Hi:

 

do you have /etc/lvmconf/caprep.mapfile file?

 

# cat /etc/lvmconf/caprep.mapfile

 

for each lvol:

 

mknod /dev/caprep/rlvname1  c 64 0x020001

mknod /dev/caprep/lvname1   b 64 0x020001

 

mknod /dev/caprep/lvname2   b 64 0x020002

mknod /dev/caprep/rlvname2  c 64 0x020002

...

 

mknod /dev/caprep/lvname5   b 64 0x020005

mknod /dev/caprep/rlvname5  c 64 0x020005

 

# vgchange -a n caprep

 

# vgexport -p -m /tmp/caprep.map caprep

 

# vgexport -m -m /tmp/caprep.map caprep

 

rgs,

 

 

esmadscc01p
Occasional Advisor

Re: I can not remove a volume group

There is not mapfile :-(

 

rariasn
Honored Contributor

Re: I can not remove a volume group

Hi:

 

--- Volume groups ---

VG Name                    /dev/caprep

VG Write Access        read/write    

VG Status                   available                

Max LV                      255   

Cur LV                      5  <----

 

mknod /dev/caprep/rlvol1  c 64 0x020001

mknod /dev/caprep/lvol1   b 64 0x020001

mknod /dev/caprep/rlvol2  c 64 0x020002

mknod /dev/caprep/lvol2   b 64 0x020002

mknod /dev/caprep/rlvol3  c 64 0x020003

mknod /dev/caprep/lvol3   b 64 0x020003

mknod /dev/caprep/rlvol4  c 64 0x020004

mknod /dev/caprep/lvol4   b 64 0x020004

mknod /dev/caprep/rlvol5  c 64 0x020005

mknod /dev/caprep/lvol5   b 64 0x020005

 

# vgchange -a n caprep

 

rgs,

esmadscc01p
Occasional Advisor

Re: I can not remove a volume group

Hello, I have created all the special files, but I can not deactivate it, for the same reason:

vgchange: Couldn´t deactivate volume group "Caprep".

Device busy

 

Thank you, rariasn