1826428 Members
3769 Online
109692 Solutions
New Discussion

Re: /etc/lvmtab

 
SOLVED
Go to solution
Jack_126
Frequent Advisor

/etc/lvmtab

Dear All,
Can I remove the entry of vg03 from /etc/lvmtab file using vi editor directly instead of using the below commands....
lvremove -f /dev/vg03/lvol1
vgremove vg03
rm -r /dev/vg03.
5 REPLIES 5
Pete Randall
Outstanding Contributor
Solution

Re: /etc/lvmtab

Jack,

I wouldn't recommend it. Instead, try moving it aside and re-creating it with vgscan:

mv /etc/lvmtab /etc/lvmtab.old
vgscan -a


Pete

Pete
Fred Ruffet
Honored Contributor

Re: /etc/lvmtab

Editing the file is rather a bad idea. You'd better use the commands. Consider that, if such commands exist, means they are usefull. For instance, they will have currently running LVM daemon to know about that changes.

You may also consider using vgexport command.

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
eran maor
Honored Contributor

Re: /etc/lvmtab

Hi

no , you cant do it by editing the file .

you will need to do the command that you run , after that do mv lvmtab lvmtab.orig and then run vgscan to recreate the lvmtab again with the rigth entry .

eran maor
love computers
HGN
Honored Contributor

Re: /etc/lvmtab

Hi

This cannot be done by editing the /etc/lvmtab file. make a copy of the lvmtab and remove it. You can then run the vgscan command which will create the lvmtab with the available disks.

Rgds

HGN
A. Clay Stephenson
Acclaimed Contributor

Re: /etc/lvmtab

There is binary data in this file so simply using a text editor is out of the question. By far, the easist method is to simply deactivate the volume group and then do a vgexport /dev/vg03. It's all gone.
If it ain't broke, I can fix that.