Operating System - HP-UX
1833864 Members
2426 Online
110063 Solutions
New Discussion

How do I make a Mirrored VG using 2 disks on the same system?

 
SOLVED
Go to solution
Josh Wilson
Occasional Contributor

How do I make a Mirrored VG using 2 disks on the same system?

My question is probably simple, but my HPUX knowledge is rarely used. Just recently we had a system outage that occured after rebooting an HPUX 11.00 system that had been up for 759 consecutive days.

This system was rebooted due to odd behavior and after the reboot a bad drive was identified.

Now that the drive has been replaced, I need to know how to make the existing un-quorumed (sp?) VG a quorumed one (with a different vgname) utilizing both drives and mirroring the data. Right now the new drive isn't being used for anything.

Current setup info:

Existing HDD
Device name --> /dev/dsk/c0t3d0
New HDD
Device name --> /dev/dsk/c3t3d0

VG Name ------------> /dev/entvg03
LV Name ------------> /dev/entvg03/data03lv_bu


I'd like for the new volume group to be called /dev/entvg03/data03lv

I'd also like for the data stored in this logical volume to be mirrored on both drives.

Unfortunately, I don't have any HPUX 11.00 manuals handy to guide me through the process and I've only found one other article on the forums that speaks about this using 2 different machines.
Often, being an expert simply means being able to find the answer faster than anyone else.
8 REPLIES 8
Alex Lavrov.
Honored Contributor

Re: How do I make a Mirrored VG using 2 disks on the same system?

Why to mirror the whole VG if you can mirror lvol in the same vg?

Here are the steps to make a mirror:
pvcreate -f /dev/rdsk/cXtXdX
vgextend /dev/entvg03 /dev/dsk/cXtXdX
lvextend -m 1 /dev/entvg03/data03lv_bu

That's all, now you logical volume "sits" on both disks.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
Naveej.K.A
Honored Contributor

Re: How do I make a Mirrored VG using 2 disks on the same system?

Josh,

All you have to execute the three commands:

pvcreate -f /dev/rdsk/c3t3d0
vgextend /dev/entvg03 /dev/dsk/c3t3d0
lvextend -m 1 /dev/entvg03/data03lv_bu /dev/dsk/c3t3d0

with best wishes,
Naveej
practice makes a man perfect!!!
Mark Nieuwboer
Esteemed Contributor
Solution

Re: How do I make a Mirrored VG using 2 disks on the same system?

Wilson,

You want yor data on a different logical volume and then mirror this logical volume.
the first step is
pvcreate -f /dev/rdsk/c3t3d0
vgextend /dev/entvg03 /dev/dsk/c3t3d0

then backup the data on the data03lv_bu from its mountpoint probebly the best way is tar.

then lvcreate -L -m 1 -n data03lv /dev/entvg03

umount the filesystem which runs on /dev/entvg03/data03lv_bu

change in the /etc/fstab /dev/entvg03/data03lv_bu in /dev/entvg03/data03lv
mount -a
unpack the tar file you made.
and then your done.

grtz. Mark
Cem Tugrul
Esteemed Contributor

Re: How do I make a Mirrored VG using 2 disks on the same system?

Josh,
in Additional for replies also take a look
of this doc.
Good Luck,
Our greatest duty in this life is to help others. And please, if you can't
Josh Wilson
Occasional Contributor

Re: How do I make a Mirrored VG using 2 disks on the same system?

When I attempted to perform the pvcreate step, I received the following message:

root@hpk210b:[/etc]pvcreate -f /dev/rdsk/c0t3d0

pvcreate: The physical volume "/dev/dsk/c0t3d0" is already recorded in the "/etc/lvmtab" file.

What do I need to do in order to be able to perform the first step?
Often, being an expert simply means being able to find the answer faster than anyone else.
Alexey_12
Occasional Advisor

Re: How do I make a Mirrored VG using 2 disks on the same system?

It looks like original drive was a part of Volume Group. Can you execute following command to get more information:

pvdisplay /dev/dsk/c0t3d0
Cem Tugrul
Esteemed Contributor

Re: How do I make a Mirrored VG using 2 disks on the same system?

what is the output;
strings /etc/lvmtab
cat /etc/fstab
Our greatest duty in this life is to help others. And please, if you can't
Devender Khatana
Honored Contributor

Re: How do I make a Mirrored VG using 2 disks on the same system?

Hi,

Your this disk was part of VG prior to failure. Why do not you try

#vgcfgrestore -n /dev/entvg03 /dev/rdsk/c0t3d0

For this the new HDD should have same device file what old disk had.

Otherwise reduce VG from the failed disk and extend it to new disk and recreate mirror for the lvol.
#lvreduce -m 0 /dev/entvg03/data03lv_bu /dev/dsk/c0t3d0

#vgreduce -f /dev/entvg03 /dev/dsk/c0t3d0

#vgextend /dev/entvg03 /dev/dsk/c3t3d0

#lvextend -m 1 /dev/entvg03/data03lv_bu /dev/dsk/c3t3d0

HTH,
Devender
Impossible itself mentions "I m possible"