04-13-2009
Find new hdisk for VIOS
Here's what I do to find any hdisks that have been added to a VIOS or aren't assigned to a vhost. It's not pretty but it does the job.
Put the following into a script ( I called mine unused.sh ) and then chmod it. You have to create/run it as root because padmin isn't allowed to create files in it's restricted shell.
PATH=$PATH:/usr/ios/cli
echo "Creating list of drives not assigned to vhosts ..."
ioscli lsmap -all | grep ^Backing > lsmap.txt
for x in `lspv | awk '{print $1}' | grep -v hdisk0 | grep -vw hdisk1`
do
grep -q $x lsmap.txt
if [ $? -eq 1 ]
then
echo "$x"
ioscli lsdev -dev $x -attr | grep ^size | awk '{print $1" "$2"Mb"}'
fi
done
HTH!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
We recently purchased a 3 tb RAID. In the setup, it created 2 slices, one 2 tb and one 1 tb slice. Right now only the 2 tb slice is visible when booting up. I was told that the second slice needs to be mapped to a lun and a port like the first slice is.
Does anyone know how I would go... (1 Reply)
Discussion started by: user23
1 Replies
2. AIX
We have a frame the uses 2 vios that assign disk storage to LPAR's. We have a LPAr with multiple disk and I want to know how do I tell which vio is serving the disk. For example the LPAr has hdisk 0, 1, 2, 3 all the same size. I want to know which vio is serving hdisk0, 1. (4 Replies)
Discussion started by: daveisme
4 Replies
3. AIX
Hello,
I have created mapping of 2 virtual adapters for Lpars using following command:
mkvdev -vdev ipanalyzerlv1 -vadapter vhost11
mkvdev -vdev ipanalyzerlv -vadapter vhost13
The above two commands were succesfull
but when I want to map the third virtual device to the same Lpar than... (3 Replies)
Discussion started by: Vit0_Corleone
3 Replies
4. AIX
Hi All,
Besides the licenses on VIO and LPAR. What's the main difference with the two? I have installed VIO, my manager told me so, because it's like a free hypervisor but I never installed LPAR before. How do you install it? And if you can give more info on the two, that would be great.
... (5 Replies)
Discussion started by: itik
5 Replies
5. AIX
Hi,
I would like to know how to share lun in between 2 lpars.
I have run tbe below command on vio server.
/usr/sbin/chdev -l hdisk1 -a reserve_policy=no_reserve
after above command I am able to assign lun on one Lpar. but it is not visible to other lpar.
even after this I have run... (3 Replies)
Discussion started by: manoj.solaris
3 Replies
6. AIX
Please forgive me here as I don't fully understand what I am talking about here so if I use the wrong terminology please overlook me.
We have multiple AIX LPARs on the managed system with two VIO Servers. A Co-Worker and I are trying to set up a new LPAR client (The guy that knows this is out)... (14 Replies)
Discussion started by: juredd1
14 Replies
7. AIX
Hi guys,
does anyone know how to get a list of the LPAR running on VIOS?
Thanks! (5 Replies)
Discussion started by: cecco16
5 Replies
8. AIX
I am trying to install AIX 5.3 on one of the LPARs through VIOS but I get this error 0518
Reference Code Selection
0518 (Time stamp: 12/18/12 12:10:20 AM UTC)
Starting kernel (Time stamp: 12/18/12 12:10:15 AM UTC)
AIX is starting. (Time stamp: 12/18/12 12:10:15 AM... (10 Replies)
Discussion started by: filosophizer
10 Replies
9. AIX
Hi,
Just joined to new company with one Power 720 Express (8202-E4C) server and have no much experience with IBM systems.
I am trying to move everything I mentioned to different subnet as required by customer contract (currently sitting on same subnet as company lan). Access to this subnet will... (8 Replies)
Discussion started by: spricer
8 Replies
10. AIX
Hello,
VIOS 2.2.1.4 using IVM.
I'm trying to extend a virtual disk assigned to a running lpar so that I can expand the lpar's datavg and grow some filesystems for the user.
Storage admin expanded the lun and new size was reflected in VIO right away. I then needed the storage pool to... (2 Replies)
Discussion started by: j_aix
2 Replies
ZGREP(1) General Commands Manual ZGREP(1)
NAME
zgrep - search possibly compressed files for a regular expression
SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename...
DESCRIPTION
Zgrep is used to invoke the grep on compress'ed or gzip'ed files. All options specified are passed directly to grep. If no file is speci-
fied, then the standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and
fed to grep.
If zgrep is invoked as zegrep or zfgrep then egrep or fgrep is used instead of grep. If the GREP environment variable is set, zgrep uses
it as the grep program to be invoked. For example:
for sh: GREP=fgrep zgrep string files
for csh: (setenv GREP fgrep; zgrep string files)
AUTHOR
Charles Levert (charles@comm.polymtl.ca)
SEE ALSO
grep(1), egrep(1), fgrep(1), zdiff(1), zmore(1), znew(1), zforce(1), gzip(1), gzexe(1)
ZGREP(1)