Creating, canceling, and replacing rootvg mirrors on AIX disks fails

Published: 2015-01-08 20:24:54 Author: Anonymous I would like to comment
This article mainly introduces the AIX rootvg image production and cancellation, replacement of hard disk problems, need friends can refer to

ROOTVG is not mirroring properly

The following commands all run on AIX5.4

# lspv hdisk0 000a1ddc7f36a2f0 rootvg active hdisk1 none None #chdev -l hdisk1 -a pv=clear #chdev -l hdisk1 -a pv=yes hdisk1 changed # lspv hdisk0 000a1ddc7f36a2f0 rootvg active hdisk1 000a1ddcd9e3cc9e None #extendvg rootvg hdisk1 // If there is data in hdisk1 and extend the data in hdisk1 will be lost #extendvg -f rootvg hdisk1 // Force hdisk1 to be added to rootvg #lspv hdisk0000a1ddc7f36a2f0 rootvg active hdisk1 000a1ddcd9e3cc9e rootvg active #mirrorvg rootvg hdisk1 #mirrorvg rootvg 0516-1124 mirrorvg: Quorum requirement turned off, reboot system for this to take effect for rootvg. 0516-1126 mirrorvg: rootvg successfully mirrored, user should perform bosboot of system to initialize boot records. Then, user must modify bootlist to include: hdisk0 hdisk1. // Check whether the mirror is complete. // How do I check whether the mirror is performed on a 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 2 4 2 open/syncd N/A hd8 jfslog 1 2 2 open/syncd N/A hd4 jfs 1 2 2 open/syncd / hd2 jfs 33 66 2 open/syncd /usr hd9var jfs 1 2 2 open/syncd /var hd3 jfs 1 2 2 open/syncd /tmp hd1 jfs 1 2 2 open/syncd /home Hd10opt jfs 4 8 2 open/syncd /opt

Note: LPx2=PP indicates one mirror, LP=PP indicates no mirror, and LPx3=PP indicates two mirrors. LPx2=PP indicates the data of one LP, which corresponds to two PP data. Physically, there are two copies # lsvg rootvg VOLUME GROUP: rootvg VG IDENTIFIER: 000a1ddc00004c00000001197f36bcd3 VG STATE: active PP SIZE: 32 megabyte(s) VG PERMISSION: read/write TOTAL PPs: 1084 (34688 megabytes) MAX LVs: 256 FREE PPs: 994 (31808 megabytes) LVs: 9 USED PPs: 90 (2880 megabytes) OPEN LVs: 8 QUORUM: 1 TOTAL PVs: 2 VG DESCRIPTORS: 3 STALE PVs: 0 STALE PPs: 0 ACTIVE PVs: 2 AUTO ON: yes MAX PPs per VG: 32512 0 MAX PPs per PV: 1016 MAX PVs: 32 LTG size (Dynamic): 256 kilobyte(s) AUTO SYNC: no HOT SPARE: no BB POLICY: relocatable

Note: QUORUM: 1 indicates no, and QUORUM: 2 indicates yes. # bootlist -m normal -o hdisk0 # bosboot -ad /dev/hdisk1 # bootlist -m normal hdisk1 hdisk0 # bootlist -m normal -o hdisk1 hdisk0 # shutdown -Fr Note: AIX: rootvg mirror. Makes both hard drives bootable. Benefits: When the main boot hard disk fails, you can boot the machine with another hard disk.

Note: chdev -l hdisk1 -a pv=yes is safe. If it does not run successfully, creating a VG must fail, because mkvg is what is called

Postscript: # unmirrorvg rootvg hdisk1 // Remove the mirror of rootvg # chpv -c hdisk1 // Remove the boot information of hdisk1 # reducevg rootvg hdisk1 // Delete hdisk1 #rmdev -dl hdisk1 from rootvg // Delete hardware devices (+ -R indicates forced deletion) # bootlist -m normal hdisk0

Note: 1. If no disk is specified to unmirrorvg rootvg, it is dangerous. Generally, do not use this command if no disk is specified

The specific steps are as follows: a) Check the currently available hard drives: # lspv hdisk0 0002d74f0e69d97a rootvg hdisk1 0002d74fea8ad09d none hdisk2 000214dadca3a694 dbbakvg hdisk3 0002d74f1e67ac3b dbbakvg

In this example, hdisk0 is the default disk used after the system is installed, and the last attribute of hdisk1 is none, indicating that the disk is not used by any VG and can be used as rootvg mirror.

b) Check whether hdisk1 can be used as the boot device supported by AIX: # bootinfo -B hdisk1 If this command returns a value of 1, the selected disk can be booted by AIX. Any other value indicates that hdisk1 is not a candidate for rootvg mirroring. c) Extend rootvg to include hdisk1: #extendvg rootvg hdisk1 If hisk1 was previously used by another VG, you can cancel the physical volume quota management in the VG with the -f parameter #extendvg -f rootvg hdisk1 d) (this VG is available as long as any PV is active in the VG) : # chvg-Qn rootvg run, then check with lsvg rootvg, The value of the QUORUM entry will be 1 e) Mirror the rootvg # mirrorvg -c 2 rootvg The time required to do this is related to the amount of space currently used by the rootvg. In practice, at 95 GB, it took 2 hours. f) Create boot information # bosboot - ad hdisk0 # bosboot - ad hdisk1 g) devices on the two disks of the rootvg. # bootlist -m normal hdisk0 hdisk1 cd0 To this, The rootvg mirror is complete.

Replacing a hard disk is faulty.

Step 1: unmirror, then remove hdisk2 from datavg, then delete hdisk2 with rmdev; Step 2: Shut down, take out hdisk2, put the new 73G hard disk into it, and turn it on; Step 3: Add the new 73G hard disk to datavg, and then migratepv -l hdisk1 hdisk2 copies the contents of hdisk1 to the new hard disk; Step 4: Then replace hdisk1 in the same way. Creating and canceling images on AIX

Prerequisites: In this section, hdiskn represents the newly added disk. The general steps are as follows: Add a new disk, scan for the device, check whether the device is normal, add a pvid, add a volume group, mirror, add boot information to the new disk, and reset the boot sequence. 1.lsp View the physical volume. When no new hardware was found, we started scanning the device cfgmgr-v 2. After discovering new hardware, this is where we look at the properties of the physical volume. lsdev -Cc disk The new physical volume does not have pvid 3. Add pvid. chdev -l hdiskn -a pv=yes The N in hdiskn is a variable, which represents the label of the new disk. You can also run chdev -l hdisk1 -a pv=clear to delete pvid 4. Add volume group extendvg rootvg hdiskn // If there is data in hdiskn to extend, the things in hdiskn will be lost. This is also the premise for the two disks to mirror, because all disks that are mirrored must be in the same volume group. 5. Create a mirror mirrorvg -c 2 rootvg. There are only two cases where two or three disks are mirrored. We can also do this directly if there are two: mirrorvg rootvg Since the default is two there is no need to specify the source and destination disks. However, if three disks are used as mirroring, you must specify the source and destination disks. mirrorvg -c 3 rootvg hdisk0 hdisk1 6. Check whether the mirror is created successfully. lsvg -l rootvg Check the mappings between pps and pvs: 1:1 indicates that the mirror is not created, 1:2 indicates that a dual disk mirror is created, and 1:3 indicates that a 3-disk mirror is created. You can also use lsvg rootvg to check, mainly by looking at the QUORUM: 1 indicates no, QUORUM: 2 indicates yes. Querying the current boot order for the new disk bootlist -m normal -o Adding boot information to hdiskn bosboot -ad /dev/hdiskn Resets the boot order so that hdiskn has the highest priority. Check whether the system can not be started bootlist -m normal hdiskn hdisk0 cdrom 8. Restart the system shutdown -Fr to undo mirror 1. Remove the mirror of rootvg unmirrorvg rootvg hdiskn 2. Delete the boot information chpv -c hdisk1 3. Reset the boot sequence bootlist -m normal hdisk0

  • Tag: AIX rootvg image creation Cancels the disk replacement

Related article

Latest comments