Move OS disk to new disk on RHEL8 LPAR
Customer was moving from V7000 to some other type of SAN-storage,
and needed to move the root disk on some SAN-booting LPARs.
First we mapped up a new disk from new SAN storage, this was mapped
to /dev/mapper/mpathb. (mpatha was old disk).
Copied partition table form old to new:
# sfdisk /dev/mapper/mpatha | sfdisk /dev/mapper/mpathb --no-reread
Verified that partition table looked identical:
# fdisk -l /dev/mapper/mpatha
# fdisk -l /dev/mapper/mpathb
Tagged partiton 1 as PPC PReP partition:
# parted /dev/mapper/mpathb set 1 prep on
Added partition #3 to rhel VG:
# vgextend rhel /dev/mapper/mpathb3
Moved data from mpatha3 to mpathb3:
# pvmove /dev/mappeR/mpatha3
Removed mpatha3 from rhel VG:
# vgreduce rhel /dev/mappeR/mpatha3
Verify that “pvs” don’t show any VG on mpatha3.
Next we copied grub partition:
# mkfs.xfs /dev/mapper/mpathb2
# mount /dev/mapper/mpathb2 /mnt
# cp -a /boot/. /mnt
# umount /mnt
Updated fstab entry for boot disk to have new UUID:
# blkdev |grep mpathb2
# vi /etc/fstab
# systemctl daemon-reload
# umount /boot
# mount /boot
# df ### verify that this is now /dev/mapper/mpathb2
Update grub config to point at new devices:
# grub2-mkconfig -o /boot/grub2/grub.cfg
Install PReP partition:
# grub2-install /dev/mapper/mpathb1
Unmap old disk – reboot – and all came back up as before from new disk.
Issues
Later we noticed that the server didn’t boot. It was stuck in
No OS image was detected by firmware.
At least one disk in the bootlist was not found yet.
Firmware is now retrying the entries in the bootlist.
Press ctrl-C to sto retrying.
No OS image was detected by firmware.
At least one disk in the bootlist was not found yet.
Firmware is now retrying the entries in the bootlist.
Press ctrl-C to sto retrying.
we could then fix this by either editing the bootlist form the SMS menu, or from linux with the bootlist command:
# bootlist -o -m normal
Could not translate /vdisk/vfs-client@3300004/disk@58ccf2610 to logical device name
# bootlist -m normal /dev/sdb /dev/sdc
# bootlist -o -m normal
sdb
sdc