Saturday, July 29, 2017

# add lun in vio aix # aix vio lun

UNIX : Adding 2 LUNs to VIO servers for AIX client server

This is a tutorial (adapted) to add 2 LUNs to 2 VIO servers for use by AIX client server gummybears

I trust you have raised a Change Request, and a request to SAN team to assign LUNs to both VIO servers.
The number of LUNs depend on the client server gummybears' LVM configuration.
In most cases 4 LUNs is assigned and these will be striped on gummybears for FS extension

1. Adding 2 LUNs to vio1 and vio2

(These steps are for vio1 and should be repeated on vio2)

Login as padmin on vio1

Switch to oem mode

# oem_setup_env

Pick up new path and environment

# su -

Scan for disks

# cfgmgr

2. Identify the new disks. For security reasons I have removed the original server name and replaced it with "gummybears" Of course I did a poor editing job but you get the picture


3. There is a crafty little script someone has created and stored in /usr/local/scripts to set the reserve policy of the disks (I will share the content of the scripts at the end)

So I just run the script...

4. Make the pvid of the disks visible on both vios


5. We then identify the vhost for client gummybears. It will have two vhosts on each vio server, one for rootvg disks and another data VGs. Identify the data VG vhost


6. From the output above, it appears that vhost4 is used for rootvg. We don't touch that


From the output above, it appears that SAN LUNs are assigned to vhost12. We use this vhost to make virtual target devices

There is another crafty script that is used to generate mkvdev commands (I will share the contents later)  Once done, repeat steps 1 - 6 on vio2

#########################################################################

We now go about making the LUNs available on client server gummybears

1. Make note of current disks

# lspv

2. Scan for disks allocated from VIO

# cfgmgr

3. Identify new disks

# lspv



4. We then run the crafty script in client server gummybears to set disk health check interval (the output below had been truncated for clarity)



5. We then add the disks to the VG

# extendvg vgapp hdisk21 hdisk22

6. Set the disks' path priorities (crafty script does the job, output truncated for clarity)


Done!

###############################################################################

And here are the nifty scripts (they're not mine, found online somewhere)

1. Script to set reserve policy on disks on vio1


2. Script to generate mkvdev commands on vio1

3. Script to run on client gummybears to set the disk health check interval

4. Script to set disk path priority on client gummybears

No comments:

Post a Comment