This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux:linux_move_bootdisk [2023/03/14 00:58] manu |
linux:linux_move_bootdisk [2025/09/19 20:08] (current) manu |
||
---|---|---|---|
Line 11: | Line 11: | ||
https://access.redhat.com/solutions/68503 | https://access.redhat.com/solutions/68503 | ||
- | ====== Move OS disk to a new (rootvg) ====== | + | ===== Move OS disk to a new (rootvg) ===== |
== Clean yum cache == | == Clean yum cache == | ||
Line 338: | Line 338: | ||
</cli> | </cli> | ||
- | === On x86, if using EFI === | + | ==== On x86, if using EFI ==== |
Copy the efi boot manager, the label must be different to previous one | Copy the efi boot manager, the label must be different to previous one | ||
Line 344: | Line 344: | ||
# efibootmgr -c --disk /dev/sdc --part 1 -L "Red Hat Enterprise Linux 7.3" | # efibootmgr -c --disk /dev/sdc --part 1 -L "Red Hat Enterprise Linux 7.3" | ||
</cli> | </cli> | ||
+ | |||
+ | ===== Method 2: Suse with BTRFS and LVM ===== | ||
+ | |||
+ | <code> | ||
+ | sfdisk -l /dev/sda > svc_bootdisk.out | ||
+ | HD=sdxxx # new disk | ||
+ | sfdisk $HD < svc_bootdisk.out | ||
+ | blockdev --rereadpt $HD | ||
+ | |||
+ | PV=/dev/dm-xxxx | ||
+ | pvscan | ||
+ | pvcreate $PV | ||
+ | pvscan | ||
+ | |||
+ | vgs | ||
+ | vgextend system $PV | ||
+ | pvs | ||
+ | pvmove --atomic /dev/dm-old /dev/dm-new | ||
+ | |||
+ | # lvs -a -o +devices view | ||
+ | vgreduce system /dev/dm-old | ||
+ | pvremove /dev/dm-old | ||
+ | |||
+ | grub2-install /dev/disk/by-id/dm-new-part1 | ||
+ | grub2-mkconfig -o /boot/grub2/grub.cfg | ||
+ | systemctl daemon-reload | ||
+ | mkinitrd | ||
+ | bootlist -m normal sdan sdal sdaq sdai | ||
+ | bootlist -m normal -r | ||
+ | </code> |