Showing posts with label VIO. Show all posts
Showing posts with label VIO. Show all posts

Monday, September 25, 2023

How to remove the hard disk (pdisk) in aix?

How to remove the hard disk (pdisk) in aix?


The below steps are clearly explained how to remove the hard disk (pdisk) in aix.

Please follow the below steps to replace the hdisk (pdisk) with the following steps

$ oem_setup_env
smitty sasdam
=> Delete a SAS Disk Array
=> sissasO
=>hdisk4
Confirm that we want to delete the array, you should get a message stating something like
hdisk4 deleted
pdisk4 Defined
ESC÷O or F10 (this may change according to your keyboard) to exit smitty

# diag
=> enter
=> Task Selection (Diagnostics, Advanced Diagnostics, Service Aids, etc.)
= Hot Plug Task
=> SCSI and SCSI RAID Hot Plug Manager
> Replace/Remove a Device Attached to an SCSI Hot Swap Enclosure Device
=> Select the slot of pdisk4
=> enter

You should have a message like “Running rmdev on pdisk4” followed by the following
The LED should be in the Remove state for the selected device.
YOU may now remove or replace the device.
Use ‘Enter’ to indicate you are finished.

Now it’s time to remove the failed disk and to insert the new disk, then return to the previous session and bit enter as per the reported message
You will be back to the previous menu, but this rune instead of pdisk4 you will have [populated]
ESC+3 or F3 (this may change according to your keyboard) to return to the previous menu

=> Configure Adde/Replaced Devices
You’ll get a ‘processing data” and then it will return to menu
ESC+O or 110 to exit diag

Now we have to recreate the array
# smitty sasdam
=> Create a SAS Disk Array
=> sissasO
=> 0
=> 256 Kb (recommended)
> pdisk4
Confirm that we want to create the new array
ESC+O or 110 (this way change according to your keyboard) to exit smitty.

see, the disk is successfully replaced, Now you can go ahead for your further steps based on your setup.



Sunday, March 20, 2016

How to update vio server in aix?

How to upgrade vio server in aix?


Pre-requisite:
Make sure to check the existing vio version $ioslevel
Collect all the connected lpars to the VIO server
Take the mksysb backup of lpars and backupios, viosbr backup of vio servers.
Take note of the important output configuration files and lsmap -all output before the upgrade start.
To get the vio upgrade package from the below site or from your nim server if you got already.
  
Implementation steps:
Copy the vio upgrade package to the /home/padmin of the VIO servers.
The upgrade package has to be placed in /home/padmin
Login as padmin mode.
$updateios -commit    --> To Commit previous updates by running the updateios command.
$updateios –accept –install –dev /home/padmin/<vio package>   --> To upgrade the vio version.
$shutdown -restart   -->Reboot the vio server to complete the update.
$ioslevel     --> Check the latest vio level has been achieved.  

Important notes:
When upgrading to VIOS 2.2.0.10-FP-24
 Fix Pack 24 enables Role Based Access Control (RBAC) roles and authorizations for thepadmin user on the VIOS. Roles and authorizations are enabled immediately. If you upgrade to VIOS 2.2.0.10-FP-24 via the updateios command, the only two commands that you can run before the VIOS is rebooted are the shutdown and swrole commands.
$ swrole - PAdmin 
$ shutdown -restart
$ license -accept

    

Thursday, March 3, 2016

How to mapping a disk from vio server to lpar in aix?

How to mapping a disk from vio server to lpar in aix?

Note: The below procedure is to assume that we need to add a new virutal disk to the root volume group on the lpar, for that we need to map a new disk from vio server to the lpar. 

Hence as a aix admin i need to map a new disk from vio server to the lpar like below. There are several methods to accomplish this task. The below procedure is one of them.

-------------------------------------------------------------------------------------------------------------------------------------------
Find out the slot number of the vscsi

#lspv -> To check the disk present on the lpar
hdisk0          0006a7df4403b4a6                  rootvg                      active

# lspath -F "name,status,parent,connection" -l hdisk0
            hdisk0,Enabled,vscsi0,810000000000
            hdisk0,Enabled,vscsi1,810000000000

# lscfg -l vscsi0
  vscsi0           U9111.520.0000034-V10-C50-T1  Virtual SCSI Client Adapter

# lscfg -l vscsi1
  vscsi1           U9111.520.0000034-V10-C51-T1  Virtual SCSI Client Adapter

U9111.520.0000034 -> model and serial number
V10 -> lpar id
C50 and C51 is client slot number of the vhost adapter

-------------------------------------------------------------------------------------------------------------------------------------------

Find out the VIO server associated with the lpar using HMC

# lsrsrc IBM.ManagementServer or lsrsrc IBM.MCP
------ login to the hmc with the hscroot password

The below command is used to find out the vio server name and vhost info associated with the lpar


# lshwres -r virtualio --rsubtype scsi -m U9111-520-0000034 --filter lpar_ids=10 -F "slot_num,remote_slot_num,remote_lpar_name"

Note: we can replace “-m U9111-520-0001234” with the name of your managed system

50,50,vio_server1
51,51,vio_server2

The above output shows the client slot number, server slot number, and VIO server name.
-------------------------------------------------------------------------------------------------------------------------------------------
Find out the vhost assigned for the lpar

we can find the vhost info using the slot number 


#lsdev -slots|grep -i c50
output: vhost10

So the vhost10 is associated with our target lpar.

#lsmap -vadapter vhost10
SVSA            Physloc                                      Client Partition ID
--------------- -------------------------------------------- ------------------
vhost10          U9111.520.0000034-V2-C50                      0x0000000a

VTD                   indprodfin_rootvg
Status                Available
LUN                   0x8100000000000000
Backing device        hdisk43
Physloc               L5000000000000

the slot number is the “C50” part of the U9111.520.0000034-V2-C50. So we got the correct vhost.  (we can also confirm the 0x0000000a is the hexa decimal value of the lpar id 10.
and the pvid of the backing device is same as the pvid of the disk on the lpar.)
-------------------------------------------------------------------------------------------------------------------------------------------

Find out the free disk /unassigned disk on the vios which needs to be mapped.


$lspv -free

The above output will show the list of free disk which are available on the vio server and not mapped with any vhost.  or if we already talked with storage team and they provide the lun details then we can get the disk like below.

odmget CuAt|grep -i 4386   -> The command will list out the hdisk name.

we will take hdisk20 as a free disk for instance.

-------------------------------------------------------------------------------------------------------------------------------------------

Changing the attributes (reserve_policy and health check ) of the disk before mapping.

 As we have a dual vio set up, we need to change the reserve policy as no_reserve. Hence the disk is not hold by any of the vio server.


chdev -dev hdisk20 -attr reserve_policy=no_reserve
chdev -dev hdisk0 -attr hcheck_interval=60
-------------------------------------------------------------------------------------------------------------------------------------------

Mapping the disk to the vhost

syntax:      mkvdev -vdev <hdisk> -vadapter <vhost> -dev <VTD name>

mkvdev -vdev hdisk20 -vadapter vhost10 -dev indprodfin_rootvg

lsmap -vadapter vhost10
SVSA            Physloc                                      Client Partition ID
--------------- -------------------------------------------- ------------------
vhost10          U9111.520.0000034-V2-C50                      0x0000000a

VTD                   indprodfin_rootvg
Status                Available
LUN                   0x8100000000000000
Backing device        hdisk43
Physloc               L5000000000000


VTD                   indprodfin_rootvg1
Status                Available
LUN                   0x8200000000000000
Backing device        hdisk47
Physloc               L3000000000000

We confirm that the disk has been mapped successfully.

Now come to lpar and scan the new disk.
-------------------------------------------------------------------------------------------------------------------------------------------

Scanning the newly assigned disk on the lpar
#lspv 
hdisk0          0006a7df4403b4a6                  rootvg                      active

#cfgmgr     --> scanning the server

#lspv
hdisk0          0006a7df4403b4a6                  rootvg                      active
hdisk1              0006a7dfd9f11858                none

------------we got the newly added disk hdisk1

#lspath -l hdisk1
hdisk1,Enabled
hdisk1,Enabled
------------------------ confirmed that hdisk1 has a dual path.

# chdev -l hdisk1 -a hcheck_interval=20

#extendvg rootvg hdisk1

#lspv
hdisk0          0006a7df4403b4a6                  rootvg                      active
hdisk1              0006a7dfd9f11858               rootvg                      active





Monday, September 14, 2015

How to find out the vhost information of the disk?

How to find out the vhost information of the disk?


Sometimes we are in the situation to find out the VHOST information of particular hdisk. We can easily find out using the below method.


   Ã¼ First we need to find out in what VTD the hdisk is belongs to.
   Ã¼ Then using VTD, we can find out the vhost info.


For example, if we want to find out the hdisk5 is part of which vhost? Now the short cut is below.


  ü find out vtd which is belongs to the hdisk 

                   $lsmap -all|grep -p hdisk5

                             VTD                   testmachine-16
                             Status                Available
                             LUN                   0x8700000000000000
                             Backing device        hdisk5
                             Physloc               U7311.D20.067DDBB-P1-C02-T1-L113



   Ã¼ Now find out the vhost belongs to the VTD

                 syntax:   lsdev -dev <VTD> -field parent

                   $lsdev -dev testmachine-16 -field parent

                             parent
                             vhost3


So hdisk5 is part of vhost3


To confirm:

$lsmap -vadapter vhost3
SVSA            Physloc                                      Client Partition ID
--------------- -------------------------------------------- ------------------
vhost3          U9133.55A.065040H-V22-C16                    0x00000003
VTD                   testmachine-16
Status                Available
LUN                   0x8700000000000000
Backing device        hdisk5

Physloc               U7311.D20.067DDBB-P1-C02-T1-L113

VTD                   testmachine-15
Status                Available
LUN                   0x9200000000000000
Backing device        hdisk6
Physloc               U7311.D20.067DDBB-P1-C02-T1-L66




Tuesday, August 25, 2015

How to find out the vio server details from vio client on AIX 5.3?

How to find out the vio server details from vio client on AIX 5.3?


Using kdb, we can easily trace the vscsi configuration in aix. This command will save much time when we compare with the old method to do the same.

#echo "cvai" | kdb | grep vscsi

read vscsi_scsi_ptrs OK, ptr = 0x59A03C0

vscsi0 0x000007 0x0000000000 0x0 vios1->vhost8

vscsi1 0x000007 0x0000000000 0x0 vios2->vhost8


Most of us think that we cannot execute the above command to fetch the vio server information on AIX 5.3, thats wrong. Still we can use kdb command to get the information.

1. Simply executing the kdb command on the aix prompt

# kdb
You will receive a prompt like this:
0> 


2. Load the cvscsi autoload function (note: this function is already loaded by default on AIX 6.1 systems.)

0> cvscsi

read vscsi_scsi_ptrs OK, ptr = 0x59A03C0

Autoload function /usr/lib/ras/autoload/cvscsi64.kdb was
successfully executed


3. Then we can check the vscsi adapter details, using the cvai function:

0)> cvai

If you want only for a particular vscsi, we can use - cvai vscsix

Below will be the o/p:

unit_id: 0x30000001 partition_num: 0x1 partition_name: lparname

capability_level: 0x0 location_code: priv_cap: 0x1 host_capability: 0x0
host_name: vhostx
host_location:heart_beat_enabled: 0x1 sample_time: 0x1F Ping_response_time: 0x2D, Host part_number: 0x2 : 
OS_type: 0x3 
host part_name: VIO NAME
..........


Using the above output we can find out the 'host_part_name' for the hostname of the VIO server serving this adapter and host_name for the associated vhost adapter.








Thursday, June 12, 2014

How to find out the vhost information easily in vio server in aix?

How to find out the vhost information easily in aix?

Using the below command we can find out the vhost information very easily. We can get all the vhost name information associated with our target lpar very easily. For that we need have the LPAR ID in hexa decimal.


* Find the lpar id and convert into hexa decimal.

     For ex: if your LPAR ID is 15, then the hexadecimal value is "f"  

Using the below command we can convert decimal no to hexa-decimal.

    printf "%x\n" 15           output is: "f"



* Execute the below command on the VIO server to find out the vhost info.

     lsmap -all | grep vhost | grep 0x0000000f


Note: totally 6 zeros are needs to put after the "x" on the command and last two digit ("0f") is for hexa decimal number.

Advantages of this command is, if you have 6 virtual disks on the lpar from the vios, then we  will get all the 6 virtual disks associated with the vhosts name on the VIOS..



How to find out the VHOST informaiton using VTD names?

How to find out the VHOST informaiton using VTD names?


Many ways are there to find out the vhost information. Sometimes we know the VTD name but dont know about the VHOST information. The below commands used to find out the VHOST information using the VTD name. 

      lsdev -dev <VTD_NAME> -field parent 


(execute the command in the aix prompt)

         /usr/ios/cli/ioscli lsdev -dev <VTD_NAME> -field parent |egrep -v parent



Tuesday, June 18, 2013

VIOS frequently asked questions

VIOS FAQ

VIOS frequently asked questions


1) What is the Virtual I/O Server?

 The Virtual I/O Server is an appliance that provides virtual storage and shared Ethernet adapter capability to client logical partitions on POWER5 systems. It allows a physical adapter with attached disks on the Virtual I/O Server partition to be shared by one or more partitions, enabling clients to consolidate and potentially minimize the number of physical adapters required.



2) Is there a VIOS website?

Yes. The below VIOs website contains links to documentation, hints and tips, VIOS updates and fixes.



3) What documentation is available for the VIOS?

The VIOS documentation can be found online in the below  link.



4) What is NPIV?

N_Port ID Virtualization(NPIV) is a standardized method for virtualizing a physical fibre channel port. An NPIV-capable fibre channel HBA can have multiple N_Ports, each with a unique identity. NPIV coupled with the Virtual I/O Server (VIOS) adapter sharing capabilities allow a physical fibre channel HBA to be shared across multiple guest operating systems. The PowerVM implementation of NPIV enables POWER logical partitions (LPARs) to have virtual fibre channel HBAs, each with a dedicated world wide port name. Each virtual fibre channel HBA has a unique SAN identity similar to that of a dedicated physical HBA.
The minimum requirement for the 8 Gigabit Dual Port Fibre Channel adapter, feature code 5735, to support NPIV is 110304. You can obtain this image from the http://www-933.ibm.com/support/fixcentral/  



5) What is virtual SCSI (VSCSI)?

Virtual SCSI is based on a client and server relationship. The Virtual I/O Server owns the physical resources and acts as server, or target, device. Physical adapters with attached disks on the Virtual I/O Server partition may be shared by one or more partitions. These partitions contain a virtual SCSI client adapter that sees these virtual devices as standard SCSI compliant devices and LUNs.


6) What is the shared Ethernet adapter (SEA)?

A shared Ethernet adapter is a bridge between a physical Ethernet adapter or link aggregation and one or more virtual Ethernet adapters on the Virtual I/O Server. A shared Ethernet adapter enables logical partitions on the virtual Ethernet to share access to the physical Ethernet and communicate with stand-alone servers and logical partitions on other systems. The shared Ethernet adapter provides this access by connecting the internal VLANs with the VLANs on the external switches.


7) What physical storage can be attached to the VIOS?

See the http://www14.software.ibm.com/webapp/set2/sas/f/vios/documentation/datasheet.html  for supported storage and configurations.


8) What client operating systems support attachment to the VIOS?

1.     AIX 5.3 and AIX 6.1 TL 2
2.     SUSE LINUX Enterprise Server 9 for POWER
3.     Red Hat Enterprise Linux AS for POWER Version 3(update 2 or newer)
4.     Red Hat Enterprise Linux AS for POWER Version 4
5.     IBM i

9) What solutions can be supported using virtual devices and the VIOS?

Virtual SCSI disk devices are standard SCSI compliant devices that support all mandatory SCSI commands. Solutions that have special requirements at the device level should consult the IBM Solutions team to determine if the device meets your requirements.
The VIOS datasheet includes some information on VSCSI solutions.


10) Can SCSI LUNs be moved between the physical and virtual environment as is?

That is, given a physical SCSI device(ie LUN), with user data on it, that resides in a SAN environment; can this device be allocated to a VIOS and then provisioned to a client partition and used by the client as is?
No, this is not supported at this time. The device cannot be used as is, virtual SCSI devices are new devices when created, and the data must be put onto them after creation. This typically would require some type of backup of the data in the physical SAN environment with a restoration of the data onto the virtual disk.


11) In the context of virtual I/O, what do the terms server, hosting, client, and hosted partition mean?

Server and hosting partition is synonymous, as is client and hosted. The server/hosting partition(s) own physical resources and facilitates the sharing of the physical resource amongst the client/hosted partition(s).


12) Do AIX, Linux, and IBM i all provide Virtual I/O Servers?

The Linux and IBM i operating systems do provide various virtual I/O server/hosting features(virtual SCSI, ethernet bridging, etc). AIX does not provide virtual I/O server/hosting capabilities. There is only one product named the Virtual I/O Server. It is a single function appliance that provides I/O resource to client partitions, and does not support general purpose applications.


13) The VIOS appears to have some similarites with AIX, explain.

The VIOS is not AIX. The VIOS is a critical resource and as such, the product was originally based on a version of the AIX operating system to create a foundation based on a very mature and robust operating system. The VIOS provides a generic command line interface for management. Some of the commands in the VIOS CLI may have common names with AIX and Linux commands. These command names were chosen only because they were generic, the flags and parameters will differ. While some of the VIOS commands may drop the user into an AIX-like environment, this environment is only supported for the installing and setup of certain software packages(typically software for managing storage devices, see the VIOS's Terms and Conditions). Any other tasks performed in this environment are not supported. While the VIOS will continue to support it's current user interfaces going foward, the underlying operating system may change at any time.


14) What is the purpose of the oem_setup_env CLI command?

The sole purpose of the oem_setup_env VIOS CLI command is for ease in installing and setting up certain software packages for the VIOS. See the VIOS datasheet for a list of supported VIOS software solutions.


15) What type of performance can I expect from the VSCSI devices?

Please see the section titled "Planning for Virtual SCSI Sizing Considerations" in the VIOS online pubs in InfoCenter.


16) How do I size the VIOS and client partitions?

The VIOS online pubs in InfoCenter include sections on sizing for both Virtual SCSI and SEA. For Virtual SCSI, please see the section titled "Planning for shared Ethernet adapters".
In addition, the WorkLoad Estimator Tool is being upgraded to accommodate virtual I/O and the VIOS.


17) Why can't AIX VSCSI MPIO devices do load balancing?

Typical multipathing solutions provide two key functions: failover and load balancing. MPIO for VSCSI devices does provide failover protection. The benefit of load balancing is less obvious in this environment. Typically, load balancing allows the even distribution of I/O requests across multiple HBA's of finite resource. Load balancing for VSCSI devices would mean distributing the I/O workload between multiple VIOS's. Since the resources allocated to a given VIOS can be increased to handle larger workloads, load balancing seems to have limited benefit.


18) What is APV (Advanced Power Virtualization)?

The Advanced POWER Virtualization feature is a package that enables and manages the virtual I/O environment on POWER5 systems. The main technologies include:
  • Virtual I/O Server
    - Virtual SCSI Server
    - Shared Ethernet Adapter
  • Micro-Partitioning technology
  • Partition Load Manager
The primary benefit of Advanced POWER Virtualization is to increase overall utilization of system resources by allowing only the required amount of processor and I/O resource needed by each partition to be used.


19) What are some of the restrictions and limitations in the VIOS environment?

  • Logical volumes used as virtual disks must be less than 1 TB in size.
  • Logical volumes on the VIOS used as virtual disks cannot be mirrored, striped, or have bad block relocation enabled.
  • Virtual SCSI supports certain Fibre Channel, parallel SCSI, and SCSI RAID devices as backing devices.
  • Virtual SCSI does not impose and software limitations on the number of supported adapters. A maximum of 256 virtual slots can be assigned to a single partition. Every virtual slot that is created requires resources in order to be instantiated. Therefore, the resources allocated to the Virtual I/O Server limits the number of virtual adapters that can be configured.
  • The SCSI protocol defines mandatory and optional commands. While virtual SCSI supports all of the mandatory commands, some optional commands may not be supported at this time.
  • The Virtual I/O Server is a dedicated partition to be used only for VIOS operations. No other applications can be run in the Virtual I/O Server partition.
  • Future considerations for VSCSI devices: The VIOS uses several methods to uniquely identify a disk for use in as a virtual SCSI disk, they are:
    • Unique device identifier(UDID)
    • IEEE volume identifier
    • Physical volume identifier(PVID)
Each of these methods may result in different data formats on the disk. The preferred disk identification method for virtual disks is the use of UDIDs.

MPIO uses the UDID method.

Most non-MPIO disk storage multi-pathing software products use the PVID method instead of the UDID method. Because of the different data format associated with the PVID method, customers with non-MPIO environments should be aware that certain future actions performed in the VIOS LPAR may require data migration, that is, some type of backup and restore of the attached disks. These actions may include, but are not limited to the following:
    • Conversion from a Non-MPIO environment to MPIO
    • Conversion from the PVID to the UDID method of disk identification
    • Removal and rediscovery of the Disk Storage ODM entries
    • Updating non-MPIO multi-pathing software under certain circumstances
    • Possible future enchancements to VIO
  • Due in part to the differences in disk format as descibed above, VIO is currently supported for new disk installations only
  • Considered when implementing shared Ethernet adapters:
    • Only Ethernet adapters can be shared. Other types of network adapters cannot be shared.
    • IP forwarding is not supported on the Virtual I/O Server.