Sponsored Content
Operating Systems AIX Problem mapping LUN disk from VIOS to the LPAR Post 302306630 by homeyjoe on Monday 13th of April 2009 10:36:29 AM
Old 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

LUN mapping

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

LPAR and vio disk mapping

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

VIOS to lpar Mapping

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

What's the difference between VIOS and LPAR?

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

Sharing lun between 2 LPAR

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

VIOS FC Mapping/NPIV questions

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

List LPAR from VIOS

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

VIOS LPAR Error 0518

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

Moving VIOS, LPAR's, HMC to different subnet

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

VIOS: Extend virtual disk assigned to running lpar?

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
format(1M)																format(1M)

NAME
format - format an HP SCSI disk array LUN SYNOPSIS
device_file DESCRIPTION
formats one LUN of the HP SCSI disk array associated with device file, device_file. The format will usually be a soft or zeroing format, in which the controller writes zeroes to the data area and parity area, if any, of the LUN. NOTE: The above should always be true of a sub-LUN, but the controller might decide, based on certain conditions, to do a full format of a regular LUN, which consists of sending a mode select and a media initialization command to the physical drive(s) in question, fol- lowed by zeroing the data and parity area, if any. The conditions which will cause a full format to be done are as follows: 1. The controller received a Mode Select command which requires a drive sector size change. 2. The controller received a Mode Select command which changed a parameter in the Format Device Page(0x03). 3. The LUN contains one or more failed drives. In this case only a certain subset of the drives containing the failed drives will be formatted. 4. Either the FmtData or the CmpLst bit in the Format Unit CDB is set. RETURN VALUE
returns the following values: 0 Successful completion. -1 Command failed. DIAGNOSTICS AND ERRORS
Errors can originate from problems with: o o SCSI (device level) communications o system calls Error messages generated by format: An error in command syntax has occurred. Enter command again with all required arguments, in the order shown. To ensure that does not modify a disk array that is being used by another process, attempts to obtain exclusive access to the disk array. If the disk array is already opened by another process (for example, LVM -- the Logical Volume Manager), a "" error message is returned by the driver. To eliminate the "" condition, determine what process has the device open. In the case of LVM, it is necessary to deactivate the volume group containing the array before formatting array LUNs (see vgchange(1M)). The LUN number, which is derived from the device file name, is out of range. The addressed LUN is not configured, and thus is not known to the array controller. Utilities must be able to open the device file for raw access. The device being addressed is not an HP SCSI disk array. SCSI (device level) communication errors: Sense data associated with the failed operation is printed. Error messages generated by system calls: uses the following system calls: and Documentation for these HP-UX system calls contains information about the specific error conditions associated with each call. does not alter the value of The interpretation of for printing purposes is performed by the system utility EXAMPLES
To format the HP SCSI disk array LUN on a Series 800: WARNING
The command will destroy all user data on the addressed LUN. DEPENDENCIES
The HP C2425 and HP C2427 disk arrays are only supported on Series 700 systems running HP-UX version 9.0X. The HP C2430 disk array is supported on Series 700 and 800 systems running HP-UX versions 9.0X and 10.0X. AUTHOR
was developed by HP. format(1M)
All times are GMT -4. The time now is 08:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy