Operating System - HP-UX
1829914 Members
1660 Online
109993 Solutions
New Discussion

Problem to vgsacn and vgdisplay

 
SOLVED
Go to solution
Achilles_2
Regular Advisor

Problem to vgsacn and vgdisplay

When I use the vgdisplay command to view the information about LV, it always display the error

vgdisplay: Volume group not activated.
vgdisplay: Cannot display volume group "/dev/vg01"

There are 2 logical volumes in my system before but recently one of them is removed, so that I run vgscan command to re-creation of the /etc/lvmtab file and possibly the associated volume group device files. But the case is still exist.

Also I use the set_parms hostname command to change host name. But now I don't know why everytime when the system is reboot, the hostname will restore the previous one. Then I try to use the same command to change it manually, but it shows the correct one.

Do anyone know what happens in my 2 case?
Thanks you for your help
3 REPLIES 3
Devender Khatana
Honored Contributor
Solution

Re: Problem to vgsacn and vgdisplay

Hi,

The 2 logical volumes you are mentioning are infact physical volumes you are talking about.

The reason for the error is that your VG has one missing disk which is not allowing it to get activated.

Try this
#vgchange -a y -q n /dev/vg01

No vgdisplay and vgscan will work but will give missing volume error during vgscan.

Once VG is activated and you are sure that everything is fine and you are able to mount file systems, remove the information related to second disk from the VG to avoid this on next reboot.

For this find out missing disk from "strings /etc/lvmtab". It should be current lvmtab or its copy.

#vgreduce /dev/vg01 /dev/dsk/cxtydz

(Where /dev/dsk/cxtydz was the disk removed from the VG)

If this does not work as the disk is currently missing then try

#vgreduce -f /dev/vg01

Now again try vgscan.

HTH,
Devender
Impossible itself mentions "I m possible"
morganelan
Trusted Contributor

Re: Problem to vgsacn and vgdisplay

Check your setup parameter in /etc/lvmrc file, it should look like follow:
AUTO_VG_ACTIVATE=1, if not like this it means
your automatic volume group activation is disabled.
Kamal Mirdad
Vincente Fernandes
Valued Contributor

Re: Problem to vgsacn and vgdisplay

make sure the hostname is changed in file "/etc/rc.config.d/netconf"

Check the following lines
HOSTNAME="xxxxxxxx"
OPERATING_SYSTEM=HP-UX
LOOPBACK_ADDRESS=127.0.0.1

Also the hostname is changed in /etc/hosts file too. If both files have the correct hostname and reboot the server the problem should be resolved. This is what i do all the time and is 100% success.