Operating System - HP-UX
1833704 Members
3446 Online
110062 Solutions
New Discussion

reclaim space after removeing the logical volume 11.23

 
ladoo_1
Frequent Advisor

reclaim space after removeing the logical volume 11.23

Hello,

I am unable to see the space after removing the logical volume through sam .The physical extents showed ???? instead of free ..
Please help ...The OS is 11.23 hp-ux
26 REPLIES 26
ladoo_1
Frequent Advisor

Re: reclaim space after removeing the logical volume 11.23

please help ...... I need that space to create a new filesystem ???
LucianoCarvalho
Respected Contributor

Re: reclaim space after removeing the logical volume 11.23

Hi,

Post the output rom vgdisplay -v. Maybe SAM didn't remove the volume correctly and you problably have to remove it manually

regards
Robert-Jan Goossens
Honored Contributor

Re: reclaim space after removeing the logical volume 11.23

post the ouput of

# vgdisplay -v /dev/vgxx

Robert-Jan
ladoo_1
Frequent Advisor

Re: reclaim space after removeing the logical volume 11.23

# vgdisplay -v /dev/datavg
--- Volume groups ---
VG Name /dev/datavg
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 4
Open LV 3
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 8683
VGDA 2
PE Size (Mbytes) 4
Total PE 8681
Alloc PE 8500
Free PE 181
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/datavg/xxxx
LV Status available/syncd
LV Size (Mbytes) 25000
Current LE 6250
Allocated PE 6250
Used PV 1

LV Name /dev/datavg/xyz
LV Status available/syncd
LV Size (Mbytes) 5000
Current LE 1250
Allocated PE 1250
Used PV 1

LV Name /dev/datavg/abc
LV Status available/syncd
LV Size (Mbytes) 2000
Current LE 500
Allocated PE 500
Used PV 1


--- Physical volumes ---
PV Name /dev/dsk/c2t1d0
PV Status available
Total PE 8681
Free PE 181
Autoswitch On
Proactive Polling On

Robert-Jan Goossens
Honored Contributor

Re: reclaim space after removeing the logical volume 11.23

Hi,

You have three open lvols abc, xyz and xxxx

Cur LV 4
Open LV 3

which one did you want to remove?

could you post the output of

# ll /dev/datavg

Regards,
Robert-Jan
DC.
Occasional Contributor

Re: reclaim space after removeing the logical volume 11.23

Is that logical volume name still showing in that vgdisplay output or not????

Piyush
Geoff Wild
Honored Contributor

Re: reclaim space after removeing the logical volume 11.23

How did you remove the lvol?

Did you do a lvremove or did you rm /dev/datavg/lvolXX ???

If the latter, then do a

vgcfgrestore -n /dev/datavg



BTW - as a tip, default naming standards suggest that you name your vg's

vg01
vg02
vg03

etc


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
ladoo_1
Frequent Advisor

Re: reclaim space after removeing the logical volume 11.23

i use the sam ...and later i did rm -r /dev/datavg/volxx
whiteknight
Honored Contributor

Re: reclaim space after removeing the logical volume 11.23

ladoo,


the correct way is lvremove /dev/vgdata/lxxxx.

WK
Problem never ends, you must know how to fix it
ladoo_1
Frequent Advisor

Re: reclaim space after removeing the logical volume 11.23

How can i fix the problem Now .....
erics_1
Honored Contributor

Re: reclaim space after removeing the logical volume 11.23

ladoo,

1 of 2 approaches will probably clear this up:

1. vgchange -a y /dev/datavg
vgdisplay /dev/datavg
- Do the number of lv's match now?

OR

2. Recreate the lvol device files (rlvolxxx,lvolxxx) with the mknod command, and then check with lvdisplay. If the number of lv's match, then perform an lvremove of the lvol you wish to be gone.

Regards,
Eric
erics_1
Honored Contributor

Re: reclaim space after removeing the logical volume 11.23

ladoo,

1 of 2 approaches will probably clear this up:

1. vgchange -a y /dev/datavg
vgdisplay /dev/datavg
- Do the number of lv's match now?

2. Recreate the lvol device files (rlvolxxx,lvolxxx) with the mknod command, and then check with lvdisplay. If the number of lv's match, then perform an lvremove of the lvol you wish to be gone.

Regards,
Eric
Geoff Wild
Honored Contributor

Re: reclaim space after removeing the logical volume 11.23

If you used sam - and it worked - then you shouldn't have needed to do the rm.

So, either restore those files( lvol and rlvol) or try running the command I provided in my last post:

vgcfgrestore -n /dev/datavg

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
ladoo_1
Frequent Advisor

Re: reclaim space after removeing the logical volume 11.23

# vgcfgrestore -n /dev/datavg
Usage: vgcfgrestore
[-R]
[-F]
{ -n vgname |
-f VGConfPath }
{ -l [-v] |
{[-o OldPVPath] PVPath}}
OldPVPath and PVPath : character special files
OldPVPath and PVPath : character special files

Torsten.
Acclaimed Contributor

Re: reclaim space after removeing the logical volume 11.23

You need to run the restore to a disk device, example:

# vgcfgrestore -n /dev/datavg /dev/rdsk/c2t1d0

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!   
ladoo_1
Frequent Advisor

Re: reclaim space after removeing the logical volume 11.23

vgcfgrestore -n /dev/datavg /dev/rdsk/c2t1d0
vgcfgrestore: Cannot restore Physical Volume "/dev/dsk/c2t1d0",
Detach the PV or deactivate the VG, before restoring the PV

What will this command will do ..do i need to restore from the backup ???
Torsten.
Acclaimed Contributor

Re: reclaim space after removeing the logical volume 11.23

You need to deactivate the disk access from the LVM point of view.

pvchange -a n /dev/rdsk/c2t1d0

This will restore the LVM structure to the disk from backup.

Try this first:

/usr/sbin/vgcfgrestore -n datavg -l

(this is minor "L")

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!   
ladoo_1
Frequent Advisor

Re: reclaim space after removeing the logical volume 11.23

This is what i get ...

# pvchange -a n /dev/rdsk/c2t1d0
Usage: pvchange
[-A Autobackup]
[-s] |
{[-S Autoswitch] [-x Extensibility] [-a Availability] [-t IOTimeout] [-z SparePV] [-p ProactivePolling]}
PhysicalVolumePath
"PhysicalVolumePath": must be a block special file.
# usr/sbin/vgcfgrestore -n datavg -l
Volume Group Configuration information in "/etc/lvmconf/datavg.conf"
VG Name /dev/datavg
---- Physical volumes : 1 ----
/dev/rdsk/c2t1d0 (Non-bootable)
#
Robert-Jan Goossens
Honored Contributor

Re: reclaim space after removeing the logical volume 11.23

ladoo,

You will need to recreate the block and character device files of the logical volume you have removed.

A restore from backup

B post the complete output from below command and the name of the lvol you have removed and we may be able to give you the mkmod command to recreate the lvol.
# ll /dev/datavg

Regards,
Robert-Jan
ladoo_1
Frequent Advisor

Re: reclaim space after removeing the logical volume 11.23

# ll /dev/datavg
total 0
cr--r--r-- 1 root sys 64 0x020000 Jan 19 2006 group
br--r----- 1 root sys 64 0x020002 Mar 1 2006 lvhome
br--r----- 1 root sys 64 0x020001 Jan 19 2006 oracle
cr--r----- 1 root sys 64 0x020004 Mar 2 2006 rxyz
cr--r----- 1 root sys 64 0x020002 Mar 1 2006 rlvhome
cr--r----- 1 root sys 64 0x020001 Jan 19 2006 roracle
cr--r----- 1 root sys 64 0x020003 Mar 2 2006 rabc
br--r----- 1 root sys 64 0x020003 Mar 2 2006 abc
Robert-Jan Goossens
Honored Contributor

Re: reclaim space after removeing the logical volume 11.23

rxyz is a raw oracle filesystem? or am I missing the block device file for lvol xyz?

It was available in your vgdisplay command.

Could you post the name of the missing lvol?
Robert-Jan Goossens
Honored Contributor

Re: reclaim space after removeing the logical volume 11.23

could you also post a
# strings /etc/lvmconf/datavg.conf
ladoo_1
Frequent Advisor

Re: reclaim space after removeing the logical volume 11.23

# strings /etc/lvmconf/datavg.conf
CONFIG01
/dev/datavg
/dev/rdsk/c2t1d0
LVMREC01%
VGDA0001
VGSA0001D
TTr
Honored Contributor

Re: reclaim space after removeing the logical volume 11.23

Based on your "ll /dev/datavg" it appears that the missing volume is xyz. If that's corerct you are still missing the "block" device file. Only the "character" device files shows up. A couple of people suggested to you to manually create these files using the mknod command. I suggest the same. If the VG headers on the disk still have the missing LVOL number, creating the block file should match it up.