Wednesday 2 June 2021

AIX LVM : Logical Volume Commands List

This post describes that few AIX LVM Logical Volume Commands. Below are the commands list.

Creates a testlv logical volume.
 # mklv -y (lv) -t jfslog (vg) (No of PP's) (pv Name optional)

 # mklv -y testlv -t jfs2 testvg 20 hdiskXX

To display info about LV by PV.
 # lslv -l lv00

To display LV allocation map for hdisk1.
 # lslv -p hdisk1

To change the fslv00 to copy type.
 # chlv -t copy fslv00

To rename LV fslv00 to silv.
 # chlv –n silv fslv00

To change the ora1data_lv to <XXX to 950 PP>.
 # chlv -x 950 ora1data_lv

To change the lv00 to readonly mode.
 # chlv -p r lv00

To remove the logical volume testlv.
 # rmlv testlv

To remove testlv without user intervention.
 # rmlv -f testlv

To make LV testlv  with three copies on hdisk1.
 # mklv  -s n -c 3 testlv hdisk1

To extend the LV testlv with 5 LPs.
 # extendlv  testlv 5

To mirror LV testlv on same PV with 2 copies.
 # mklvcopy -s n testlv 2 hdisk1

To mirror LV testlv on PV hdisk1 and hdisk2 with 3 copies.
 # mklvcopy testlv 3 hdisk1 hdisk2

To remove one copy of  LV testls from hdisk1.
 # rmlvcopy testlv 2 hdisk1

To create a jfslog with name log00 on VG newvg with 2LPs.
 # mklv -t jfslog -y log00 newvg 2

To format jfslog volume log00.
 # logform /dev/log00

Move a logical volume between physical volumes. Both physical volumes must be in the same volume group.
 # migratepv -l (lv) (old pv) (new pv)

Initializes an LV for use as an JFSlog.
 # logform (/dev/lv)

Displays Logical Volume Control Block information.
 # getlvcb -AT (lv)

Previous post describes commands list for physical volumes AIX LVM Physical Volume Commands and AIX Volume Group Commands AIX LVM Volume Group Commands
 

AIX LVM : Volume Group Commands List

This post describes that few AIX LVM Volume Group Commands. Below are the list.

To display all VGs in server.
 # lsvg

To display all active VGs in server.
 # lsvg -o

To display complete information about rootvg.
 # lsvg rootvg

To display information about all LVs in rootvg.
 # lsvg  -l rootvg

To display information about all LVs in all VGs.
 # lsvg -o |lsvg -il

To display information about all PVs in rootvg.
 # lsvg  -p rootvg

Create VG with name testvg on hdisk1 with physical partition size 256MB.
 # mkvg -y testvg -s 256 hdisk1

Create VG with name oravg on hdiskXX with partition size 512MB.
 # mkvg -s 512 -y oravg hdiskXX

Create BIG Volume Group.
 # mkvg -B -y  bigvg -s 512 hdisk1

Create scalable VG with name testvg.
 # mkvg -S -y testvg -s 512 hdisk1

Create testvg on hdisk1 with PP size 4 and no of partions 2 * 1016.
 # mkvg -s 4 -t 2 -y testvg hdisk1

To change VG newvg automatically activated at startup.
 # chvg -a y newvg

To deactivate the automatic activation at startup.
 # chvg -a n newvg

To change maximum no. of PP to 2032 on vg newvg.
 # chvg -t 2 newvg

To disable quorum on VG newvg.
 # chvg -Q n newvg

To reorganises PP allocation of  VG newvg.
 # reorgvg  newvg

To add PV hdisk3 and hdisk4 to VG newvg.
 # extendvg newvg hdisk3 hdisk4

To Export the VG newvg.
 # exportvg newvg

To import the hdisk2 with name  newvg, and assign major number 44.
 # importvg -V 44 -y newvg   hdisk2

To remove PV hdisk3 from VG newvg.
 # redcucevg newvg hdisk3

To deactviate VG newvg.
 # varyoffvg newvg

To activate VG newvg.
 # varyonvg newvg

To sync the mirrored LV in the VG oravg.
 # syncvg -v oravg

To mirror lv’s of sivg with hdisk2(-m for extract mirror,-S for forbackground miror).
 # mirrorvg –S –m sivg hdisk2

To remove the mirrored PV from the set.
 # unmirrorvg sivg hdisk2

 

Previous post describes commands list for physical volumes AIX LVM Physical Volume Commands
 

AIX LVM : Physical Volume Commands List

This post describes that few AIX LVM Physical Volume Commands. Below are the list.

To displays the all physical volumes.
 # lspv

To display  PP usage of hdisk0.
 # lspv -p hdisk0

To list all logical volumes on PV hdisk0.
 # lspv -l hdisk0

To Close the PV (Used while removing PV without varyon).
 # chpv -v r hdisk1

To open the PV in AIX.
 # chpv -v a hdisk1

To clear the master boot record on PV hdisk0.
 # chpv -c hdisk0

To move PPs from PV hdisk1 to hdisk2.
 # migratepv  hdisk1 hdisk2

To migrate LV silv from PV hdisk1 to hdisk2.
 # migratepv -l silv hdisk1 hdisk2

To change or assign the pvid to new disk (Don't execute on existing PV).
 # chdev -l hdiskXX -a pv=clear

 # chdev -l hdiskXX -a pv=yes


Tuesday 1 June 2021

Dump device is too small Errpt E87EF1BE

This post gives you the solution if you got the errpt error Dump device is too small in AIX.

Error :

LABEL:          DMPCHK_TOOSMALL
IDENTIFIER:     E87EF1BE

Date/Time:       Sat May 29 15:00:00 EDT 2021
Sequence Number: 2452
Machine Id:      XXXXXXXXX
Node Id:         TEST01
Class:           O
Type:            PEND
WPAR:            Global
Resource Name:   dumpcheck      

Description
The largest dump device is too small.

Probable Causes
Neither dump device is large enough to accommodate a system dump at this time.

Recommended Actions
Increase the size of one or both dump devices.

Detail Data
Largest dump device
lg_dumplv                                                                                                                      
Largest dump device size in kb
     2621440
Current estimated dump size in kb
     3984302
 

Soluction :

1. Verify the how many dump devices are configured in server using below command.

# sysdumpdev -l

2. Verify the largest dump device using below command(dumpcheck -p) .

# /usr/lib/ras/dumpcheck -p
The largest dump device is too small.

Largest dump device
         lg_dumplv
Largest dump device size in kb
         2621440
Current estimated dump size in kb
         3984302

Above output states that we have to increase the dump logical volume 'lg_dumplv' to estimated dump size in 3984302 KB(3890.9 MB).

3. Verify the rootvg whether we have Free PP's there or not. If we have free PP's to meet the estimated dump size then increase the dump logical volume. As per the step 2, current dump size is 2560 MB and
estimated dump size is 3890.9 MB.
To fix this issue we have increase the dump size 1330.9 MB. If your PP size is 128 MB, you have increase the dump logical volumen by 11 LP (1330.9 / 128 = 10.39) . Execute the below commands.

To verify the Free PP's and PP size.
# lsvg rootvg

4. Extend the dump logical volume by 11 LP's.

# extendlv lg_dumplv 11

5. Execute the dumpcheck command again to check if still it showing the any error. Shown nothing means issue got fixed.

#   /usr/lib/ras/dumpcheck -p

 

                                                            Thanks for reading this Post

Recover the root password in AIX

 In this post we will discuss, how to recover the root password in AIX.

1.  Push the NIM resources like lpp_source and SPOT or mksysb and SPOT to the server(Issued server). This oslevel of resources should be equal or above.

2. Take the downtime and boot the server in SMS mode. Once the system is Service Mode and you've booted on the bootable media/ booted using NIM resources,which is of the same version and level as the system, follow the prompts to the Welcome to Base OS menu.

3. Next Choose Start Maintenance Mode for System Recovery (Option 3).

4. The next screen displays prompts for the Maintenance Menu

             Choose Option 1: Acess a Root Volume Group

5. The next screen prints a warning message and asks you to select 0 to continue.
             Select 0 to Continue

6. The next screen asks you to select the proper volume group.
            Select the proper volume group for your machine.

7. The console will display information about rootvg and a menu with two options
                Choose option 1: Access this volume group and start a shell

8. Once you have the command prompt, run the passwd command:

               # passwd
               Changing password for "root"
                root's New password:
                Enter the new password again:
7. With the key in Normal position (if applicable), issue the reboot command: sync;sync;sync;reboot

 

                                                            Thanks for reading this Post

Thursday 12 September 2019

Virtual I/O Server update/upgrade Procedure

This post explains step by step process to update VIO server from one version to new version. VIOS is nothing but Virtual I/O Server. Tested and successfully completed this VIOS update procedure in our environment from VIO 2.2.4.10 to 2.2.6.32 and VIO 2.2.6.10 to 2.2.6.32. Follow the below steps to update the VIO Server.

1. Take the configuration backup and mksysb or alternate disk back.
2. Break the rootvg mirror and take the clone for quick rollback. If your VIO server with single disk take the mksysb backup.
3. Remove the all interim fixes and commit the filesets in current version.
4. Mount the packages downloaded NFS filesystem
5. Update the VIO Server using updateios command and wait until it completed. Next reboot the VIO Server
6. Verify the latest VIOs version and check if any missing packages and re-mirror the rootvg

1. Take the configuration backup and mksysb or alternate disk back.

The viosbr command creates a backup of only the VIOS configuration.
# viosbr -backup -file /tmp/<file name>

Take the mksysb backup for rootvg. It will create entire rootvg backup
# backupios -file <path to NFS location>/<file name> -mksysb

2. Break the rootvg mirror and take the clone for quick rollback. If your VIO server with single disk take the mksysb backup.

To break the rootvg mirror and create a clone for quick rollback
$ bootlist -mode normal –ls
$ unmirrorios hdisk1
#  migratepv hdisk1 hdisk0     (Run as root user)
$ reducevg -rmlv rootvg hdisk1
$ alt_root_vg -target hdisk1

$oem_setup_env (to get root shell)
# bosboot -ad hdisk0 (using root shell)
# bootlist -m normal hdisk0 hdisk1 (using root shell)

3. Remove the all interim fixes and commit the filesets in current version.

To remove all interim fixes, if any installed.
$ lssw
$ updateios -remove <ifix_LABEL>
Commit existing filesets:
$ updateios –commit

4. Mount the packages downloaded NFS filesystem
# mount $nim_server:/nim/$location_of_vios_patches  /mnt
# cd /mnt

5. Update the VIO Server using updateios command and wait until it completed. Next reboot the VIO Server

Run the following command to perform updating VIOS.
$ updateios -accept -install -dev /mnt -> it will install the VIOS patches

Upon successful update completion take a reboot of server   .

$ shutdown -restart

6. Verify the latest VIOs version and check if any missing packages and re-mirror the rootvg

Check consistency of currently installed filesets
# instfix –i | grep ML
# lppchk –v
$ ioslevel
Once everything confirmed, re-mirror the rootvg.

$ extendvg rootvg hdisk1
$ mirrorios hdisk1
$ bootlist -mode normal -ls (to view)
$ oem_setup_env (to get root shell)
# bosboot -ad hdisk1 (using root shell)
# bootlist -m normal  hdisk0 hdisk1 (using root shell)
# exit (using root shell, to go back to VIOS shell from root shell)

VIOS Backout/Rollback Procedure :
Change the bootlist and Reboot the server with older version.

#bootlist –m normal hdisk1 hdisk0
#bootlist –m normal –o

#shutdown –Fr now
Once the server is came up, Re-mirror the rootvg .

$ extendvg rootvg hdisk1
$ mirrorios hdisk1
$ bootlist -mode normal -ls (to view)
$ oem_setup_env (to get root shell)
# bosboot -ad hdisk1 (using root shell)
# bootlist -m normal  hdisk0 hdisk1 (using root shell)
# exit (using root shell, to go back to VIOS shell from root shell

Sunday 8 September 2019

Restore the mksysb image to alternate Disk in AIX

This restoration process is very useful to restore the server from mksysb backup file, instead of using NIM resources like mksysb and spot.
By using alt_disk_mksysb command we can restore the system backup on separate disk without down the server. No downtime required. This is a online activity.
Minimum downtime required to reboot the server.

Steps are
1. Remove the old_rootvg image, if exists
# alt_rootvg_op -X old_rootvg

Note that the -X flag only removes the volume group place holder for the altinst_rootvg or old_rootvg.

2. To install mksysb image on hdisk1 .It will take few minutes to complete the installation wait until it is completed.
# alt_disk_mksysb -m /mksysb_images/my_mksysb -d hdisk1

alt_disk_mksysb flags
-d target_disk(s) – The disk or disks you want to clone to.

-m Specifies the location of the mksysb that you want to clone. The value for device can be: Tape / CD device OR path name of mksysb image in a file system.

3. Once completed above command, Verify bootable image is created on hdisk1 or not . For hdisk1 it has to show YES.
# ipl_varyon -i

4. If you got the downtime reboot the server with hdisk1(altinst_rootvg)
# bootlist -m normal -o
# bootlist -m normal hdisk1 hdisk0

# shutdown -Fr

Note :
If your rootvg was mirrored to hdisk0 & hdisk1 on the source system when you created the mksysb, and you want to alt_clone to a single disk, (hdisk2 on the target system, for example) using a customized image.data file located under /home/image.data, you would run the following:

# alt_disk_mksysb -m /usr/sys/inst.images/mksysb_filename -i /home/image.data -d hdisk2

-i image_data –  image.data file to use instead of the default image.data file from mksysb image. The image.data file name must be a full path name (for example, /tmp/my_image.data).

For example if you have a customized image.data file. A common use of a custom image.data file would be to break the mirrors on the rootvg so you can install a mksysb backup with a mirrored rootvg environment to one disk

Privacy Policy

  Privacy Policy for UNIX TECH INFO At UNIX TECH INFO, accessible from https://unixworld4admin.blogspot.com/, one of our main priorities is ...