Operating System - HP-UX
1826428 Members
4068 Online
109692 Solutions
New Discussion

Re: Old VG information in /dev

 
SOLVED
Go to solution

Old VG information in /dev

Hello,

I have inherited a K450 running HPUX 10.20 which has old VG information in /dev that I'd like to get rid of. Basically, there are 2 VGs listed in /dev which really don't exist- I suspect they were created and vgremoved in the past, and the previous admin didn't remove the device files in /dev. Anyway, I added 2 new VGs to this box which are working fine, but I noticed that the 2 old VG's have the same minor number as the 2 new VG's I created. When I run vgscan -P it reports the old VG's names instead of the 2 new ones. Can I safely remove the old VG directories from /dev? Thanks in advance from an HPUX newbie.
4 REPLIES 4
suki
Frequent Advisor
Solution

Re: Old VG information in /dev

Hi,
Check the contents of /etc/lvmtab by using #strings /etc/lvmtab. If it contains both OLD VG info and New VG info. Export the OLD VG info by # vgexport . It removes the directory structure and the entry from /etc/lvmtab.
If it contains only New VG info then u can very well remove the old VG directory structure under /dev.
If it contains only OLD VG info. Make a backup of /etc/lvmtab, VG backup using vgcfgbackup and map file using vgexport -p. Then u can safely remove your OLD VG Directories and run a vgscan. I hope this solves ur problem.
- suki
RAC_1
Honored Contributor

Re: Old VG information in /dev

Check /etc/lvmtab.
strings /etc/lvmtab does it show old VGs there? if yes then do vgexport old vgs. This will also remove /dev/oldvgs directory.

If lvmtab does not have the entries for old vgs, then you can just do rm for old vg directories.

Now do vgcfgbackup and vgexport to backup new vgs config. mv lvmtab to lvmtab.old and do vgscan.
There is no substitute to HARDWORK
T G Manikandan
Honored Contributor

Re: Old VG information in /dev

The best way would be to do a
vgexport of the OLD vg on the system.

First do a

#vgchange -a n
#vgexport -m vgXX.map /dev/vgXX

This should remove the associate files in the /dev and the associated entries in the /etc/lvmtab.

Re: Old VG information in /dev

Thanks to all who answered. Indeed there were no entries in lvmtab for these old VG's so I just removed the entries in /dev and all seems well. Thanks again!