Volume group not activated

 
Yaroki
Super Advisor

Volume group not activated

Hello,

 

I have 3 disks on my HP-UX (B.11.11).

 

# ioscan -funC disk

 

Class     I  H/W Path       Driver  S/W State   H/W Type     Description

=========================================================================

disk      0  0/2/1/0.5.0    sdisk   CLAIMED     DEVICE       HP 73.4GST373453LW

                           /dev/dsk/c0t5d0   /dev/rdsk/c0t5d0

disk      1  0/2/1/0.6.0    sdisk   CLAIMED     DEVICE       HP 73.4GST373207LW

                           /dev/dsk/c0t6d0   /dev/rdsk/c0t6d0

disk      2  0/3/2/0.1.0.0  sdisk   CLAIMED     DEVICE       HL-DT-STDVD-ROM GDR8163B

                           /dev/dsk/c3t0d0   /dev/rdsk/c3t0d0

 

# vgdisplay -v | grep "PV Name"

vgdisplay: Volume group not activated

vgdisplay: Cannot display volume "/dev/vg00".

    PV Name                          /dev/dsk/c0t6d0

 

Should I leave it as is?

What benefits I earn if I will activate the volume group?

What should I do in order to activate the volume group?

 

BR,

 

yali

 

 

7 REPLIES 7
Matti_Kurkela
Honored Contributor

Re: Volume group not activated

In general, if a volume group is not activated, you should not be able to access its LVs.

 

But vg00 is the system volume group: when the system is running normally, it should always be activated.

 

Note that the system is not saying that the name of the not-activated volume group is vg00: the first message might be about another volume group on some disk(s) that used to be on this system, but have now been disconnected. Perhaps the volume group configuration was not properly removed at that time.

 

The second message says that there is supposed to be a volume named /dev/vg00: this suggests there may be a configuration error, as /dev/vg00 is supposed to be the name of a volume group, not a volume (physical volumes would be named /dev/dsk/c<number>t<number>d<number>, and logical volumes /dev/vg<name>/<lvname>). Your volume group configuration might have some errors: I would have to see more details before I can suggest corrective actions.

 

Please run the following commands:

vgdisplay -v >/tmp/volumegroups.txt
strings /etc/lvmtab >>/tmp/volumegroups.txt

The commands will create a text file /tmp/volumegroups.txt. Please attach it to this thread for analysis.

 

MK
Yaroki
Super Advisor

Re: Volume group not activated

Thank you for the reply,

 

You right, I have been noticed that a hardware disk has been physically replaced here (without any action).

 

I attached the commands results.

 

Yali

Matti_Kurkela
Honored Contributor

Re: Volume group not activated

Looks like there used to be a volume group "vg01". The only physical volume associated with it was /dev/dsk/c0t5d0, so it was not mirrored. I guess this was the disk that was replaced, right? (The device name indicates it had SCSI ID #5.)

 

The data that was on the LVs of vg01 is now lost, unless you have backups of it.

 

The next question is, what do you want to do with it?

You could:

  • restore the vg01 to the same configuration it used to be (but it will be empty)
  • or completely remove the remains of the old vg01, leaving the disk /dev/dsk/c0t5d0 free for other uses (e.g. for mirroring the system disk)

To restore the configuration of vg01:

vgcfgrestore -n vg01 /dev/dsk/c0t5d0
vgchange -a y vg01
for i in /dev/vg01/lv*; do mkfs -F vxfs -o largefiles $i; done
mount -a

If the LVs of vg01 had custom names (instead of the standard form /dev/vg01/lvol*), the third command might need some modifications. Essentially, you'll need to run mkfs to create a filesystem on each LV that was on vg01, since the replaced disk is totally empty. If the LVs of vg01 were properly configured in /etc/fstab, then "mount -a" will automatically mount them to the correct mount points. After this, vg01 is ready for restoration of the data from backups.

 

-------------------------------------------------

 

To remove the remains of the old vg01:

vgexport vg01
<edit /etc/fstab: remove all lines that refer to vg01>

 (The vgexport command will create a file named "mapfile" in the current directory, but since the real vg01 is already gone, the file is useless and you can delete it.)

After this, the vg01 will be completely gone and the disk /dev/dsk/c0t5d0 will be completely free for other uses.

If you have the MirrorDisk software licensed and installed, it might be a good idea to use it for mirroring the system disk. A step-by-step procedure for that is listed in HP document titled "When Good Disks go Bad": search the forums or Google for it.

MK
Yaroki
Super Advisor

Re: Volume group not activated

Hello Mati,

 

If I choose the first option - restore the vg01 to the same configuration it use to be:

 

1. Does the installed os keep work normally? (I guess the answer will be "yes" because you noted that vg01 is not in use and the os installed on vg00). Due to that, I guess the process can be performed while other users working on the installed os simultaneously (?)

 

2. How can an I use the vg00 after the process? (Extend logical volume from it to the vg01 for instance?)

 

BR,

Yali

Matti_Kurkela
Honored Contributor

Re: Volume group not activated

1.) The OS itself will not be affected at all. However, if the system has any applications that were configured to use vg01, those applications may now have used the mount point directories as regular directories. You should look into /etc/fstab to identify the mount point(s) used by vg01, and see if any of your applications uses them - if they do, you may have to stop the applications and temporarily move the accumulated data elsewhere before running "mount -a" to mount the now-empty filesystem(s) of vg01 to the mount point(s). After that, you can move the data back to where it was.

 

If you don't do this, the empty filesystem(s) of vg01 will cover the existing data on the mount point(s): to the users, it will look like the data is gone, but it will still be there, just hidden under the now-mounted filesystems. The "lost" data could be recovered simply by unmounting the respective filesystem. (If you need a more detailed explanation, please show your /etc/fstab file.)

 

If the mountpoint(s) of vg01 have not been used since the disk was replaced, the respective mount point directories should be empty. In this case, you should be able to perform the procedure I outlined previously while other users keep working.

 

2.) You can never extend a logical volume from one VG to another: if you want to make a logical volume bigger than its current VG allows, you should add one or more PVs to the VG that contains the logical volume (the command for that is "vgextend"; see "man vgextend" for details and examples).

 

vg00 is the system volume group. In general, you should avoid putting your application/user data files to the system volume group if you can avoid it. But on HP-UX 11.11 and with only two 73 GB disks, this can leave a lot of disk capacity unused. An acceptable solution in this case would be to create an extra logical volume in vg00 (or more than one, if required) and use those for application data. You would need the "lvcreate" command to create new LVs, then "mkfs" to create a filesystem on the new LV, then create a mountpoint for it and edit /etc/fstab to make the new LV mount automatically at system boot time. (Or you could use SAM to do all these steps for you.)

 

If the entire OS + all your application data fits within 73 GB, and you have MirrorDisk licensed, creating an application data LV on vg00 might be a better solution than having a separate vg01 for application data: with all your data in vg00, you could use the c0t5d0 disk as a mirror for vg00 (see the "When Good Disks go Bad" document for the mirroring procedure). That would make your system much safer against disk failures.

 

(By the way, you originally said you have three disks. But the ioscan listing in your original post indicates /dev/dsk/c3t0d0 is not a real disk: it is a DVD-ROM drive.)

MK
Yaroki
Super Advisor

Re: Volume group not activated

Hi,

 

1. According to /etc/fstab no mount point uses vg01. The only mount points are for dev/vg00/lvol(x) and other HP-UX machines that connected to the net.

 

2. Since I do not hold a Mirror Disk licence what will be the use of activating vg01?

 

BR,

 

Yali

 

Yaroki
Super Advisor

Re: Volume group not activated

And one more thing, at this situation can I simply ignore disk c0t5d0? Or even take it out of the system?

If the answer will be yes, I would like know whether I can install this disk on HP-UX B.10.20?