Steps to Replace Mirrored rootvg drive
- Determine if the indicated volume group has mirrored disks
lsvg -l vg_name
- View physical volumes (disks) in a volume group
lsvg -p vg_name
- View current boot list order
bootlist -m normal –o
Display
hdisk0
hdisk1
- Remove bad hdisk# from the bootlist (only if it is first in the list)
bootlist -m normal hdisk1
- Verify the bad drive is not listed in the boot list (In this example the bad drive hdisk0 has been removed from the boot list.)
bootlist -m normal –o
Display
hdisk1
- Displays all drives with the volume group they are associated with, and their state
Lspv
- Remove quorum check on logical volumes for the affected volume group
chvg -Q n vg_name
- Remove all logical volumes from the drive with the unmirrorvg command
unmirrorvg rootvg hdisk0 (check with lsvg -l rootvg;
the number of LP's and PP's should be equal.)
- Remove drive from Volume Group
reducevg -d rootvg hdisk0 (check with lsvg -p rootvg; hdisk0 should now have a none
status.)
Only if the above error is received during
the execution of the reducevg command
proceed to the “Applicable only if system dump device exist on the disk”
section below, to change the system dump device location to /dev/sysdumpnull. Otherwise
proceed to step 10
1. Changes system dump device location
sysdumpdev -P -[s] or [p] /dev/logical
name
option notation: -P indicates
permanent
-s indicate secondary dump
device
-p
indicates primary dump device
#sysdumpdev -P -s /dev/sysdumpnull (verify
result using sysdumpdev command, without option flags.)
2. Remove drive from ODM
rmdev -l hdisk0 –d
3. Verify drive has been removed from the volume group as
well as from ODM
Lspv
4. Remove drive at the hardware level and run cfgmgr
automatically
#diag
5. Add drive back to the volume group
extendvg
rootvg hdisk0
6. Create new copies for each logical volume.
NOTE: This
command will take 1.5 to 2 hours to complete** You should not ctrl-c to break
out, let it run. To see if the process is still running, you can pull up
another window to the server and run: ps -ef|grep -i sync.
#
mirrorvg rootvg hdisk0
7. Sync volumes
varyonvg rootvg
8.
Add quorum check back to the logical volumes for the affected volume group
chvg -Q y rootvg
Only if the logical volume for system dump device was removed
proceed to the “Applicable only if
system dump device was removed from disk”, section below. Otherwise
continue with step 17.
1. Creates a new
logical
volume
mklv -y [LVname] -t
[type] [vg_name] #of LPs hdisk#
option
notation/syntax :
-y allows the
user to designate a logical volume name of
their choice.
LVname - the
name designated for logical volume
(Ex : hd71)
-t specifies
the type of device (Ex : sysdump)
vg_name - the volume
group name (Ex : rootvg).
#of LPs - the
number of logical partitions for new logical
volume (for our purposes this number should be
(taken from the LP
output from the command :
lsvg -l rootvg for hd7 and hd71 or from SCIM data.)
2. Changes system dump device location
sysdumpdev -P -s /dev/hd71
3. Updates boot image
bosboot -ad hdisk0
4. Add the replaced drive back to the boot list (if it was removed
in step 2)
bootlist -m normal hdisk0 hdisk1
5. Verify the replaced drive
is listed at the top of the boot list
bootlist -m normal -o
******************* ********************* *****************
Steps to mirrored non-rootvg drive
1. Determine if the indicated volume group has
mirrored disks
lsvg -l app_vg
2. Displays all dives with the volume group they are
associated with, and their state
lsvg -p app_vg
3. Displays all dives with the volume group they are
associated with, and their state
#Lspv
4. Remove quorum check on
logical volumes for the affected volume group
chvg -Q n app_vg
5. Remove all logical volumes
from the drive with the unmirrorvg command
unmirrorvg
app_vg hdisk2
6. Remove drive from Volume
Group
reducevg -d app_vg hdisk2
7. Remove drive from ODM
rmdev -l hdisk2 –d
8. Verify
drive has been removed from the volume group as well as from ODM
lspv
9. Remove drive at the
hardware level and run cfgmgr automatically
Run diag
10. Add drive back to the
volume group
extendvg app_vg hdisk2
11. Create new copies for
each logical volume
mirrorvg app_vg hdisk2
12. Sync volumes
varyonvg
app_vg
13. Add quorum check back to
the logical volumes for the affected volume group
chvg -Q y app_vg
******************* ************************* ***********************
Steps to non-mirrored rootvg drive
1. Verify
that there is a good backup of the rootvg
Note : If not have BRS run a
backup before replacing drive
2. Displays
all drives with the volume group they are associated with, and their state
Lspv
3. Export
volume group
exportvg rootvg
4. Remove
drive from ODM
rmdev -l hdisk1 -d
5. Verify
drive has been removed from the volume group as well as from ODM
lspv
6. Remove
drive at the hardware level and run cfgmgr automatically
Run diag
7. Have
CSA fill out the paper work to have BRS perform a data restoral
Note : If a volume group was created
after saving the rootvg, then use the importvg command to import every volume
group into the ODM that was created after the last backup
*************************** *************************
********************
Steps to Replace non-mirrored drive (
Non-rootvg)
1. Verify
that there is a good backup of the rootvg
Note : If not have BRS run a
backup before replacing drive
2. Displays
all dives with the volume group they are associated with, and their state
lspv
3. Export
volume group
exportvg test_vg
4. Verify
there are no referneces to the logical volume or file system in the
/etc/filesystems
more /etc/filesystems
5. Remove
drive from ODM
rmdev -l hdisk2 -d
6. Verify
drive has been removed from the volume group as well as from ODM
lspv
7. Physically
replace disk
8. Reconfigure
drive with the cfgmgr command
cfgmgr
9. Have CSA
fill out the paper work to have BRS perform a data restoral
* Source Article from : Internet