cancel
Showing results for 
Search instead for 
Did you mean: 

lvm question

navin
Super Advisor

lvm question

how do i remove a physical disk path from lvmtab file

Learning ...
11 REPLIES
kemo
Trusted Contributor

Re: lvm question

Patrick Wallek
Honored Contributor

Re: lvm question

Remove it from the volume group.
Nido
Trusted Contributor

Re: lvm question

Hi,

Remove the physical volume from the Volume group, move old /etc/lvmtab file to other location and run vgscan again to have new lvmtab in place.

Thanks,
" Let Villagers Be Happy!! "
Kranti Mahmud
Honored Contributor

Re: lvm question

Hi Navin,

Check the attached doc.

Rgds-Kranti
Dont look BACK as U will miss something INFRONT!
R.K. #
Honored Contributor

Re: lvm question

Hi Navin,

In order to remove only one disk from lvmtab, you can simply do:
# vgreduce vgXX /dev/dsk/cxtydz

If the disk is not responding or giving trouble, you use:
# vgreduce -f vgXX <== this will reduce missing PV from a VG

If you want to remove all the disks in a VG, that is you no longer need a VG, use following command to get rid of that VG permanently:
# vgexport vgXX


See man page of above commands for more options.

Hope this helps.

Regds,
R.K.
Don't fix what ain't broke
Taifur
Respected Contributor

Re: lvm question

Hi Navin,

Follow the below steps,

If lvm is created , then
#umount /mountpont
#lvremove -f /dev/vgxx/lvyy
#vgchange -a n /dev/vgxx

Remove physical volume /dev/dsk/cxtxdx from volume group /dev/vgxx:

#vgreduce /dev/vgxx /dev/dsk/cxtxdx
Force reduction of missing PVs from volume group: vg01

#vgreduce -f /dev/vgxx

After that check
#strings /etc/lvmtab

or,
Export the volume group /dev/vg01 into mapfile vg01.mymap. The volume group will be removed from the exporting system.

#vgexport -m vgxx.mymap /dev/vgxx

http://docs.hp.com/en/B3921-60631/vgreduce.1M.html

http://docs.hp.com/en/B2355-60103/vgexport.1M.html

Rgds//
Taifur
Sajjad Sahir
Honored Contributor

Re: lvm question

Dear Navin


Please see the link


http://docs.hp.com/en/5992-4616/ch03s01.html

thanks and regards

Sajjad Sahir
Suraj K Sankari
Honored Contributor

Re: lvm question

Hi,

You can use "vgexport" "vgreduce" or "sam" to remove physical disk.

Suraj
Johnson Punniyalingam
Honored Contributor

Re: lvm question

>>>how do i remove a physical disk path from lvmtab file<<<

# vgreduce /dev/ /dev/dsk/cxtxdx

# vgexport /dev/



# cp -pi /etc/lvmtab /etc/lvmtab.old

# mv /etc/lvmtab /etc/lvmtab.16april2006

# /usr/sbin/vgscan -v

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
Patrick Wallek
Honored Contributor

Re: lvm question

Unless you have other issues, you should not need to do a vgscan after removing a disk from a VG to remove it from the /etc/lvmtab file.

That is part of the work that the LVM commands do.

The question was: "how do i remove a physical disk path from lvmtab file."

The answer is "remove the disk from the VG." To do this you use the vgreduce command. If everything else is working correctly, that is ALL you need to do.

If you have other problems, then other actions may be required, but that is not what was asked.
James R. Ferguson
Acclaimed Contributor

Re: lvm question

Hi:

I second Patrick's last response. You should familarize yourself with the side-effects of running 'vgscan' to reconstruct an 'lvmtab'. Read the WARNINGS section of the manpages!

http://www.docs.hp.com/en/B2355-60130/vgscan.1M.html

As noted, if there isn't a specific need to reconstruct the 'lvmtab' then doing so only leads to more work on your part!

Regards!

...JRF...