Operating System - HP-UX
1833927 Members
3123 Online
110063 Solutions
New Discussion

how to reduce the volum group

 
Mousa55
Super Advisor

how to reduce the volum group

Hi
how to reduce the volum group on a SAM
that to remove all which in it
becuase i am delete file from this vg by using rm command and i want to remove phisicaly from the same vg
thanks
5 REPLIES 5
skt_skt
Honored Contributor

Re: how to reduce the volum group

I hope you requierment is to remove the disk from VG and make the disk is empty interm s of data.

vgchange -a n vgname
vgexport vgname
pvcreate raw-disk(use -f if failed;
Steven E. Protter
Exalted Contributor

Re: how to reduce the volum group

Shalom,

1) vgdisplay -v
2) lvremove each logical volume displayed
3) vgreduce each disk out of the volume group
4) vgremove the volume group including the last disk.

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
Basheer_2
Trusted Contributor

Re: how to reduce the volum group


to remove/reduce vg2
1) bdf | grep vg2
this will give you all the file systems mounted for this vg2

2) umount each of the file systems

3) lvremove each-lvol

4) vgdisplay -v vg2 will give you all the physical volumes

if there is more than one, then do
vgreduce /dev/vg2 /dev/dsk/pv-path

repeat vgreduce for all pvs except the last one.
5) vgremove /dev/vg2

6) vi /etc/fstab
remove or comment out all the lvs for this vg.


first umount your file systems for each of the lvs.

vgdisplay -v | grep
Use Steve's stpes and
Raj D.
Honored Contributor

Re: how to reduce the volum group

Nejad,

i) What is the output of:

# strings /etc/lvmtab | grep vg

ii)# ls -l /dev/ | grep vg

iii) vgdisplay -v | grep "VG Name"

Btw, you can reduce the vg with vgreduce command,
- if you mean to remove, do
(i) unmount all the LVs.
(ii) remove all the LV's
(ii) deactivate vg.
(iii) use vgremove.
cheers,
Raj.

" If u think u can , If u think u cannot , - You are always Right . "
Shardha
Valued Contributor

Re: how to reduce the volum group

Dear

I believe you need to till the step 3. as mentioned by steven.
as you purpose is to remove one hdd from the existing vg.

Shardha.