1833681 Members
4910 Online
110062 Solutions
New Discussion

Re: lvremove failed

 
Massimo Bianchi
Honored Contributor

Re: lvremove failed

Ken, Roland:

brw-r----- 1 bin sys 31 0x008000 Aug 31 1999 /dev/dsk/c0t8d0

is only the minor of the disk, not of one of the logical volum or of the group..... no standard, just hw path :)

I saw that the PV looklike still unavaiable.

I see no other solution thana reboot, but maybe someone else has bot a bunny-ware idea.

Massimo
RolandH
Honored Contributor

Re: lvremove failed

I absolutely agree with you Massimo.

"Sometimes it's hard to be a syadmin."
- No risk no fun -


Roland
Sometimes you lose and sometimes the others win
Torbjorn Westman
Frequent Advisor

Re: lvremove failed

Thanks for all help!

But the problem is not solved yet...


$ fuser -c /dev/vg01/lvol20
/dev/vg01/lvol20: fuser: could not find file system mounted at /dev/vg01/lvol20.
$ fuser -k /dev/vg01/lvol20
/dev/vg01/lvol20:

$ fuser -c /dev/vg01/lvol99
/dev/vg01/lvol99: fuser: could not find file system mounted at /dev/vg01/lvol99.
$ fuser -k /dev/vg01/lvol99
/dev/vg01/lvol99:

$ fuser -c /dev/vg01/lvol21
/dev/vg01/lvol21: fuser: could not find file system mounted at /dev/vg01/lvol21.
$ fuser -k /dev/vg01/lvol21
/dev/vg01/lvol21:

$ vgchange -a n vg01
vgchange: Couldn't deactivate volume group "vg01":
Device busy


$ strings /etc/lvmtab
/dev/vg00
/dev/dsk/c0t5d0
/dev/vg01
/dev/dsk/c0t8d0


TW
Massimo Bianchi
Honored Contributor

Re: lvremove failed

Use

fuser -ku /dev/vg01/lv*

the option "-c" is used to refer to a mounted FS, but your lvols are NOT mounted, as you stated yesterday

Massimo
Torbjorn Westman
Frequent Advisor

Re: lvremove failed

The same result:

$ fuser -ku /dev/vg01/lvol20
/dev/vg01/lvol20:

$ fuser -ku /dev/vg01/lvol21
/dev/vg01/lvol21:

$ fuser -ku /dev/vg01/lvol99
/dev/vg01/lvol99:

$ vgchange -a n vg01
vgchange: Couldn't deactivate volume group "vg01":
Device busy
TW
Mary Ann Lipa
Valued Contributor

Re: lvremove failed

Hi,
1. vgdisplay shows 0 allocated PE and LE size = 0
2. remove the dump2 device files under /dev/vg01
3. and delete lvol20 via sam or lvremove
4. recreate the lvol or export the VG if you want to completely remove the VG

hope this help...
-dan
Which is worse, smoking or picking your nose in a public place?
Torbjorn Westman
Frequent Advisor

Re: lvremove failed

Hi Dan!


"1. vgdisplay shows 0 allocated PE and LE size = 0"

No not 0. lvol99 has 400 alloc PE.

$ vgdisplay -v vg01
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 3
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 2171
VGDA 2
PE Size (Mbytes) 4
Total PE 2170
Alloc PE 400
Free PE 1770
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg01/lvol20
LV Status available/syncd
LV Size (Mbytes) 0
Current LE 0
Allocated PE 0
Used PV 0

LV Name /dev/vg01/lvol99
LV Status available/syncd
LV Size (Mbytes) 1600
Current LE 400
Allocated PE 400
Used PV 1

LV Name /dev/vg01/lvol21
LV Status available/syncd
LV Size (Mbytes) 0
Current LE 0
Allocated PE 0
Used PV 0


--- Physical volumes ---
PV Name /dev/dsk/c0t8d0
PV Status unavailable
Total PE 2170
Free PE 1770
Autoswitch On


"2. remove the dump2 device files under /dev/vg01"

dump2 device?
How can I remove that one?


"3. and delete lvol20 via sam or lvremove"

-

"4. recreate the lvol or export the VG if you want to completely remove the VG"

Yes, I want to completely remove vg01.
TW
Bernhard Mueller
Honored Contributor

Re: lvremove failed

Hi,

if I followed this thread correctly you have vg01 with one disk c0t8d0, the vg is active but says PV unavailable,

that is why you cannot do deactivate the vg.

However the diskinfo was successful.

So try ioscan -fnCdisk
check that c0t8d0 is CLAIMED
if yes do
vgchange -a y vg01
this should recover the link to the prevoiusly "dead" disk
the you should be able to
vgchange -a n vg01
vgexport vg01

If the LVM header has already been corrupted
and vgchange -a y gives you an error, you should do a
vgcfgrestore -n vg01
vgchange -a y vg01
vgchange -a n vg01
vgexport vg01

Regards,
Bernhard
Bernhard Mueller
Honored Contributor

Re: lvremove failed

Sorry,

just read that you have been through all of this already....

I had a similar case with exactly the same message "A component of the path...". And I had to reboot.

my apologies for the previous post.

Regards,
Bernhard

Nagaraju Gudala
Occasional Advisor

Re: lvremove failed

Have u tried vgremove vg01.if it fails do vgexport vg01.vgexport will remove all the files corresponding to that vg without disturbing the lv's.Then after vgexport vg01 try vgremove.It should work.After vgexport try to remove the LV's corresponding to that VG by deactivating the VG.for more info man vgexport
Torbjorn Westman
Frequent Advisor

Re: lvremove failed

After the reboot it was no problem to remove the logical volumes and the volume group vg01.


Thanks for all help!
TW