Solved

What is the process of adding a lun to lpar from vio

Posted on 2010-08-23
12
3,390 Views
Last Modified: 2013-11-17
can someone please provide me with the complete steps of adding a lun to an lpar from vio
0
Comment
Question by:assistunix
  • 6
  • 6
12 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
ID: 33503574
Hi again,

I'll assume that there is only one VIO partition and one AIX partition involved,and I'll assume further that you're going to add a complete LUN ( = hdisk ) and not just a logical volume to the LPAR.

To achieve this do the following:

1) Make the LUN available to the VIO partition (SAN zoning, setup in your SAN box).
2) Login to the VIOS as padmin.
3) Issue "lspv" and record the hdisk numbers displayed.
4) Issue "cfgdev", then again "lspv" and record the name of the newly found LUN (hdisk...) by comparing both "lspv" outputs.
5) To create a new mapping I'll use the following sample names:
- New LUN: hdiskx
- Virtual SCSI host adapter in charge for the AIX partition: vhosty
- New name of the virtual device to be created: lpary_vdevy
6) Issue "chdev -dev hdiskx -attr pv=yes" to label hdiskx. Issue "lspv" and note the PVID of hdiskx.
7) Issue the command: "mkvdev -vadapter vhosty -dev lpary_vdevy -vdev hdiskx"
8) Issue "lsmap -vadapter vhosty" to check that all went well.

9) Log in to the AIX partition as root.
10) Issue "cfgmgr", then "lspv" and locate the hdisk with the same PVID as found above in step (6). Note this name. I'll call it hdiskz
11) Now you're ready to issue e.g. "extendvg myvg hdiskz" to make the new LUN part of myvg.
12) That's all.

wmp

0
 

Author Comment

by:assistunix
ID: 33508996
Hello wmp

by step 1) u mean to have san allocate the space to vio, is that correct?
step 2) can i act as root in vio or it has to be padmin?

step 3 and 4) is the purpose of that to find new pv that has been allocated to vio from san?
      what if in step3 lspv already has shows some pv's which are available and are in none state?
          is step 4 (cfgdev) still necessary?

how can find vhost of aix lpar?

This might be a dumb a question but
what do you mean by "- New name of the virtual device to be created: lpary_vdevy"
  what do you mean by virtual device in this case?

Thanks again.
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 33509625
>> by step 1) u mean to have san allocate the space to vio, is that correct? <<
Yes.
>> step 2) can i act as root in vio or it has to be padmin? <<
You must be padmin. root doesn't have the "mkvdev" or "cfgvdev" commands available by default.
<< step 3 and 4) is the purpose of that to find new pv that has been allocated to vio from san? <<
Yes.

>> what if in step3 lspv already has shows some pv's which are available and are in none state? is step 4 (cfgdev) still necessary? <<
Yes, of course. What you see with "lspv" before having run "cfgdev" are your existing hdisks mapped to partitions (probably). Because they're mapped as raw devices they don't belong to a VG (thus "None").

 >> how can find vhost of aix lpar? <<
1) Find out the number of your partition (ID in hex). Login to the partition and issue "lparstat -i". The third line shows this number in decimal (!) beneath "Partition Number". You know how to convert decimal to hex? (0=0,...,9=9,10=A,...,15=F,16=10,... etc.)?
2) Issue "lsmap -all | more" (as padmin on VIOS) to locate the (hex!) Partition ID from (1) under the "Client Partition ID" header. The value in the first column of the line containing that ID is the vhost (under the "SVSA" header).

 >> what do you mean by virtual device in this case? <<
The VIO has its own internal device names for the  LPAR mappings. You create a device with a particular name (lpary_devy was only a - silly - example) which is basically a virtual connector between the real device (hdiskx) and the virtual scsi host adapter in charge of the LPAR to which the mapping will be done.
 
wmp
0
 

Author Comment

by:assistunix
ID: 33719094
thank you
0
 

Author Comment

by:assistunix
ID: 33807875
when adding ONE lun or lv from dual vio environment-do we have to configure the path of new lun or lv on both vio's?
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 33808027
I just can't understand the word "path" in this question if you're talking of an LPAR!
You don't have to configure any "path", you just add a new virtual device to an existing vadapter (the one "responsible" for the LPAR in question) via "mkvdev" at the VIO server.
Since this vadapter (vhostx) and its corresponding client adapter at the LPAR (vscsix) already exist, nothing has to be done regarding paths. "cfgmgr" at the LPAR is sufficient.
And " ... on both VIOS ..."???
Why do you run two or more VIOS when you're not going to use them all?  If you want the LPAR to reach the new LUN via several VIOs you must of course configure the new vdev on all these VIO servers.
If you think that one VIOS is sufficient (for what reasons ever) - OK, configure only this one.
wmp
 
 
 
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:assistunix
ID: 33808596
Hi, thank you for your quick reply.

What i meant by "Path configuring" was if i have to run mkvdev command on both VIO's when adding space.

2 scenarios.

One. adding a powerhdisk and Second adding an LV from VIO VG.  - to the lpar.

1) when adding a lun,
along with other pre steps, one step would be finding the pvid of hdiskz (123456789 pvid)
and than

i would run mkvdev on VIO1 with hdiskz

{and than on VIO2 , would i use the same disk, hdiskz, ( i know the name might be different on VIO2 for the same disk, but i can search for the same disk with  pvid (123456789) or do i use another disk hdiskx }      Please Confirm.!!!

 and than mkvdev on VIO2 with hdiskz(same pvid disk from VIO1) or hdiskx (different pvid disk from VIO1)

and than cfgmgr at lpar and extendvg.

..........

2 scenario ) Instead of allocating a disk to the lpar, i want to allocate an LV from VIO VG.
in which case, i would first create LV on VIO1

mkvdev that LV from VIO1

now what do i do at VIO2? the same LV doesn't exist at VIO2, as the same LUN did in previous scenerio which i was able to track down with PVID.

....Do i create a new LV on VIO2 as well and allocate it to LPAR? but doing so would provide the lpar with an extra hdisk??! one from VIO1 and one from VIO2!

Please clarify and advise.
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 33808790
1) Of course  >> and than mkvdev on VIO2 with hdiskz(same pvid disk from VIO1) << !! How else would you manage seeing the same data via two VIOs at the LPAR??
 But what is your VIO version? With IOSLEVEL below 2.x two intermediate steps are required.
a) on VIO1 after cfgdev and "chdev -dev hdiskz  -attr pv=yes" but before mkvdev issue "chdev -dev hdiskz -attr reserve_policy=no_reserve"
b) on VIO2 after cfgdev  but before mkvdev issue "chdev -dev hdiskz -attr reserve_policy=no_reserve"
2) Assigning a logical volume (i.e. part of a hdisk under control of LVM) over more than one VIO is not possible. This works only with full hdisks.
Since an LV is part of a volume group this VG would have to be made concurrently accessible by more than one VIO, which is not feasible.

 wmp
0
 

Author Comment

by:assistunix
ID: 33809681
$ ioslevel
2.1.2.13-FP-22.1 SP-02  
Reserve Policy is set to NO RESERVE, so multiple VIO servers can see the disk, right?

how can i check what the current reserve policy is set to on the VIO servers?

2) That is what i was confused about as well, that when allocating a full disk, you are required to mkvdev the same drive from Both VIO's for redudancy purposes, which is do-able.
But how can you do mkvdev on both VIO's when allocating an LV(part of a disk), hence it is not possible to Assign SAME logical volume (i.e. part of a hdisk under control of LVM) over more than one VIO.

So that being said whenever an LV is allocated to an lpar, it will be allocated from ONE VIO server only and would not be VIO Redundant.

-----However, can we allocate one LV1 from VIO1 and one LV2 from VIO2, and than mirror them 2 disks at CLIENT LPAR, that would somewhat achieve the same result of VIO redundancy which we get with lun mkvdev on both VIO, than we can't do with LV on both VIO.?


0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 33809880
How should I interpret this:

a) >> Reserve Policy is set to NO RESERVE <<
b) >> how can i check what the current reserve policy is <<

What now? Do you know what the reserve policy is or not?

Check with lsdev -dev hdiskz -attr

Then this: >> But how can you do mkvdev on both VIO's when allocating an LV(part of a  disk), hence it is not possible to Assign SAME logical volume (i.e. part  of a hdisk under control of LVM) over more than one VIO.<<

It's only a few minutes ago I told you that you can't >> mkvdev on both VIO's when allocating an LV << !

>> whenever an LV is allocated to an lpar, it will be allocated from ONE VIO server only and would not be VIO Redundant. <<

That's it. Finally! Yes!

>> can we allocate one LV1 from VIO1 and one LV2 from VIO2, and than mirror them 2 disks at CLIENT LPAR <<

Yes! Local LVM mirroring is independent of the way hdisks are assigned(full disk/LV/direct attach). The LPAR will just "see" two hdisks, which can be mirrored as if it were physical drives.
It's just not quite the same as VIO redundancy, because you will obviously need twice the space for mirroring as with redundant paths.
0
 

Author Comment

by:assistunix
ID: 33810159
How should I interpret this:

a) >> Reserve Policy is set to NO RESERVE <<
b) >> how can i check what the current reserve policy is <<

what i meant was.
a) i was asking, what is purpose of "reserve policy=no reserve", and was confirming with you if "reserve policy=no reserve", mean  multiple VIO servers can see the disk.

b) i do not know what my current reserve policy is and was asking how i can check what it currently is.

Sorry about the confusion.

And thank you for bearing with me, for helping me understand this thoroughly.

THANK YOU, Once Again.
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 33810314
Well, alright,

I'm not a native English speaker, which doesn't help make things easier.

Anyway, I'm looking forward to assist you the next time!

Cheers

wmp

0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now