1825789 Members
2215 Online
109687 Solutions
New Discussion

'Ghost' Logical Volumes

 
SOLVED
Go to solution
Rick Garland
Honored Contributor

'Ghost' Logical Volumes

Hi all:

HPUX 11.11 on K370.

Lost an external disk last week. Did the 'vgexport', replaced the disk then rebuilt the VG. No data to restore so rebuilt as if a new disk; pvcreate -f, mknod, vgcreate, etc.

I did the vgcreate and when I do the 'vgdisplay -v' command the old Logical Volumes appear in the dislay. They have 0 extents allocated to them.

When I try to lvremove them, the LVM thinks they do not exist and can't remove non-existing LV.

I created new LVs and added space to them, made filesystems, mounted. All OK. But, the 'ghost' LVs are still there and now they display as having extents allocated to them. But I still cannot remove, newfs, mount.

Attached is the vgdisplay of the VG.

Notice, this is only a 4GB disk, total of 1023 extents. The 3 new LVs I created are u02, u06, u11. The ghosts are u02lv, u06lv, u11llv.

Add up all 6 of these displayed LVs and you get 2040 extents.

What;s happening?
9 REPLIES 9
marvik
Regular Advisor

Re: 'Ghost' Logical Volumes

Rick,

Did u do lvreduce before a vgexport ?

Marvik
Rick Garland
Honored Contributor

Re: 'Ghost' Logical Volumes

Yes
Marvin Strong
Honored Contributor

Re: 'Ghost' Logical Volumes

Is the /dev/vg?? directory clean or does it have extra lvols listed?

you can get ghost lvols if the /dev/vg?? didn't get cleaned up.

So ll /dev/vg?? do you see u02lv u06lv u11lv in the directory listing if so those would be your ghost lvols. And if they have the same minor number as u02, u06 u11 that you created thats why you see them with extents after you added new lvs.

If they are listed in your /dev/vg?? directory you can just remove them.
Rick Garland
Honored Contributor

Re: 'Ghost' Logical Volumes

The dev/vg05 is clean. This was removed on the vgexport.

On the recreation, only the new LVs and the group files exist.

A. Clay Stephenson
Acclaimed Contributor

Re: 'Ghost' Logical Volumes

Do an ls -l /dev/vg*/group; I suspect that you have more than one VG sharing a common minor device number. That will lead to all sorts of bizarre behavior.
If it ain't broke, I can fix that.
Rick Garland
Honored Contributor

Re: 'Ghost' Logical Volumes

Did that before I recreated the VG. Made sure I was separate from the rest.

Interesting display however. I recreated this VG last Friday, Jul 28. Doing the listing now shows the VG has been around since Jan 2004 - same as all the other VGs.

When I checked it last Friday the date/time stamp on the vg05/group was Jul 28, which is same as the LVs in the directory are sow.

# ll /dev/vg*/group
crw-r----- 1 root sys 64 0x000000 Jul 27 14:45 /dev/vg00/group
crw-r----- 1 root sys 64 0x010000 Jul 27 14:45 /dev/vg01/group
cr--r--r-- 1 root sys 64 0x020000 Jan 12 2004 /dev/vg02/group
cr--r--r-- 1 root sys 64 0x030000 Jan 12 2004 /dev/vg03/group
cr--r--r-- 1 root sys 64 0x040000 Jan 12 2004 /dev/vg04/group
cr--r--r-- 1 root sys 64 0x060000 Jan 14 2004 /dev/vg05/group
cr--r--r-- 1 root sys 64 0x070000 Jan 14 2004 /dev/vg06/group
cr--r--r-- 1 root sys 64 0x080000 Jan 14 2004 /dev/vg07/group
cr--r--r-- 1 root sys 64 0x090000 Jan 14 2004 /dev/vg08/group
cr--r--r-- 1 root sys 64 0x050000 Jan 13 2004 /dev/vg09/group
OldSchool
Honored Contributor
Solution

Re: 'Ghost' Logical Volumes

Also, you can refer to this doc:

LVM: Removing a Ghost Disk

http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000080049938
Torsten.
Acclaimed Contributor

Re: 'Ghost' Logical Volumes

You need to have a look into the /dev/vg05 again.

I'm really sure you will find some strange things there.


I did a small test:
lrwxrwxrwx 1 root sys 5 Jul 31 17:26 lvol9 -> lvol8

Look at the result from vgdisplay:



LV Name /dev/vg00/lvol9
LV Status available/syncd
LV Size (Mbytes) 1024
Current LE 256
Allocated PE 256
Used PV 1


It's exactly the same like lvol8, but I don't have a LVOL9!

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Rick Garland
Honored Contributor

Re: 'Ghost' Logical Volumes

Hi all:

Removed the VG doing all the steps in the KB document as supplied.

I must have missed a step somewhere.

It is cleared now.

Thanks all!