Operating System - HP-UX
1753513 Members
5822 Online
108795 Solutions
New Discussion

Re: Delete a Volume Group without disk

 
SOLVED
Go to solution
JuanCBarrios
Occasional Advisor

Delete a Volume Group without disk

Hi How can I delete Volume Group that has no disk, when I run a "vgscan -a" i get this error:

 

server:/# vgscan -a

vgscan: The physical volume "/dev/dsk/c1t0d0s2" is already recorded in the "/etc/lvmtab" file.

The Volume Group /dev/vgtmp was not matched with any Physical Volumes.
Couldn't stat physical volume "/dev/dsk/c5t0d2":
Invalid argument
Couldn't stat physical volume "/dev/dsk/c7t0d2":
Invalid argument
Couldn't stat physical volume "/dev/dsk/c0t0d2":
Invalid argument
Couldn't stat physical volume "/dev/dsk/c3t0d2":
Invalid argument

=====================

So the problem is with this VG: "/dev/vgtmp", and with this PV: /dev/dsk/c5t0d2, dev/dsk/c7t0d2,/dev/dsk/c0t0d2,/dev/dsk/c3t0d2

 

Now if I execute an ioscan i Get this NO_HW:

server:/# ioscan -fnC disk | grep -i no_hw

disk 5 0/4/0/0/0/0.3.0.0.0.0.2 sdisk NO_HW DEVICE HP HSV200
/dev/dsk/c5t0d2 /dev/rdsk/c5t0d2
disk 6 0/4/0/0/0/0.3.1.0.0.0.2 sdisk NO_HW DEVICE HP HSV200
/dev/dsk/c7t0d2 /dev/rdsk/c7t0d2
disk 7 0/4/0/0/0/1.4.0.0.0.0.2 sdisk NO_HW DEVICE HP HSV200
/dev/dsk/c0t0d2 /dev/rdsk/c0t0d2
disk 8 0/4/0/0/0/1.4.1.0.0.0.2 sdisk NO_HW DEVICE HP HSV200
/dev/dsk/c3t0d2 /dev/rdsk/c3t0d2

=====ioscan -m dsf

/dev/rdisk/disk211 /dev/rdsk/c5t0d2 
                                  /dev/rdsk/c7t0d2
                                  /dev/rdsk/c0t0d2
                                  /dev/rdsk/c3t0d2

 

 

I tried with these:

 

server:/# vgchange -a n /dev/vgtmp
vgchange: Volume group "/dev/vgtmp" does not exist in the "/etc/lvmtab" file.
vgchange: Volume group "/dev/vgtmp" does not exist in the "/etc/lvmtab_p" file.
server:/# vgremove /dev/vgtmp
vgremove: Volume group "/dev/vgtmp" does not exist in the "/etc/lvmtab" file.
vgremove: Volume group "/dev/vgtmp" does not exist in the "/etc/lvmtab_p" file

 

but dont work because the VG are not in "/etc/lvmtab"

 

Best Regards

 

 

 

3 REPLIES 3
Bill Hassell
Honored Contributor

Re: Delete a Volume Group without disk

Try vgexport rather than vgremove.



Bill Hassell, sysadmin
Patrick Wallek
Honored Contributor
Solution

Re: Delete a Volume Group without disk

If 'vgexport /dev/vgtmp' does not work, then you can just remove the /dev/vgtmp directory structure.

 

# cd /dev

# rm -r vgtmp

JuanCBarrios
Occasional Advisor

Re: Delete a Volume Group without disk

Hi, I execute "vgexport /dev/vgtmp" but didn't work , then I did " rm -r /dev/vgtmp" and execute the vgscan -v  and the message "The Volume Group /dev/vgtmp was not matched with any Physical Volumes." has disappear, but the messages: Couldn't stat physical volume "/dev/dsk/c5t0d2".etc.. still showed..

 

Then I executed a rmsf -H <hw_path> on each disk that showed "NO_HW" in the ioscan -fnC disk:

e.g:

server:/# rmsf -H 0/4/0/0/0/0.3.0.0.0.0.2
server:/# rmsf -H 0/4/0/0/0/0.3.1.0.0.0.2
server:/# rmsf -H 0/4/0/0/0/1.4.0.0.0.0.2
server:/# rmsf -H 0/4/0/0/0/1.4.1.0.0.0.2

 

and finally execute the "vgscan -v and everything looks ok now

 

srver/# vgscan -v
vgscan: The physical volume "/dev/dsk/c1t0d0s2" is already recorded in the "/etc/lvmtab" file.
/dev/vgoracle
/dev/disk/disk115
/dev/vgprdap01
/dev/disk/disk116
/dev/vg00
/dev/dsk/c1t0d0s2
Scan of Physical Volumes Complete.
Scan of Physical Volumes Complete.
server:/

 

Thank you guys for you great help.

 

Best Regards

Juan Carlos Barrios