System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

How to decrease the physical Volumes Group !

 
baong
Frequent Advisor

How to decrease the physical Volumes Group !

Hello All,
I need help here to see if anyone can give me some advisor here.
I got 2 physical hard drive, currently they are in 1 volume group and installed sybase. Now i want to remove 1 physical hard drive without reinstall sybase. How would i do that? Any input would be appreciate.

Thanks All
9 REPLIES
Torsten.
Acclaimed Contributor

Re: How to decrease the physical Volumes Group !

First check if this PV is in use (pvdisplay ...). If not used, use vgreduce.

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

Re: How to decrease the physical Volumes Group !

torsten,
Yes both physical hard drive currently in used.

--- Physical volumes ---
PV Name /dev/dsk/c1t3d00000
VG Name /dev/vg01 00000
PV Status available
Allocatable yes 00000
VGDA 2 00000
Cur LV 3 00000
PE Size (Mbytes) 256 000
Total PE 546 00000
Free PE 266 00000
Allocated PE 280 00000
Stale PE 0 00000
IO Timeout (Seconds) default
Autoswitch On 00000
Proactive Polling On 00
00302 free 00000
--- Distribution of physical volume ---00000
LV Name LE of LV PE for LV
/dev/vg01/lvol1 40 40
/dev/vg01/lvol2 200 200
/dev/vg01/lvol3 40 40
00308 free 00000
--- Physical extents --- 00000
PE Status LV LE
00000 current /dev/vg01/lvol1 00000
00001 current /dev/vg01/lvol1 00001
00002 current /dev/vg01/lvol1 00002
00003 current /dev/vg01/lvol1 00003
00004 current /dev/vg01/lvol1 00004
00005 current /dev/vg01/lvol1 00005
00006 current /dev/vg01/lvol1 00006
00007 current /dev/vg01/lvol1 00007



--- Physical volumes ---
PV Name /dev/dsk/c1t4d00000
VG Name /dev/vg01 00000
PV Status available
Allocatable yes 00000
VGDA 2 00000
Cur LV 3 00000
PE Size (Mbytes) 256 000
Total PE 546 00000
Free PE 266 00000
Allocated PE 280 00000
Stale PE 0 00000
IO Timeout (Seconds) default
Autoswitch On 00000
Proactive Polling On 00
00339 free 00000
--- Distribution of physical volume ---00000
LV Name LE of LV PE for LV
/dev/vg01/lvol1 40 40
/dev/vg01/lvol2 200 200
/dev/vg01/lvol3 40 40
00345 free 00000
--- Physical extents --- 00000
PE Status LV LE
00000 current /dev/vg01/lvol1 00000
00001 current /dev/vg01/lvol1 00001
Torsten.
Acclaimed Contributor

Re: How to decrease the physical Volumes Group !

Are they mirrored (lvdisplay will tell)?

Consider to unmirror (if you really want to do this).

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!   
Emil Velez
Honored Contributor

Re: How to decrease the physical Volumes Group !

if the LVs are not mirrored and the volumes will fit on the same disk you can use pvmove to move the LVs to the boot disk and then vgreduce the vg.
VK2COT
Honored Contributor

Re: How to decrease the physical Volumes Group !

Hello,

Reducing the volume group is easy but
please do an extra step to avoid
unpleasant surprises:

Run file system defragmentation before
reducing the VG (you need OnlineJFS).

For example,

# fsadm -F vxfs -DEde -t 600 /myfs

There are three factors which can be used
to determine the degree of fragmentation:

* Percentage of free space in extents of
less than eight blocks in length

* Percentage of free space in extents of
less than 64 blocks in length

* Percentage of free space in extents of
length 64 blocks or greater

An unfragmented file system will have the
following characteristics:

a) Less than 1 percent of free space in
extents of less than eight blocks in length

b) Less than 5 percent of free space in
extents of less than 64 blocks in length

c) More than 5 percent of the total file
system size available as free extents in
lengths of 64 or more blocks

A badly fragmented file system will have one
or more of the following characteristics:

d) Greater than 5 percent of free space in
extents of less than 8 blocks in length

e) More than 50 percent of free space in
extents of less than 64 blocks in length

f) Less than 5 percent of the total file
system size available as free extents in
lengths of 64

Under certain conditions (very rare though!)
fragmentation CAN be a problem.

In last 25 years, I had to do it two times
only. One was for a special 40 GB
file system that had several million files
(blood tests at hospitals)...

Cheers,

VK2COT
VK2COT - Dusan Baljevic
Kapil Jha
Honored Contributor

Re: How to decrease the physical Volumes Group !

How many LVs are there....
just do a lvdisplay -v /dev/vg/lvol

and see if the disk u want to remove has any used PV,
if yes
do defreagmentation
and check again lvdisplay -v /dev/vg/lvol

if again yes u can not remove the disk.

If the disk is mirrored you can see in
#lvdisplay /dev/vg/lvol

Then its simple just reduce LV to
lvreduce -m 0 /dev/vg/lvol
and vgreduce the disk.

BR,
Kapil+
I am in this small bowl, I wane see the real world......
baong
Frequent Advisor

Re: How to decrease the physical Volumes Group !

Hello All,
Thanks so much for all of you input, I will take a note down and try to go step by step
Again thank you all
Steven E. Protter
Exalted Contributor

Re: How to decrease the physical Volumes Group !

Shalom,

vgmodify

Ships with 11.31.

Can be added to 11.23 as a patch.

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
Hakki Aydin Ucar
Honored Contributor

Re: How to decrease the physical Volumes Group !

Hi,
Just in case of you do not have Online JFS , about how to make defragmentation. Actually as far as I know Unix does not need it (Defragmentation is not an issue with UNIX-based file systems), but check this article if you really need and you do not have Online JFS (of course having Online JFS is better)

http://www.washington.edu/R870/examples/fragmentation