Operating System - HP-UX
1834814 Members
2510 Online
110070 Solutions
New Discussion

Re: Using LVM with AutoPath

 
Mario Cruz_1
Occasional Contributor

Using LVM with AutoPath

Hello everybody.

I was wondering whether if possible to use the AutoPath Virtual Device (i.e. /hpap/dsk/hpap1) in the creation of a LVM volume group.

This is because I want to use the high availability and load balancing characteristics of Secure Path/autopath with my database

It's important to say that I want smaller pieces of disk (i.e. Logical Volumes) to use them in the creation of Raw Devices for a Sybase database.

We are currently working on HP Ux 11i v2 and Secure Path version A.3.0F.04F.01F

Thanks in advance!
12 REPLIES 12
sujit kumar singh
Honored Contributor

Re: Using LVM with AutoPath

hi

this can be done and is feasible.you shall need to maintain. a proper documentation for that.

but if you sometime happen to remove the autopath software you can not activate the VG as this will show that the device files /hpap/dsk/hpap1 etc could not be found /queried, unless you have got a valid MAP file with the VGID in that for that VG.


regards
sujit
Michael Steele_2
Honored Contributor

Re: Using LVM with AutoPath

Hi

"...this can be done and is feasible..."!!!

Really.

When I do a vgscan, an automatic rebuilding of the /etc/lvmtab file, these /hpap/dsk/hpap1 pathways don't appear. I see only /dev/dsk pathways.

When I use Autopath to set up automatic failover from primary to alternate luns, neither these paths, nor do the alternate paths appear in /etc/lvmtab. I have to manually vgextend each alternate path to get them to appear in /etc/lvmtab, even though AutoPath doesn't require it.

AutoPath doesn't use /etc/lvmtab. But every command under the LVM command set does.

I'm not even sure if the /hpap/dsk/hpap1 path appears in the kernel because I don't see them in ioscan.
Support Fatherhood - Stop Family Law
Mario Cruz_1
Occasional Contributor

Re: Using LVM with AutoPath

Can anyone post the procedure that I have to follow if I want to make a Logical Volume in a Lun with Secure Path (it's important to remember that I want to use the high availability and load balancing characteristics of Secure Path/autopath)

I've tried as follows, but I get one error.

autopath display|pg

==================================================================
HPswsp Version : A.3.0F.04F.01F
==================================================================
Auto Discover : ON
==================================================================
Array Type : EVA-AA
Array WWN : XXXX-XXXX-XXXX-XXXX
Read Optimize : ON
Path Verification Period : 00:10
==================================================================
Lun WWN : XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX
Virtual Device File : /hpap/dsk/hpap1
Load Balancing Policy : Round Robin
Lun Timeout : Infinite Retry (-1)
==================================================================
Device Path Status
==================================================================
/dev/dsk/c2t0d1 Active
/dev/dsk/c4t0d1 Active
/dev/dsk/c6t0d1 Active
/dev/dsk/c8t0d1 Active

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


pvcreate /hpap/rdsk/hpap1
Physical volume "/hpap/rdsk/hpap1" has been successfully created.

mkdir /dev/vggtdat1

ls -l /dev/vg*/group
crw-r----- 1 root sys 64 0x000000 Sep 17 19:48 /dev/vg00/group
crwxrwxr-x 1 sybase sybase 64 0x010000 Sep 17 11:26 /dev/vggtdata1/group

mknod /dev/vggtdat1/group c 64 0x020000
vgcreate /dev/vggtdat1 /hpap/dsk/hpap1
vgcreate: /hpap/dsk/hpap0 has no correspoding valid raw device file under /dev/rdsk.
Verification of unique LVM disk id on each disk in the volume group /dev/vggtdat1 failed.


I don't know if it's enough to create the volume group with one of the paths show in the autopath command (i.e. vgcreate /dev/vggtdat1 /dev/dsk/c2t0d1) and then Secure Path will do the HA a load balancing automatically.

Kind regards.-
klb
Valued Contributor

Re: Using LVM with AutoPath


Indeed, just use the first /dev/dsk device that show in the autopath display list.

autopath will do load balancing for you.

you can test this after creating the VG with the first device by creating an LV then do a big DD of the lv and watch iostat output.

If you have load balancing set to RR, you'll see that all devices in the autopath list are getting equal I/O.

Shibin_2
Honored Contributor

Re: Using LVM with AutoPath

Hi Mario,

The virtual device file from the autopath output is only for the purpose of storage, not for creating VGs.

You should take one of the device path under the device path ( e.g. take /dev/dsk/c2t0d1 ) to create your VG, LV etc. Remember, once the autopath installed, you never need to use the PV Links, as all these will take care by autopath.

Secondly, the load balancing policy, I feel, you need to use the SST, especially, if you using in HA environment.

You can change this by using the command,
autopath set -l < Lun WWN> -b SST

Regards
Shibin
AVV
Super Advisor

Re: Using LVM with AutoPath

Is it true that we cant use virtual path to create VGs and should use /dev/dsk/c#t#d# path for that ?

if pvcreate can be done on virtual disk, why can't a vgcreate ? I am sorry but to know either ways...
Shibin_2
Honored Contributor

Re: Using LVM with AutoPath

Hi Ajesh,

I am not that much expert in Storage. But before replying you, just a simple question.

Can you locate device files of "Virtual Device File" found from the autopath output in your system?

i.e. if the output of autopath display as follows:

Lun WWN : 6005-08B4-0006-A437-0001-8000-0310-0000
Virtual Device File : /hpap/dsk/hpap126


can you locate the following in your system?

ll /dev/dsk/hpap126
ll /dev/rdsk/hpap126

I hope, this will make you clear picture.
Regards
Shibin
AVV
Super Advisor

Re: Using LVM with AutoPath

Hi Shibin,


I was not questioning you , but querying!!

I dont have a system now to check the same. But definitly will.
Shibin_2
Honored Contributor

Re: Using LVM with AutoPath

Sorry Ajesh,

I thought you have a system to check those.

Btw, I never seen such files. And I uses the original disk name from one of the path.

Sorry if my reply was like a question.
Regards
Shibin
Mario Cruz_1
Occasional Contributor

Re: Using LVM with AutoPath

Everyone, Thanks for your help!
I took note of every one of your advices and this is what I did (I hope this will be useful for someone else too.)

# check the WWN disk
root@server:/>autopath display

==================================================================
HPswsp Version : A.3.0F.04F.01F
==================================================================
Auto Discover : ON
==================================================================
Array Type : EVA-AA
Array WWN : 5001-1234-5678-9ABC
Read Optimize : ON
Path Verification Period : 00:10
==================================================================
Lun WWN : 1234-5678-9ABC-DEF1-0000-0000-0000-0000
Virtual Device File : /hpap/dsk/hpap0
Load Balancing Policy : Round Robin
Lun Timeout : Infinite Retry (-1)
==================================================================
Device Path Status
==================================================================
/dev/dsk/c2t0d1 Active
/dev/dsk/c4t0d1 Active
/dev/dsk/c6t0d1 Active
/dev/dsk/c8t0d1 Active

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

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

# Setting the Load Balancing Policy
root@server:/>autopath set -l 1234-5678-9ABC-DEF1-0000-0000-0000-0000 -b RR

# Physical Disk
root@server:/>pvcreate /dev/rdsk/c2t0d1

# vg
root@server:/>mkdir /dev/vggtdat1
root@server:/>mknod /dev/vggtdat1/group c 64 0x080000
root@server:/>vgcreate /dev/vggtdat1 /dev/dsk/c2t0d1

# for test purpose
root@server:/>lvcreate -L 1024 -n lvTest vggtdat1

# verifying that the logical volume uses all paths
root@server:/>dd if=/dev/urandom of=/dev/vggtdat1/lvTest
I/O error
0+4194306 records in
2097152+1 records out

# in other session . . .
root@server:/>iostat 1 35

c1t0d0 16 2.0 1.0
c1t0d1 0 0.0 1.0
c2t0d1 5220 652.5 1.0
c4t0d1 5212 651.5 1.0
c6t0d1 5212 651.5 1.0
c8t0d1 5220 652.5 1.0

c1t0d0 48 5.9 1.0
c1t0d1 4 1.0 1.0
c2t0d1 5212 651.5 1.0
c4t0d1 5212 651.5 1.0
c6t0d1 5212 651.5 1.0
c8t0d1 5212 651.5 1.0

c1t0d0 16 2.0 1.0
c1t0d1 0 0.0 1.0
c2t0d1 4871 608.8 1.0
c4t0d1 4871 608.8 1.0
c6t0d1 4871 608.8 1.0
c8t0d1 4871 608.8 1.0

c1t0d0 16 2.0 1.0
c1t0d1 0 0.0 1.0
c2t0d1 5344 668.0 1.0
c4t0d1 5352 669.0 1.0
c6t0d1 5352 669.0 1.0
c8t0d1 5344 668.0 1.0

c1t0d0 0 0.0 1.0
c1t0d1 0 0.0 1.0
c2t0d1 5117 639.6 1.0
c4t0d1 5117 639.6 1.0
c6t0d1 5117 639.6 1.0
c8t0d1 5117 639.6 1.0
Michael Steele_2
Honored Contributor

Re: Using LVM with AutoPath

Looks nice
Support Fatherhood - Stop Family Law
Mario Cruz_1
Occasional Contributor

Re: Using LVM with AutoPath

--