000-221 · Question #206
An administrator needs to replace a failing hard disk, hdisk0, in a mirrored rootvg. After removing the mirror from hdisk0, the administrator cannot remove hdisk0 from the rootvg due to one logical…
The correct answer is A. migratepv hdisk0 hdisk1. The migratepv command moves all allocated physical partitions from a source disk to a target disk, which clears the remaining logical volume off hdisk0 so it can be removed from the rootvg.
Question
An administrator needs to replace a failing hard disk, hdisk0, in a mirrored rootvg. After removing the mirror from hdisk0, the administrator cannot remove hdisk0 from the rootvg due to one logical volume still remaining on the failing hard disk, as described below. How can this issue be resolved?
Exhibit
Options
- Amigratepv hdisk0 hdisk1
- Bmigrateiv lg_dumplv hdisk1
- Cmkivcopy lg_dumplv hdisk1
- Dmirrorvg -l lg_dumplv hdisk0 hdisk1
How the community answered
(50 responses)- A70% (35)
- B16% (8)
- C10% (5)
- D4% (2)
Why each option
The migratepv command moves all allocated physical partitions from a source disk to a target disk, which clears the remaining logical volume off hdisk0 so it can be removed from the rootvg.
The migratepv hdisk0 hdisk1 command relocates every allocated physical partition from hdisk0 to available free partitions on hdisk1, including those belonging to lg_dumplv. Once all partitions are moved off hdisk0, the disk has no remaining allocations and can be cleanly removed from the volume group using reducevg. This is the standard AIX procedure for draining a failing disk before replacement.
migrateiv is not a valid AIX command; no such utility exists for migrating individual logical volume data between physical volumes.
mkivcopy is not a valid AIX command for relocating logical volume partitions off a physical disk.
mirrorvg -l lg_dumplv hdisk0 hdisk1 would attempt to add a mirror copy within the volume group scope, but it does not remove existing partitions from hdisk0 and does not satisfy the requirement to fully vacate the failing disk.
Concept tested: Migrating physical partitions from a failing disk using migratepv
Source: https://www.ibm.com/docs/en/aix/7.3?topic=m-migratepv-command
Topics
Community Discussion
5The correct answer is A, migratepv hdisk0 hdisk1. That command moves all logical volume data from one physical volume to another within the same volume group, so it handles that stubborn lg_dumplv (almost certainly the dump logical volume) that the unmirror step left behind on hdisk0, clearing the way to remove the disk entirely. The other options are either misspelled commands (migrateiv, mkivcopy are not real AIX commands) or mirrorvg with the -l flag, which just mirrors a specific LV rather than moving it off the failing disk. Curious whether anyone in the group has run into the dump LV specifically being the holdout in this scenario, because that seems to come up a lot on physical disk replacements.
I actually looked at B first since lg_dumplv is right there in the scenario and migrateiv sounds like it moves a logical volume, but that command does not exist in AIX. migratepv hdisk0 hdisk1 is the right call because it moves all physical partitions off hdisk0 to hdisk1 at the physical volume level, handling that leftover logical volume without you needing to touch it directly.
That makes sense because migratepv moves all the physical partitions from one disk to another without you having to touch individual logical volumes, so even a stubborn lv like the dump one gets relocated automatically. But I am curious, would this command work the same way if hdisk0 had multiple logical volumes left on it, or does it only handle the one that is blocking the reducevg?
migratepv moves all LPs from every LV on the source disk in one pass, so yes, it handles multiple leftover LVs at once, which is exactly why it is the cleaner choice over lvmove when you have more than one blocking LV.
migratepv hdisk0 hdisk1 is the right call here. That command moves all physical partitions still allocated on hdisk0 over to hdisk1, including stubborn logical volumes like a dump lv that reducevg refuses to leave behind.
