Hello Everyone,
Running Rocky 9.1 and I’m struggling for some time now to move my default server install residing on one disk to md that has a separate /boot xfs partition and lvm (want to have them on different md devices). I also installed a new instance that would have the same setup made by the installer, and I’m also struggling to duplicate that, but it can give me ideas what I’m missing.
Both md-s running on the same disk running in raid1 having the second disk as missing deliberately.
The setup: old disk: sda (part1 is /boot on xfs), (part2 is lvm pv - this is already removed)
new disk sdb: part1 is md100 running /boot , part2 is md101 having the new lvm pv
What I managed to achieve is LVM is running from md101 now, but I could not remove the old initial disk (sda) that has the grub installation as md100 which should store /boot and grub is not able to boot up (only the grub console shows up). Also after a boot from the old disk I can see that the system brought back some of the old lvm data and it’s trying to access the vg from sda. It’s also strange that after each boot the system rewrites /etc/default/grub removing my md.uuid records from GRUB_CMDLINE_LINUX…
I can clean this up, but this does not seem right…
[root@rlraid ~]# pvs
Devices file md_uuid 61e1e339-bdfa-04ac-a662-704b2989583e PVID o4BCwcgpJZH4asNJ6vwRWHPK3aq3vpvi last seen on /dev/md101 not found.
WARNING: Device mismatch detected for rl/swap which is accessing /dev/sda2 instead of /dev/md101.
WARNING: Device mismatch detected for rl/root which is accessing /dev/sda2 instead of /dev/md101.
PV VG Fmt Attr PSize PFree
/dev/md101 rl lvm2 a-- <10.99g 1.99g
[root@rlraid ~]# vgs
Devices file md_uuid 61e1e339-bdfa-04ac-a662-704b2989583e PVID o4BCwcgpJZH4asNJ6vwRWHPK3aq3vpvi last seen on /dev/md101 not found.
WARNING: Device mismatch detected for rl/swap which is accessing /dev/sda2 instead of /dev/md101.
WARNING: Device mismatch detected for rl/root which is accessing /dev/sda2 instead of /dev/md101.
VG #PV #LV #SN Attr VSize VFree
rl 1 2 0 wz–n- <10.99g 1.99g
[root@rlraid ~]# lvs
Devices file md_uuid 61e1e339-bdfa-04ac-a662-704b2989583e PVID o4BCwcgpJZH4asNJ6vwRWHPK3aq3vpvi last seen on /dev/md101 not found.
WARNING: Device mismatch detected for rl/swap which is accessing /dev/sda2 instead of /dev/md101.
WARNING: Device mismatch detected for rl/root which is accessing /dev/sda2 instead of /dev/md101.
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root rl -wi-ao---- <8.00g
swap rl -wi-ao---- 1.00g
[root@rlraid ~]#
The installers version also uses md metadata version 1.2 which was surprising to me but because of that I went with it:
[root@rlraid ~]# mdadm --detail --scan
ARRAY /dev/md/101 metadata=1.2 name=rlraid:101 UUID=f9875f07:0b2fe67c:7b0ddb3a:25593c63
ARRAY /dev/md/100 metadata=1.2 name=rlraid:100 UUID=ee5af7be:3461e2b2:bcf23085:cf3ab9d0
[root@rlraid ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 10G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 9G 0 part
├─rl-root 253:0 0 8G 0 lvm /
└─rl-swap 253:1 0 1G 0 lvm [SWAP]
sdb 8:16 0 12G 0 disk
├─sdb1 8:17 0 1G 0 part
│ └─md100 9:100 0 1022M 0 raid1
└─sdb2 8:18 0 11G 0 part
└─md101 9:101 0 11G 0 raid1
Before the reboot grub2-mkconfig also throws a bunch of probe errors, which I came to find out probably related to GRUB_DEVICE_PARTUUID having no output and being ‘null’:
BEGIN /etc/grub.d/10_linux
/usr/sbin/grub2-probe: warning: Couldn’t find physical volume
(null)'. Some modules may be missing from core image.. /usr/sbin/grub2-probe: warning: Couldn't find physical volume
(null)‘. Some modules may be missing from core image…
/usr/sbin/grub2-probe: warning: Couldn’t find physical volume (null)'. Some modules may be missing from core image.. insmod part_msdos /usr/sbin/grub2-probe: warning: Couldn't find physical volume
(null)’. Some modules may be missing from core image…
Should I just move over the contains of /etc/grub.d and modify the devices and try that? That’s the first idea I have in mind…