Get the App
SLTechnology News&Howtos  ›  Servers  › 

Replace the mirror hard drive

Shulou Source: shulou.com Published: 2022-06-02 06:24:44 10月04日 Update

Mirror mirrored disk replacement

General steps: remove the image of mirror-- and delete the broken hard disk-add a new hard disk to rootvg-- to do mirror mirror synchronization (usually synchronize yourself)

First, check the point of failure

# lsvg-p rootvg

Rootvg:

PV_NAMEPV STATETOTAL PPSFREE PPSFREE DISTRIBUTION

Hdisk1active546

Hdisk0missing546

Hdisk2active546

-- hdisk0 disk malfunctioned

2. Remove the mirror image

Unmirrorvg rootvg hdisk0

If lg_dumplv is on hdisk0, you need to move it to hdisk1

Dump device description:

If the system has a proprietary dump device, you need to create a new dump device on the left hard disk and reassign the basic dump device to a logical volume that leaves the hard disk. For example, after completing the "unmirrorvg" command, you will see:

# lspv-l hdisk0

Dumplv

Now you can move "dumplv" from hdisk0 to hdisk1 with the "migratepv" command:

# migratepv-l dumplv hdisk0 hdisk1

Or migratepv-l lg_dumplv hdisk0 hdisk1.

4. Clean up the boot information on hdisk0

# chpv-c hdisk0

3 check the boot sequence and modify it to hdisk1 boot

# bootlist-m normal-o

Hdisk0

Hdisk1 blv=hd5

# bosboot-ad hdisk1

# bootlist-m normal hdisk1

# bootlist-m normal-o

Hdisk1 blv=hd5// confirms that the system can boot from hdisk1

Remove hdisk0 from rootvg

Reducevg rootvg hdisk0

VI. Delete hdisk0

Rmdev-Rd1 hdisk0

7. Check whether lspv still exists in hdisk0

Lscfg-vl hdisk0

# lsdev-Cc disk// confirms that hdisk0 has been deleted

Delete a bad hard drive

# diag

# Task Selection

# Hot Plug Task

# SCSI and SCSI RAID Hot Plug Manager

# replace/remove a device attached to an SCSI Hot Swap

# hdisk0

Usually hdisk0 will light up and replace the hard disk.

9. After installing the new hard drive

# cfgmgr-v scan hard disk

Lspv View

# lspv

Hdisk1 00c58faf7b68fccc None

Hdisk0 00c58faf8b32fef3 rootvg active

If there is no PVID, execute chdev-l hdisk1 pv=yes or chdev-l hdisk0-a pv=yes

# lspv

Hdisk0 000f377fc4df58cb rootvg active

Hdisk1 000f377f19224090 rootvg active

Hdisk2 none None

10. Make an image

Add hdisk0 to rootvg

# extendvg rootvg hdisk0

Make a rootvg image

# mirrorvg-S rootvg hdisk0

# View rootvg

Lsvg-l rootvg

# add startup information boot image to the newly added disk hdisk0

Bosboot-ad / dev/hdisk0

# modify the startup sequence

Bootlist-m normal hdisk0 hdisk1

# View

Bootlist-m normal-o

Lspv-l checks whether the disk is automatically synchronized. If not, execute syncvg-v rootvg.

Tags: Hard drives mirrors devices synchronization information commands failures disks systems sequence president steps logic production check move Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Xiaomi OPPO Reno Shulou Information NVidia