How To Mirror Your Root Disk On AIX (a.k.a. rootvg)

Mirroring rootvg: The commands

though this is a short process anyway..but anyway..
actual values used in my example, change those to suit your environment


Sponsored Links

  1. lspv in my example, hdisk0 is rootvg, hdisk1 is not in use
  2. lsvg -l rootvg compare PPs and LPs and verify not mirrored
  3. extendvg rootvg hdisk1
  4. mirrorvg rootvg
  5. bosboot -ad /dev/hdisk1 make hdisk1 bootable
  6. bootlist -m normal hdisk0 hdisk1 tell AIX it can boot off hdisk1
  7. lsvg -l rootvg compare PPs and LPs and verify mirrored

Mirroring rootvg: the screendump

# lspv
hdisk0 00f6896363c5a76a rootvg active
hdisk1 none None
#

I have an hdisk0 in rootvg. I have a second disk not in use. This is how it came pre-installed from IBM.

# lsvg -l rootvg
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 1 1 2 closed/syncd N/A
hd6 paging 1 1 2 open/syncd N/A
hd8 jfs2log 1 1 2 open/syncd N/A
hd4 jfs2 2 2 2 open/syncd /
hd2 jfs2 4 4 2 open/syncd /usr
hd9var jfs2 1 1 2 open/syncd /var
hd3 jfs2 1 1 2 open/syncd /tmp
hd1 jfs2 1 1 2 open/syncd /home
hd10opt jfs2 1 1 2 open/syncd /opt
fwdump jfs2 2 2 2 open/syncd /var/adm/ras/platform
lg_dumplv sysdump 4 4 1 open/syncd N/A
#

Running the lsvg -l rootvg, compare the PPs and the LPs. It is a 1:1 ratio which means these filesystems are not mirrored.

# extendvg rootvg hdisk1
0516-1254 extendvg: Changing the PVID in the ODM.
# lspv
hdisk0 00f6896363c5a76a rootvg active
hdisk1 00f6896326f7a5cd rootvg active
#

Note the PVID is added with this command

# mirrorvg rootvg
0516-1804 chvg: The quorum change takes effect immediately.
0516-1126 mirrorvg: rootvg successfully mirrored, user should perform
bosboot of system to initialize boot records. Then, user must modify
bootlist to include: hdisk1 hdisk0.
#

We’ve now added our second disk

# bosboot -ad /dev/hdisk1
bosboot: Boot image is 43114 512 byte blocks.
#

We’ve now made hdisk1 bootable

# bootlist -m normal hdisk0 hdisk1
#

We’ve now put both hdisk0 and hdisk1 in the boot order so we’ve told AIX it is okay to boot off of hdisk1

# bootlist -m normal -o
hdisk0 blv=hd5
hdisk1 blv=hd5
#

Here you have verified the bootlist so AIX knows it can boot off of either disk

# lsvg -l rootvg
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 1 2 2 closed/syncd N/A
hd6 paging 1 2 2 open/syncd N/A
hd8 jfs2log 1 2 2 open/syncd N/A
hd4 jfs2 2 4 2 open/syncd /
hd2 jfs2 4 8 2 open/syncd /usr
hd9var jfs2 1 2 2 open/syncd /var
hd3 jfs2 1 2 2 open/syncd /tmp
hd1 jfs2 1 2 2 open/syncd /home
hd10opt jfs2 1 2 2 open/syncd /opt
fwdump jfs2 2 4 2 open/syncd /var/adm/ras/platform
lg_dumplv sysdump 4 4 1 open/syncd N/A
#

Note the PP’s are twice as much as the LP’s are. That is a “count of copies” so to speak, i.e. those filesystems are mirrored.


Sponsored Links

Extrapolating to filesystems in general…

If you are mirroring non-rootvg VGs, follow the above EXCEPT adding the part about making it bootable. VGs that are not rootvg are for data and other uses and cannot be booted off of so should not be added to the bootlist (otherwise you’ll be in some trouble)

Here’s a jpg with the entire process:
AIX_mirroringdisk

 

 

 

source: http://geekswing.com/geek/how-to-mirror-your-root-disk-on-aix-aka-rootvg/

Zapisz

Attachments
There are no attachments for this article.
Related Articles RSS Feed
AIX, Storage, System Admin Allocating shared storage to VIOS clients
Viewed 2273 times since Fri, Apr 19, 2019
Create a mksysb + SPOT using NIM (CLI)
Viewed 5534 times since Tue, Jul 17, 2018
AIX 0516-404 allocp: This system cannot fulfill the allocation
Viewed 3306 times since Thu, Sep 20, 2018
Top 4 Reasons for Node Reboot or Node Eviction in Real Application Cluster (RAC) Environment
Viewed 90013 times since Thu, Jun 21, 2018
AIX alt_disk_copy
Viewed 9797 times since Sun, Jun 30, 2019
How to upgrade TL and SP in AIX using alternate disk(alt_disk_copy)
Viewed 11466 times since Sun, Jun 30, 2019
AIX WIKIS developerworks
Viewed 2334 times since Sun, Jun 17, 2018
LVM: Unmirror/Mirror "rootvg" Volume Group
Viewed 3311 times since Mon, May 21, 2018
Using Shell Redirection: All About the Here-Doc
Viewed 10249 times since Wed, May 30, 2018
SSH-COPY-ID on AIX. SSH remote AIX’s box without password
Viewed 16752 times since Thu, Feb 21, 2019