LVM Disk Replacement: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
# [[LVM Install a New Physical Volume|Install and configure the new physical volume.]] | # [[LVM Install a New Physical Volume|Install and configure the new physical volume.]] | ||
# Add the new disk to the volume group. | # Add the new disk to the volume group. | ||
## <tt>'''# extendvg | ## <tt>'''# extendvg rootvg <new_hdisk#>'''</tt> | ||
# Does the disk contain hd5 (boot partition)? | # Does the disk contain hd5 (boot partition)? | ||
## <tt>'''# lslv -m hd5'''</tt> | ## <tt>'''# lslv -m hd5'''</tt> | ||
Line 14: | Line 14: | ||
## <tt>'''# migratepv <old_hdisk#> <new_hdisk#>'''</tt> | ## <tt>'''# migratepv <old_hdisk#> <new_hdisk#>'''</tt> | ||
# Remove the old physical volume from the volume group. | # Remove the old physical volume from the volume group. | ||
## <tt>'''# reducevg | ## <tt>'''# reducevg rootvg <old_hdisk#>'''</tt> | ||
# [[LVM Remove a Physical Volume|Remove the old physical volume from the system.]] | # [[LVM Remove a Physical Volume|Remove the old physical volume from the system.]] | ||
=== Replacing a Mirrored rootvg Physical Volume === | |||
# Break the mirror. | |||
## <tt>'''# unmirrorvg rootvg <old_hdisk#>'''</tt> | |||
# Remove the old physical volume from the volume group. | |||
## <tt>'''# reducevg rootvg <old_hdisk#>'''</tt> | |||
# [[LVM Remove a Physical Volume|Remove the old physical volume from the system.]] | |||
# [[LVM Install a New Physical Volume|Install and configure the new physical volume.]] | |||
# Add the new disk to the volume group. | |||
## <tt>'''# extendvg rootvg <new_hdisk#>'''</tt> | |||
# Mirror the volume group. | |||
## <tt>'''# mirrorvg -S -c2 rootvg <new_hdisk#>'''</tt> | |||
# Verify the stale PPs in the volume group are 0. | |||
## <tt>'''# lsvg rootvg | grep STALE'''</tt> | |||
# Add the ipldevice to all of the rootvg physical volumes. | |||
## <tt>'''# bosboot -ad <new_hdisk#>'''</tt> | |||
## <tt>'''# bosboot -ad <current_hdisk#>'''</tt> (this step will have to be repeated for each hdisk containing the ipldevice associated with rootvg. | |||
# Modify the bootlist to include ALL physical volumes | |||
## <tt>'''# bootlist -m normal <new_hdisk# current_hdisk#...>'''</tt> | |||
== non-rootvg == | == non-rootvg == |
Revision as of 17:26, 4 January 2012
rootvg
Replacing a working rootvg Physical Volume
- Install and configure the new physical volume.
- Add the new disk to the volume group.
- # extendvg rootvg <new_hdisk#>
- Does the disk contain hd5 (boot partition)?
- # lslv -m hd5
- No? skip to next step, yes? continue.
- # migratepv -l hd5 <old_hdisk#> <new_hdisk#>
- # bosboot -ad <new_hdisk#>
- # chpv -c <old_hdisk#>
- # bootlist -m normal <new_hdisk#>
- Migrate data from old physical volume to new physical volume.
- # migratepv <old_hdisk#> <new_hdisk#>
- Remove the old physical volume from the volume group.
- # reducevg rootvg <old_hdisk#>
- Remove the old physical volume from the system.
Replacing a Mirrored rootvg Physical Volume
- Break the mirror.
- # unmirrorvg rootvg <old_hdisk#>
- Remove the old physical volume from the volume group.
- # reducevg rootvg <old_hdisk#>
- Remove the old physical volume from the system.
- Install and configure the new physical volume.
- Add the new disk to the volume group.
- # extendvg rootvg <new_hdisk#>
- Mirror the volume group.
- # mirrorvg -S -c2 rootvg <new_hdisk#>
- Verify the stale PPs in the volume group are 0.
- # lsvg rootvg | grep STALE
- Add the ipldevice to all of the rootvg physical volumes.
- # bosboot -ad <new_hdisk#>
- # bosboot -ad <current_hdisk#> (this step will have to be repeated for each hdisk containing the ipldevice associated with rootvg.
- Modify the bootlist to include ALL physical volumes
- # bootlist -m normal <new_hdisk# current_hdisk#...>
non-rootvg
Replacing a working non-rootvg Physical Volume
- Install and configure the new physical volume.
- Add the new physical volume to the volume group.
- # extendvg <vg_name> <new_hdisk#>
- Migrate the logical volumes to the new physical volume.
- # migratepv <old_hdisk#> <new_hdisk#>
- Remove the old physical volume from the volume group.
- # reducevg <vg_name> <old_hdisk#>
- Remove the old physical volume from the system.
Replacing a mirrored non-rootvg Physical Volume
- Break the mirror.
- # unmirrorvg <vg_name> <old_hdisk#>
- Remove the disk from the volume group.
- # reducevg <vg_name> <old_hdisk#>
- Remove the old physical volume from the system.
- Install and configure the new physical volume.
- Add the new disk to the volume group.
- # extendvg <vg_name> <new_hdisk#>
- Mirror the volume group (syn in background, ensuring a copy on each disk).
- # mirrorvg -S -c2 <vg_name> <new_hdisk#>
- Synchronize the volume group.
- # syncvg -v <vg_name>