- UNIX Essential Skills
- UNIX Basic Commands
- Different RUN levels in Linux,Solaris and AIX
- Determine if your OS is 64-bit or 32-bit?
- How to find your MAC Add: Unix/Linux/Windows/Mac
- VI Editor Quick Reference
- dd command to create an ISO image
- TOP command - Useful switch
- Configure NTP server for time adjustment
- How to find larger file under Linux
- Adding a Swap File to an RHEL6 System
- How to find if its VM or Real host
- Find Files Based on Access/Modification/Change Time
- LINUX
- AIX
- SOLARIS
- Storage Area Network (SAN)
- NAS Netapp
- BACKUP Admin
Tuesday, September 11, 2012
Moving the DVD-RAM Between LPARs using the VIO server
One of the common features normally available with HMC attached System p servers is the ability to use Dynamic Logical Partitioning (DLPAR) to add/move/remove I/O devices such as the CDROM or DVD controller between LPARs without taking an outage. The functionality required for DLPAR actions includes an active network connections between the LPARs and the HMC over port 657. If you have a virtual I/O (VIO) server partition that owns the DVD controller then you can run a few simple commands on the VIO server to allow you to map cd0 from one client LPAR to another using virtual SCSI. The process to move cd0 from one logical partition to another using VIO server commands is illustrated below. The example assumes the user is logged in as padmin on VIO server:
1> Determine if the VIO server owns an optical device we use the lsdev command.
$ lsdev -type optical
name status description
cd0 Available IDE DVD-ROM Drive
- Determine if cd0 is already mapped to a client LPAR we use the lsmap command.
$ lsmap -all |more
SVSA Physloc Client Partition ID
--------------- -------------------------------------------- ------------------
vhost0 U9111.520.104797E-V1-C11 0x00000002
VTD vtscsi0
LUN 0x8100000000000000
Backing device rootvg2a
Physloc
SVSA Physloc Client Partition ID
--------------- -------------------------------------------- ------------------
vhost1 U9111.520.104797E-V1-C13 0x00000003
VTD vtscsi1
LUN 0x8100000000000000
Backing device rootvg3a
Physloc
VTD vtscsi2
LUN 0x8200000000000000
Backing device datavg3a
Physloc
- Looking through the "Backing device" section of each vhosts we do not see cd0 listed.
We could have run "lsmap -all | grep cd0" as a quick check as well.
- To assign device cd0 to LPAR ID 2 we first need to locate its associated virtual SCSI server (vhost) device from the output listed above. If you look at the "Client Partition ID" section of the lsmap output you can see that vhost0 is associated with partition ID 2 (hex 0x00000002).
2> - To make the virtual SCSI map of cd0 to LPAR ID 2, we use mkvdev as follows:
$ mkvdev -vdev cd0 -vadapter vhost0
vtopt0 Available
- To check to see if cd0 and vtopt0 show up under vhost0 resources we use lsmap.
$ lsmap -vadapter vhost0
SVSA Physloc Client Partition ID
--------------- -------------------------------------------- ------------------
vhost0 U9111.520.104797E-V1-C11 0x00000002
VTD vtopt0
LUN 0x8200000000000000
Backing device cd0===============>"now CDROM is presented to Vhost0"
Physloc U787A.001.DPM06E2-P4-D2
VTD vtscsi0
LUN 0x8100000000000000
Backing device rootvg2a
Physloc
NOTE=>By virtually mapping the DVD device cd0 to LPAR 2's vhost, there is no need to make changes to the LPAR's profile or perform further actions such as DLPAR functions from the HMC. The cd0 device is now ready for the client LPAR to use.
NOTE=>If the LPAR is already in a running state, the cfgmgr command would need to be run as root on the client LPAR so the new device could be configured. If the LPAR is not activated then once it is started, the DVD device will be available for performing installation or maintenance functions on the LPAR.
MOVING CDROM to Different LPAR's if its presented to VIO server and assigned to LPAR-
======================================================================================
Once LPAR 2 is finished using the DVD, it can then be removed and mapped to a different LPAR if desired.
$ rmdev -dev vtopt0 -recursive ===========>will remove CDROM from, vtopt0 is the name of existing CDROM.
vtopt0 deleted
$ mkvdev -vdev cd0 -vadapter vhost1 ==========>moved cdrom to vhost1
vtopt0 Available
$ lsmap -vadapter vhost1
SVSA Physloc Client Partition ID
--------------- -------------------------------------------- ------------------
vhost1 U9111.520.104797E-V1-C13 0x00000003
VTD vtopt0
LUN 0x8500000000000000
Backing device cd0
Physloc U787A.001.DPM06E2-P4-D2
VTD vtscsi1
LUN 0x8100000000000000
Backing device rootvg3a
Physloc
VTD vtscsi2
LUN 0x8200000000000000
Backing device datavg3a
Physloc
The process of virtual mapping of the optical device, cd0, between client LPARs of a VIO server is
much simpler than trying to perform DLPAR related functions to achieve the same result since all
the interaction takes place on the VIO server command line.
Mounting ISO in AIX
Put CD into CDROM
Do not mount CD. Verify if cd is mounted or not with mount command:
# mount
If cd was mouted automatically unmout it with umount command:
# umount /dev/cdrom
OR
# umount /mnt/cdrom
Create CD-ROM ISO image with dd command:
# dd if=/dev/cdrom of=/tmp/cdimg1.iso
Mounting ISO in AIX-
Starting in AIX 6.1, you can use the loopmount command to create a loopback device and mount an ISO directly:
#loopmount -i cdrom.iso -o “-V cdrfs -o ro” -m /mnt
And, loopumount unmounts the ISO and removes the loopback device:
#loopumount -i cdrom.iso -o "/mnt"
There are a couple of gotcha's, but nothing unusual. An ISO can only be associated with one loopback device at a time,
the mount is only readonly, and it's not supported in WPARs.
There is another way to mount those images, but it's not a one-step process.
What you need to do is create a LV at least as big as your ISO image,
then copy the ISO data to that LV, and then mount the LV:
#mklv -y cdlv -s n rootvg 704M hdisk0
#dd if=cdrom.iso of=/dev/cdlv
#mount -v cdrfs -o ro /dev/cdlv /mnt
Saturday, August 9, 2008
AIX has login via the serial console
AIX has login via the serial console disabled as a default. So you need both a suitable serial cable and to change some AIX settings. If you don't have an original IBM serial cable you might use a the standard one. Access the server with a VT100 Term configured at 9600-8-N-1. Start server, choose the right console by pressing the number that is displayed on your screen and then get into maintenance mode by pressing "5" after the word "keyboard" appears on the screen (if you don't see anything you got the wrong cable or chose the wrong console before). Then access a rootvg, start a shell and mount rootvg (writing from memory but these steps are being offerd by menu). When you got the root shell export TERM=vt100. Open SMIT, choose devices and then the TTY in question. Change the following parameters:
* enable LOGIN - enable (switch)
* STTY attributes for RUN time - clocal (add)
* STTY attributes for LOGIN - clocal (add)
* Apply changes to Database only - yes (set)
Exit smit and reboot. The server should come up and let you log in via the console.