hdisk mapping to a vSCSi Adapter


 
Thread Tools Search this Thread
Operating Systems AIX hdisk mapping to a vSCSi Adapter
# 1  
Old 12-01-2011
hdisk mapping to a vSCSi Adapter

Hello,
I have a VIOS System and would like to do mapping some hdisks, hdisk160 until hdisk165 to a vSCSi Adapter. I try to do this in the oem_setup_env like the following:
Code:
for i in $(lspv | grep hdisk* | awk {'print $1'};
do
   mkdev -V $i -p vhost20
done

There where a mapping with hdisk16 but this is totally wrong. Can anybody give me some inspiration to realize this? Many thanks!

Moderator's Comments:
Mod Comment Use code tags, please - check your PMs.

Last edited by zaxxon; 12-01-2011 at 12:18 PM.. Reason: code tags, see PM
# 2  
Old 12-01-2011
I don't know where to start


1. your script wont run at all
2. you want to map hdiskx-hdisky and not all hdisks on the system
3. you don't grep this way (hdisk*) just hdisk is enough, and the * is substituted by the shell, grep wont even see it, grep uses regex
when grep is used for hdisks for example, always use -w option, because hdisk16 would give you hdisk16 and hdisk165 for example
4. mkvdev alias does not exist in oem_setup_env, it's an alias, you need to run /usr/ios/cli/ioscli mkvdev or set the alias, or run your script as padmin
5. that's not the way awk works
Code:
 awk {'print $1'}

6. don't use default mapping names, define your own, that's not a must, but makes you life much easier

couldn't test it, but this should work for you

Code:
for i in 0 1 2 3 4 5 
do
mkvdev -vdev hdisk16${i} -vadapter vhost20 -dev yourname_${i}
done

you may use "
Code:
for ((i=160;i<166;i++))

instead, but this will only work in ksh93
# 3  
Old 12-01-2011
Thank you funksen but there is still a mistake, could you be so kindly and check the code?

Code:
$ for i in 0 1 2 3 4 5
> do
> mkvdev -vdev hdisk16${i} -vadapter vhost20
> done

The command's response was not recognized. This may or may not indicate a problem.
Code:
$ lsmap -vadapter vhost20
SVSA            Physloc                                      Client Partition ID
--------------- -------------------------------------------- ------------------
vhost20         U8202.E4B.06B4F4P-V1-C327                    0x0000000d

VTD                   NO VIRTUAL TARGET DEVICE FOUND

Moderator's Comments:
Mod Comment Please use code tags, thanks.

Last edited by zaxxon; 12-02-2011 at 10:47 AM.. Reason: code tags
# 4  
Old 12-01-2011
I've seen that message before when the hdisk is already mapped to another vhost. Try the following (as padmin) to check if hdisk165 is already mapped somewhere.

Code:
lsmap -all | grep -w hdisk165

HTH
# 5  
Old 12-02-2011
Hello,
It isn't allready mapped!

---------- Post updated at 02:55 AM ---------- Previous update was at 02:38 AM ----------

I found the problem, the luns which I would like to map are flash copys. The flash copys where stopped so I started them an now the mapping works fine. Thanks a lot!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Misconfiguration detected Adapter interface name en 3 Adapter offset 0

Hi, We had a hardware problem with an IBM System p5 server, with AIX 5.2 We restore from a tape the last backup we had, but the server does not boot up as expected. The server try to mount some directories from a storage, but could not comunicate with them, we check the FC and everything is... (12 Replies)
Discussion started by: trevian3969
12 Replies

2. UNIX for Advanced & Expert Users

Unable to install client AIX LPAR to vscsi hdisk provided from VIOS

Hi everybody, I have Power5 server with 4 internal hdisks each of 70Gb. VIOS server was installed via Virtual I/O Server Image Repository on the HMC. HMC release - 7.7.0 VIOS rootvg installed on 2 disk(these disks merged to one storage pool during VIOS install process),and 2 others hdisks... (2 Replies)
Discussion started by: Ravil Khalilov
2 Replies

3. AIX

Devices.vscsi.disk ?

Hello, When I assigned CDROM from IVM (VIOS) to LPAR and then running cfgmgr i get the following message on the client lpar #cfgmgr cfgmgr: 0514-621 WARNING: The following device packages are required for device support but are not currently installed. devices.vscsi.disk searching... (0 Replies)
Discussion started by: filosophizer
0 Replies

4. AIX

How can I map hdisk# to rhdisk#?

Some storage/disks have been added to an existing AIX 6.1 server. The admin sent me the list of hdisk#'s for the new disks, but I need the corresponding rhdisk# for the same hdisk. (I know from past experience that the rhdisk that maps to an hdisk is not always the same number. For instance,... (5 Replies)
Discussion started by: sbrower
5 Replies

5. AIX

How to put vscsi in available state?

Hello Friends, My question/problem is that I noticed 2 servers in my environment vscsi is showing up as defined (not available) or is defined and not showing the path to both vscsi's when ruining lspath command. I am new to AIX admin, work alone, and work in an small environment. My question is,... (12 Replies)
Discussion started by: Adnans2k
12 Replies

6. AIX

Kdb - vscsi disk mapping from AIX 5.3 CLIENT side

If you're familiar with vscsi mappings thru a VIO Server, you are probably aware, on an AIX 6.1 Client LPAR, that: print cvai | kdbcan provide useful information to you.... like VIO Server name & vhost #. But, "cvai" does not appear to be part of the Kernel Debugger in AIX 5.3. My question is... (3 Replies)
Discussion started by: The Doctor
3 Replies

7. Shell Programming and Scripting

Creating unique mapping from multiple mapping

Hello, I do not know if this is the right title to use. I have a large dictionary database which has the following structure: where a b c d e are in English and p q r s t are in a target language., the two separated by the delimiter =. What I am looking for is a perl script which will take... (5 Replies)
Discussion started by: gimley
5 Replies

8. AIX

Vscsi and npiv on same adapter

Hi, I want to change from vscsi to npiv. Is it possible to use both on the same adapter, so we can change the systems one by one, or must we place a second FC adapter in the VIO servers? Thanks, Ronald (2 Replies)
Discussion started by: ronaldm60
2 Replies

9. AIX

Migrating hdisks from vscsi to NPIV with powerpath

Hi All, I'm preparing to migrate some servers from vscsi to pass-thru NPIV. I am planning to have the SAN team move the exact LUNs from vio1/vio2 to those two VWWN through NPIV. My question is on the partition itself.. right now, let's say I have hdisk0/1/2/3/4 that are part of datavg. They... (2 Replies)
Discussion started by: lapfrank
2 Replies

10. AIX

vpath to an hdisk

Is there a simply way for me to map a vpath to an hdisk on AIX 5.2? (5 Replies)
Discussion started by: 2dumb
5 Replies
Login or Register to Ask a Question