Operating System - HP-UX
1752805 Members
5570 Online
108789 Solutions
New Discussion юеВ

How to add a drive to an existing volume-group

 
Suresh Patoria
Super Advisor

Re: How to add a drive to an existing volume-group

Hi

# pvcreate -f /dev/rdsk/c#t#d#

# vgextend /dev/vg00 /dev/dsk/c#t#d#

then check the confdiguration updated or not

# strings /etc/lvmtab

# vgdisplay -v /dev/vg00

Thanx

Jakes Louw
Trusted Contributor

Re: How to add a drive to an existing volume-group

To answer your original question: "I guess there is no chance of accessing the old data":-
correct, that data is lost. Unless you have access to wizzy data saving stuff like the CIA. But what SAM probably did was a VGREDUCE that removes the VGDA info from the disk. That also means that an "LVREDUCE" or "LVREMOVE" would have been done before this, and the pointers to the LVOL starting track would have been removed as well.
HOWEVER: if you have a backup of /etc/lvmconf, you could restore an old version of the LVMCONF for that volume-group, and then do a "VGCFGRESTORE -n VGNAME -l " to list the disks that were present. If that disk is recorded, then do a "VGCFGRESTORE -n VGNAME -f restored_conf_file".
Then you need to do a VGSCAN to rebuild the LVMTAB.


Trying is the first step to failure - Homer Simpson
Hans Kamann
Advisor

Re: How to add a drive to an existing volume-group

I managed to fix this problem. Thanks for your tips.
But now I have another:
This system had two vgs, VG00 and vg01. Both had four lvols, vgdisplay -v showed four lvols and all were active.
I used SAM to enable one more drive to be used by a database application ( AMASS). I saw one unused drive, added it to vg01. No error messages. I configured the database software, rebooted the server. The server now tells me, the kernel says vg00 has four drives configured but only three were available. I cannot change this, vgrestore does not work.
What to do now ?
Jakes Louw
Trusted Contributor

Re: How to add a drive to an existing volume-group

Hans

Do a "dmesg" and check for any error messages.
Do a "vgdisplay -v /dev/vg00" and check firstly for any error messages, and secondly check the status of the drives at the end of the vgdisplay info. The drives should usually be in an "available" state (PV Status).

Trying is the first step to failure - Homer Simpson
Hans Kamann
Advisor

Re: How to add a drive to an existing volume-group

dmesg:
interesting bit:
error lvm: failed in attaching PV ( 8/4.15.0) to the root volume group. Cross device link to the disk is not lvm disk logical volume 64. 0x2 configured as swap
warning volume for dump expected but not found ...

Hans Kamann
Advisor

Re: How to add a drive to an existing volume-group

dmesg:
interesting bit:
error lvm: failed in attaching PV ( 8/4.15.0) to the root volume group. Cross device link to the disk is not lvm disk logical volume 64. 0x2 configured as swap
warning volume for dump expected but not found ...

This 8/4.15.0 ( /dev/rdsk/c0t14d0) was used for the database

Jakes Louw
Trusted Contributor

Re: How to add a drive to an existing volume-group

What type of disks are these?

You say you added this disk using SAM?
Trying is the first step to failure - Homer Simpson
Hans Kamann
Advisor

Re: How to add a drive to an existing volume-group

The drives are Seagate HotSwap devices, external drives. The machine is a K220 running HPUX_10.20. I guess the first thing I have to do is to reconfigure the Swap/Dump drive. The drive was displayed as "unused" in SAM, but as far as I can see this is not unusal for Swap drives.
Rgomes
Valued Contributor

Re: How to add a drive to an existing volume-group

Hi Hans,

You can check this out.

rgrds,
Richard
Jakes Louw
Trusted Contributor

Re: How to add a drive to an existing volume-group

Hans

I'm not sure I understand: "The drive was displayed as "unused" in SAM, but as far as I can see this is not unusal for Swap drives"?
As far as I know, there is no way on any version of HP-UX after 9.x to add a disk as swap if it is not part of a VG?
Trying is the first step to failure - Homer Simpson