LVM and VxVM

Problem linking disks from EVA to System VGxx

 
SOLVED
Go to solution
jk31214
Occasional Contributor

Problem linking disks from EVA to System VGxx

In an attempt to create a DR plan (w/o ignite server).  I have been trying to Recover from tape to new hardware.

 

So far:

1. Created snap clones of exisiting VGs on EVA

2. Presented LUNs to the new host

3. Start recovery using tape and go into Advanced pre-config (New Server sees the H/W paths to EVA disks)

4. Point the disks to the VGxx's

5. Recovered server using tape 

6. mount the old directories to the proper lvols on each VG. (I had to comment out the existing entries in  /etc/fstab to get this to work.  otherwise they would not mount)

7. obviously the /dev/dsk/cxtxdx are not the same (does that matter?)

 

When I nav to the directories that should be filled with data, there is nothing in them!  What am I doing wrong?

9 REPLIES 9
Henry Fauni
Valued Contributor

Re: Problem linking disks from EVA to System VGxx

Questions regarding your issue:

 

1. Created snap clones of exisiting VGs on EVA

- -> Are you mounting the snapclones to the new server or are you actually mounting the EVA source LUNs?

 

4. Point the disks to the VGxx's

- ->  Did you do a vgimport?

 

6. mount the old directories to the proper lvols on each VG. (I had to comment out the existing entries in  /etc/fstab to get this to work.  otherwise they would not mount)

- -> You need to edit the /etc/fstab file so that the imported VG's are used, but you can use the same mount point.

 

7. obviously the /dev/dsk/cxtxdx are not the same (does that matter?)

- -> It doesn't matter, as long as you use the right ones when you do the vgimport.

 

When I nav to the directories that should be filled with data, there is nothing in them!  What am I doing wrong?

- - > Do the filesystems show mounted when you do a bdf?

 

Henry Fauni
Valued Contributor

Re: Problem linking disks from EVA to System VGxx

3. Start recovery using tape and go into Advanced pre-config (New Server sees the H/W paths to EVA disks)

- -> Whenever I do recovery to a different system, I always turn off "Automatically import VG's", and then I just manually import the VG's myself after recovery. You will have a higher chance of success doing it this way.

jk31214
Occasional Contributor

Re: Problem linking disks from EVA to System VGxx

1. Created snap clones of exisiting VGs on EVA

- -> Are you mounting the snapclones to the new server or are you actually mounting the EVA source LUNs?

 Yes.  I am mounting the snapclones to the new box

 

4. Point the disks to the VGxx's

- ->  Did you do a vgimport?

 If I recover from tape, and choose to import existing volume groups, /etc/lvmtab is already populated.  If I attempt it without choosing to import existing volume groups, I do:

vgimport -v /dev/vg01 /dev/dsk/c3t0d1

vgimport -v /dev/vg02 /dev/dsk/c3t0d2

...etc.

 

6. mount the old directories to the proper lvols on each VG. (I had to comment out the existing entries in  /etc/fstab to get this to work.  otherwise they would not mount)

- -> You need to edit the /etc/fstab file so that the imported VG's are used, but you can use the same mount point.

When I try to import the vgxx's it says that /etc/fstab already contains entries, so I tried commenting them out and redid the vgimport.

 

7. obviously the /dev/dsk/cxtxdx are not the same (does that matter?)

- -> It doesn't matter, as long as you use the right ones when you do the vgimport.

 

When I nav to the directories that should be filled with data, there is nothing in them!  What am I doing wrong?

- - > Do the filesystems show mounted when you do a bdf?

yes.  I can always restore the data from my tape library, but I'd rather have up to the minute data from the snap cloned disks rather than last night's data from backups.

 

jk31214
Occasional Contributor
Solution

Re: Problem linking disks from EVA to System VGxx

SOLVED

I finally got that to work.

 

First I made new snap clones, just to start fresh.  Then I recovered from tape again.  But instead of trying to set up the VGs before the recovery, I just set it to Import Vgs FALSE.  And went on with the installation.

 

Then I activated VGs # vgchange -ay vg01...etc

Then I imported VGs # vgimport -v /dev/vg01 /dev/dsk/c3t0d1...etc

 

bdf did not show them mounted at this point

 

I tried to mount the lvols to their mount points, but the server just hung each time I tried.

 #mount -F vxfs /dev/vg01/lvol1 /exampledirectory

I can't explain why

 

So, I just rebooted the server and it mounted them all correctly.

bdf shows all mount points correctly and the directories are populated with the correct files

jk31214
Occasional Contributor

Re: Problem linking disks from EVA to System VGxx

The only other discrepancy that I notice is that the /etc/lvmpvg carries over from the old server and does not match the new configuration.  On the old server there were multipathing fibre channels with links from the EVAs VGs to the disks, but on my recovery server, we are using only one channel.

 

OLD server /etc/lvmpvg

VG        /dev/vg01

PVG     vg01

/dev/dsk/c11t0d1

/dev/dsk/c16t0d1

 

NEW server vg01 is /dev/dsk/c3t0d1

 

This isn't affecting anything right now, and I'm not really sure if it needs to be changed.

Henry Fauni
Valued Contributor

Re: Problem linking disks from EVA to System VGxx

I'm glad to hear you got it working! I just have a couple of comments:

 

"Then I activated VGs # vgchange -ay vg01...etc

Then I imported VGs # vgimport -v /dev/vg01 /dev/dsk/c3t0d1...etc"

 

- -> You want to do the vgimport fist, before activating the volume group. When I do the vgimport, I do a preview first (-p -v option) to make sure I chose the right disk(s).

 

# vgimport -p -v vg01 /dev/dsk/c3t0d1

- It will show a message saying:

Beginning the import process on Volume Group "/dev/vg01".

vgimport: Warning:  Volume Group belongs to different CPU ID.

Can not determine if Volume Group is in use on another system. Continuing.

Logical volume "/dev/vg01/lvol1" has been successfully created

with lv number 1.

Volume group "/dev/vg01" has been successfully created.

Warning: A backup of this volume group may not exist on this machine.

Please remember to take a backup using the vgcfgbackup command after activating the volume group.

 

Note that you should see all the lvols being created(if you have more than 1). Once you see the message above and everything is ok. Proceed with:

# vgimport vg01 /dev/dsk/c3t0d1

 

Then at this point you activate the vg

# vgchange -a y vg01

 

Then you want to backup the VG config on this system:

# vgcfgbackup vg01

 

Then you want to do the fsck. This is required because the original vg is from a different system.

# fsck -y /dev/vg01/rlvol1

- Do this for all the logical volumes in vg01

 

Then you mount the filesystem(s). You should already have the appropriate entries in /etc/fstab file from the original system.

# mount /original_mount_point

- Do this for all the filesystems in vg01

 

Henry Fauni
Valued Contributor

Re: Problem linking disks from EVA to System VGxx

Yes, you're supposed to edit the /etc/lvmpvg to reflect the correct device files on the new server. Please post "ioscan -funC disk", and let's see if you have alternate links.

jk31214
Occasional Contributor

Re: Problem linking disks from EVA to System VGxx

The original box had alternate links through redundant fibre channels which is why there are twice as many.  The DR box is only using one channel right now.

 

ORIGINAL BOX:

# ioscan -funC disk
Class     I  H/W Path        Driver   S/W State   H/W Type     Description
===========================================================================
disk      6  1/0/2/1/0.3.27.0.0.0.1  sdisk    CLAIMED     DEVICE       HP      HSV200
                            /dev/dsk/c11t0d1   /dev/rdsk/c11t0d1
disk      8  1/0/2/1/0.3.27.0.0.0.2  sdisk    CLAIMED     DEVICE       HP      HSV200
                            /dev/dsk/c11t0d2   /dev/rdsk/c11t0d2
disk     16  1/0/2/1/0.3.27.0.0.0.3  sdisk    CLAIMED     DEVICE       HP      HSV200
                            /dev/dsk/c11t0d3   /dev/rdsk/c11t0d3
disk     18  1/0/2/1/0.3.27.0.0.0.4  sdisk    CLAIMED     DEVICE       HP      HSV200
                            /dev/dsk/c11t0d4   /dev/rdsk/c11t0d4
disk     20  1/0/2/1/0.3.27.0.0.0.5  sdisk    CLAIMED     DEVICE       HP      HSV200
                            /dev/dsk/c11t0d5   /dev/rdsk/c11t0d5
disk      4  1/0/4/1/0.4.31.0.0.0.1  sdisk    CLAIMED     DEVICE       HP      HSV200
                            /dev/dsk/c16t0d1   /dev/rdsk/c16t0d1
disk     11  1/0/4/1/0.4.31.0.0.0.2  sdisk    CLAIMED     DEVICE       HP      HSV200
                            /dev/dsk/c16t0d2   /dev/rdsk/c16t0d2
disk     13  1/0/4/1/0.4.31.0.0.0.3  sdisk    CLAIMED     DEVICE       HP      HSV200
                            /dev/dsk/c16t0d3   /dev/rdsk/c16t0d3
disk     15  1/0/4/1/0.4.31.0.0.0.4  sdisk    CLAIMED     DEVICE       HP      HSV200
                            /dev/dsk/c16t0d4   /dev/rdsk/c16t0d4
disk     22  1/0/4/1/0.4.31.0.0.0.5  sdisk    CLAIMED     DEVICE       HP      HSV200
                            /dev/dsk/c16t0d5   /dev/rdsk/c16t0d5

 

NEW BOX:
# ioscan -funC disk
Class        I  H/W Path        Driver         S/W State   H/W Type     Description
====================================================================================
disk         1  0/7/1/0.4.31.0.0.0.1  sdisk          CLAIMED     DEVICE       HP      HSV200
                               /dev/dsk/c3t0d1   /dev/rdsk/c3t0d1
disk         2  0/7/1/0.4.31.0.0.0.2  sdisk          CLAIMED     DEVICE       HP      HSV200
                               /dev/dsk/c3t0d2   /dev/rdsk/c3t0d2
disk         3  0/7/1/0.4.31.0.0.0.3  sdisk          CLAIMED     DEVICE       HP      HSV200
                               /dev/dsk/c3t0d3   /dev/rdsk/c3t0d3
disk         4  0/7/1/0.4.31.0.0.0.4  sdisk          CLAIMED     DEVICE       HP      HSV200
                               /dev/dsk/c3t0d4   /dev/rdsk/c3t0d4
disk         5  0/7/1/0.4.31.0.0.0.5  sdisk          CLAIMED     DEVICE       HP      HSV200
                               /dev/dsk/c3t0d5   /dev/rdsk/c3t0d5

 

ORIGINAL BOX and NEW BOX:

#more /etc/lvmpvg

VG      /dev/vg01
PVG     vg01
/dev/dsk/c11t0d1
/dev/dsk/c16t0d1

Henry Fauni
Valued Contributor

Re: Problem linking disks from EVA to System VGxx

ORIGINAL BOX and NEW BOX:

#more /etc/lvmpvg

VG      /dev/vg01
PVG     vg01
/dev/dsk/c11t0d1
/dev/dsk/c16t0d1

 

To get rid of the message saying "PV group doesn't match" whenever you do a "vgdisplay", just edit the NEW BOX entry with:

VG      /dev/vg01
PVG     vg01
/dev/dsk/c3t0d1

 

Although the PVG group entry only comes into play when you do LVM mirroring and you're using "strict" policy to make sure each extent has a copy in both PVG's, or whenever you create a logical volume with distributed allocation policy and you want the extents evenly distributed to all the disks in the PVG.

 

Since you only have 1 disk in the PVG, you can simply remove the whole entry for vg01 in the NEW BOX.