1825759 Members
2212 Online
109687 Solutions
New Discussion

Vgreduce qustion

 
SOLVED
Go to solution
Ali Imran Abbas
Regular Advisor

Vgreduce qustion

I have a volume group as defined below:

vgdisplay -v vgitot
vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c16t7d0":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
--- Volume groups ---
VG Name /dev/vgitot
VG Write Access read/write
VG Status available
Max LV 64
Cur LV 6
Open LV 6
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 1089
VGDA 2
PE Size (Mbytes) 32
Total PE 1089
Alloc PE 797
Free PE 292
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c16t7d0":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.

C16t7d0 is not accesible and I wanna remove it from vgitot using vgreduce, but its giving me the following error:

/dev/dsk # vgreduce vgitot /dev/dsk/c16t7d0
vgreduce: "/dev/dsk/c16t7d0": No such file or directory
Usage: vgreduce
[-A Autobackup]
[-l]
VolumeGroupName PhysicalVolumePath... | [-f] VolumeGroupName


When I checked the /dev/dsk/ and /dev/rdsk directories, there is no file for c16t7d0.

So what I assume is the device file is not there but still its definition is in lvmtab for vgitot.

Can some one suggest how to remove this disk definition, physically there is no disk at this location.

6 REPLIES 6
Patrick Wallek
Honored Contributor

Re: Vgreduce qustion

You should be able to get the disk removed by doing:

# vgremove -f /dev/vgitot
Ali Imran Abbas
Regular Advisor

Re: Vgreduce qustion

But the volume group vgitot already has another physical volume, does vgremove will also remove that physical group also?
Ali Imran Abbas
Regular Advisor

Re: Vgreduce qustion

Hey Patrick,

Thats gonna remove the whole volume group, I think, vgitot?
Anka
Trusted Contributor
Solution

Re: Vgreduce qustion

#vgreduce -f /dev/vg??
#mv /etc/lvmtab /etc/lvmtab
#vgscan -av <- to recreate the lvmtab file
#strings /etc/lvmtab <- to check if everything is OK for all VGs, if not move back the lvmtab
Kenan Erdey
Honored Contributor

Re: Vgreduce qustion

Hi,

vgreduce -f just reduces missing pvs from the volume group. it's the stution you want, isn't it ?

kenan.
Computers have lots of memory but no imagination
Fabien GUTIERREZ
Frequent Advisor

Re: Vgreduce qustion

you just have to force vgreduce on your lost PV using -f
if you don't get rid of the problem and that you can deactivate your vg for a few moment
vgchange -a n vg
vgexport -m mapfile -f devices vg
remove old entry from file devices
recreate group file
vgimport -m mapfile -f devices vg