Sponsored Content
Operating Systems AIX hdisk mapping to a vSCSi Adapter Post 302578292 by funksen on Thursday 1st of December 2011 08:58:00 AM
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
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
Class::Adapter::Clear(3pm)				User Contributed Perl Documentation				Class::Adapter::Clear(3pm)

NAME
Class::Adapter::Clear - A handy base Adapter class that makes no changes SYNOPSIS
Hello World with CGI.pm the normal way # Load and create the CGI use CGI; $q = new CGI; # Create the page print $q->header, # HTTP Header $q->start_html('hello world'), # Start the page $q->h1('hello world'), # Hello World! $q->end_html; # End the page Hello World with CGI.pm the Adapter'ed way # Load and create the CGI use CGI; $q = new CGI; # Convert to an Adapter use Class::Adapter::Clear; $q = new Class::Adapter::Clear( $q ); # Create the page print $q->header, # HTTP Header $q->start_html('hello world'), # Start the page $q->h1('hello world'), # Hello World! $q->end_html; # End the page Creating a CGI Adapter class using Class::Adapter::Clear package My::CGI; use base 'Class::Adapter::Clear'; # Optional - Create the thing we are decorating auto-magically sub new { my $class = shift; # Create the object we are decorating my $query = CGI->new(@_); # Wrap it in the Adapter $class->SUPER::new($query); } # Decorate the h1 method to change what is created sub h1 { my $self = shift; my $str = shift; # Do something before the real method call if ( defined $str and $str eq 'hello world' ) { $str = 'Hello World!'; } $self->_OBJECT_->($str, @_); } DESCRIPTION
"Class::Adapter::Clear" provides the base class for creating one common type of Class::Adapter classes. For more power, move up to Class::Adapter::Builder. On it's own "Class::Adapter::Clear" passes all methods through to the same method in the parent object with the same parameters, responds to "->isa" like the parent object, and responds to "->can" like the parent object. It looks like a "Duck", and it quacks like a "Duck". On this base, you simple implement whatever method you want to do something special to. # Different method, same parameters sub method1 { my $self = shift; $self->_OBJECT_->method2(@_); # Call a different method } # Same method, different parameters sub method1 { my $self = shift; $self->_OBJECT_->method1( lc($_[0]) ); # Lowercase the param } # Same method, same parameters, tweak the result sub method1 { my $self = shift; my $rv = $self->_OBJECT_->method1(@_); $rv =~ s/ /<br> /g; # Add line-break HTML tags at each newline return $rv; } As you can see, the advantage of this full-scale Adapter approach, compared to inheritance, or function wrapping (see Class::Hook), is that you have complete and utter freedom to do anything you might need to do, without stressing the Perl inheritance model or doing anything unusual or tricky with "CODE" references. You may never need this much power. But when you need it, you really need it. As an aside, Class::Adapter::Clear is implemented with the following Class::Adapter::Builder formula. use Class::Adapter::Builder ISA => '_OBJECT_', AUTOLOAD => 1; METHODS
new $object As does the base Class::Adapter class, the default "new" constructor takes a single object as argument and creates a new object which holds the passed object. Returns a new "Class::Adapter::Clear" object, or "undef" if you do not pass in an object. SUPPORT
Bugs should be reported via the CPAN bug tracker at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Class-Adapter> For other issues, contact the author. AUTHOR
Adam Kennedy <adamk@cpan.org> SEE ALSO
Class::Adapter, Class::Adapter::Builder COPYRIGHT
Copyright 2005 - 2010 Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.10.1 2010-04-11 Class::Adapter::Clear(3pm)
All times are GMT -4. The time now is 08:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy