1833776 Members
2071 Online
110063 Solutions
New Discussion

Re: reduce vg00 disk

 
SOLVED
Go to solution
cute
Advisor

reduce vg00 disk

Hi,
Can you please help me...
I have 2 36Gb disks in VG00,
i need to vgreduce the vg00, is it possible?
DO i have to install from ignite tape?
any procedures/steps that could help me in reinstalling my 11i system from my make_recovery tape?

replies would be really appreciated.... =)
Thanks!!!
-cute
20 REPLIES 20
Michael Tully
Honored Contributor

Re: reduce vg00 disk

Before you do anything, is there anything currently on the disk?

run pvdisplay to find out. Substitite you disk where it says 'cxtydz'

# pvdisplay -v /dev/dsk/cxtydz

If there is nothing, then you can reduce it.
# vgreduce /dev/vg00 /dev/dsk/cxtydz

If not you should identify what is on it, like mirrored volumes etc.

You may wish to post a copy of /dev/vg00

# vgdisplay -v /dev/vg00
Then we can help more.
Anyone for a Mutiny ?
KCS_1
Respected Contributor

Re: reduce vg00 disk

hi,cute!

what do you wanna do?

if, you wanna export one of disk in vg00,before backup all your data of vg00 by using backup utilities after,then remove all logical volume in vg00 ,

# vgdisplay -v vg00

comfirm, wanna remove LVs in vg00 and allocated PE in the disk of vg00.

# lvremove /dev/vg00/lvolX

if, you need to remove other LVs,again and again.

# vgdisplay -v vg00

comfirm, again allocated PE of disk.

# strings /etc/lvmtab

There are two disk in the vg00

# vgreduce /dev/vg00 /dev/dsk/c#t#d#

** if, your LVs is across between two disk and you wanna remove the LV when you see allocated PE of vg00, you have to care for removing the LV why data will broken by the lvremove command.


# stings /etc/lvmtab

you see, just one disk in the VG00







Easy going at all.
cute
Advisor

Re: reduce vg00 disk

Thanks Michael!!!

here's the vg specs...

--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 11
Open LV 11
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4350
VGDA 4
PE Size (Mbytes) 8
Total PE 8680
Alloc PE 8630
Free PE 50
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
...
--- Physical volumes ---
PV Name /dev/dsk/c1t15d0
PV Status available
Total PE 4340
Free PE 0
Autoswitch On

PV Name /dev/dsk/c3t15d0
PV Status available
Total PE 4340
Free PE 50
Autoswitch On

LVDISPLAY has:
--- Logical volumes ---
LV Name /dev/vg00/lvol4
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 2000
Current LE 250
Allocated PE 250
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c1t15d0 250 250

thank you again... =)
cute
Advisor

Re: reduce vg00 disk

Thanks Patrick,
actually i dont want to remove any LV,
i just want to remove a disk from my VG00
can i reinstall from ignite, and just specify the disk i want to use when prompted?
will this work?

any specific procedures i can follow?

Thanks very much!!!
Mary Ann Lipa
Valued Contributor

Re: reduce vg00 disk

Here's a same solution i got from Patrick Wallek
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x6ce7f841489fd4118fef0090279cd0f9,00.html

i guess you have to reinstall from an ignite tape and select the disk for your vg00.

1) Make sure you have the latest version of Ignite/UX installed. Get it at: http://software.hp.com/products/IUX
execute: [to verify your ignite's version]

# swlist -l product | grep -i ignite

2) Create 2 make_tape_recovery tapes:

# /opt/ignite/bin/make_tape_recovery -a /dev/rmt/0mn -I -v -x inc_entire=vg00

or

# make_recovery -A -C -v -d /dev/rmt/0m

Both commands will include entire vg00.

3) Boot from one of the tapes you just created.

4) Once you have booted from the tape and are at the Ignite/UX menu, then you can go through the menu options to the Filesystem menu and resize your LVs as you wish and specify the disk you want to use, where you want your operating system to reside. Please take note of the disk's hardware path because this is very important.

Once you are done, select 'GO!' and your server will be rebuilt with the new disk you selected.

Good luck.

i just modified and included the 'disk thing'

hope this helps

Which is worse, smoking or picking your nose in a public place?
Mary Ann Lipa
Valued Contributor

Re: reduce vg00 disk

i hope i got it correct...
Which is worse, smoking or picking your nose in a public place?
Mary Ann Lipa
Valued Contributor

Re: reduce vg00 disk

.
Which is worse, smoking or picking your nose in a public place?
Mary Ann Lipa
Valued Contributor

Re: reduce vg00 disk

sorry for the mess...
please dont assign points to my other replies.
Thanks
Which is worse, smoking or picking your nose in a public place?
Steven E. Protter
Exalted Contributor

Re: reduce vg00 disk

make_recovery is obsolete.

Eventually support for it will be pulled.

I susggest you make a tape that will be supported whenever you choose to use it.

/opt/ignite/bin/make_tape_recovery -Av -x inc_entire=vg00

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Sridhar Bhaskarla
Honored Contributor
Solution

Re: reduce vg00 disk

Hi,

I am completely at a loss. Why do you want to reinstall OS?. If the other disk has mirrors on it, you can reduce the mirrors. If it has non-mirrored logical volumes, you can move them to the first disk. You can follow this procedure.

1. Create make_tape_recovery tape just to be on safe side.

2. On the disk you want to remove (say c2t6d0),

#pvdisplay -v /dev/dsk/c2t6d0

Note down the logical volumes For each logical volume do a

#lvdisplay /dev/vg00/lvolx

Observe the "Mirror Copies" column. If it is one, then reduce it's mirror from this disk

#lvreduce -m 0 /dev/vg00/lvolx /dev/dsk/c2t6d0

If it is "0", then move the logical volume to the other disk (say c1t6d0)

#pvmove -n /dev/vg00/lvolx /dev/dsk/c1t6d0

Be patient here. Keep looking at "lvdisplay -v /dev/vg00/lvolx" to get the status.

(Do not use pvmove on the logical volumes that are mirror copies)

3. Once you are done with all the logical volumes on the disk, case by case as mentioned before, give a final check on the disk

#pvdisplay -v /dev/dsk/c2t6d0

Make sure there are not logical volumes on it. Once it is confirmed, take the disk out of vg00.

#vgreduce vg00 /dev/dsk/c2t6d0

Do it leisurely with accuracy. You can do it online without taking downtime.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
cute
Advisor

Re: reduce vg00 disk

THANKS everyone!!!!
T G Manikandan
Honored Contributor

Re: reduce vg00 disk

You have 2 36Gb hard disks!!
that is quite more space on the vg00.

you cannot do a pvmove from the second hard disk to the first one as there is no free PE on the first disk.

First can you post your
complete

vgdisplay -v /dev/vg00

output.
The above vgdisplay output does not seem to have the logical volume details.

Then Also revert on what volume what file systems you have mounted i.e. cat /etc/fstab

Also do mention the output of

pvdisplay -v /dev/dsk/...

(for both hard disks)

Also the output of lvlnboot -v

Please attach the file for all the output requested.
Let's finish this quickly.

Revert

cute
Advisor

Re: reduce vg00 disk

Noticed too that i have no free PEs on c1t15d0..
Thanks TG..
Here's vgdisplay and pvdisplay

Thanks again!!!
Sridhar Bhaskarla
Honored Contributor

Re: reduce vg00 disk

Hi,

I missed your vgdisplay output. It is a usual practice to make them mirrors and I went with that assumption.

You have two big logical volumes (little bit of lvol11 is on the first disk too). None of your lvols are mirrored.

Unless you are not using lvol11 and lvol12, you just cannot take out c3t15d0. Even make_tape_recovery is not going to help you.

If you don't need lvol11 or lvol12 or if you can be able to move them to another volume group, then you can take out the other disk. Only way you can get rid of c3t15d0 is to remove these two logical volumes from it.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
cute
Advisor

Re: reduce vg00 disk

Thanks Sri,
If i lvremove lvol11 and lvol12,
is it safe now to vgreduce vg00?
any other things i need to look at?

thank you!!

bdf fstab and lnlvboot attached
John Dvorchak
Honored Contributor

Re: reduce vg00 disk

Once all of the lv's are off of the disk, verify with pvdisplay, you can vgreduce it out of the vg with no problems.

vgreduce vg00 /dev/dsk/c_t_d_

Good luck
If it has wheels or a skirt, you can't afford it.
Sridhar Bhaskarla
Honored Contributor

Re: reduce vg00 disk

Hi,

lvol11 is mounted on /ap02 (18GB used) and lvol12 (1.8G used) is mounted on /utils.

You may want to check with your users to see if it is ok to lose the data. If that is the case, I would take a backup of these two filesystems and then remove them. Or if you have any other disks, you may want to create another VG and move the data.

#umount /ap02
#umount /utils
#lvremove /dev/vg00/lvol11
#lvremove /dev/vg00/lvol12
#vgreduce vg00 /dev/dsk/c2t15d0

Key is to find if you don't need the data in /utils and /ap02.

Yes, once you got rid of these lvols, you can take the disk out of vg00.

But my next question is, why do you want to take this disk out?

Also, it is a good idea to keep mirrors to your vg00 lvols.

Atleast create make_tape_recovery tapes periodically.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
T G Manikandan
Honored Contributor

Re: reduce vg00 disk

Everything is fine.

Just those two volumes occupy the second hard disk.

/dev/vg00/lvol12 16384000
/dev/vg00/lvol11 20480000

which equals to 36GB.

Just remove these two volumes which should make that disk free.

Just do a

#umount /apo2
#umount /utils
#lvremove /dev/vg00/lvol11
#lvremove /dev/vg00/lvol12
#vgreduce vg00 /dev/dsk/c3t15d0


Thanks

T G Manikandan
Honored Contributor

Re: reduce vg00 disk

Sri is right.
Before removing those lvols just check whether you have any important data in it.

The best would be to take a backup of those lvol's(some imp data might be hiding)

cute
Advisor

Re: reduce vg00 disk

Thanks very much Sri, TG, John,
What my users want to do is to free up and utilize the other disk.
So what we're planing to do now is:
1.lvremove the lvols 11 and 12
2. vgreduce vg00
3. pvcreate & vgcreate another VG using the old disk
4. lvcreate, and restore the old data from lvols 11 and 12 since these are application data and should not be on VG00.

If you see something else that I need to do, Please kindly correct me...

Thanks very very much everyone!!!