Convert non raid running system to software Raid 1

Issues related to applications and software problems and general support
Post Reply
dgnzcn
Posts: 15
Joined: 2017/01/05 08:36:44

Convert non raid running system to software Raid 1

Post by dgnzcn » 2020/06/08 12:12:18

Hello
How to convert running system non raid to software Raid 1 on standart partition not uefi system?
Any guide please?

i have two disk
/dev/sda -- 25gb running centos 8
/dev/sda1 - ext4 /boot
/dev/sda2 swap
/dev/sda3 - xfs /

/dev/sdb -- 25gb empty disk

let start raid1 operation...

sfdisk -d /dev/sda | sfdisk /dev/sdb
fdisk /dev/sdb

t - (1 - 2 - 3 ) - fd - then w to write it.

mdadm --create /dev/md0 --level=1 --raid-devices=2 missing /dev/sdb1
mdadm --create /dev/md1 --level=1 --raid-devices=2 missing /dev/sdb2
mdadm --create /dev/md2 --level=1 --raid-devices=2 missing /dev/sdb3


mkfs.ext4 /dev/md0
mkswap /dev/md1
mkfs.xfs /dev/md2


i have warning in here:
mount /dev/md0 /mnt/boot/
mount: /mnt/boot/: mount point does not exist.
mkdir /mnt/boot/

mount /mnt/boot/
mount /dev/md1 /mnt/


rsync -auxHAXSv --exclude=/dev/* --exclude=/proc/* --exclude=/sys/* --exclude=/tmp/* --exclude=/mnt/* /* /mnt

mount --bind /proc /mnt/proc
mount --bind /dev /mnt/dev
mount --bind /sys /mnt/sys
mount --bind /run /mnt/run

chroot /mnt/
blkid /dev/md*

vim /etc/fstab
i replaced new uuid"s

mdadm --detail --scan > /etc/mdadm.conf
cp /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bck
dracut --mdadmconf --fstab --add="mdraid" --filesystems "xfs ext4 ext3" --add-drivers="raid1" --force /boot/initramfs-$(uname -r).img $(uname -r) -M

vim /etc/default/grub
GRUB_CMDLINE_LINUX="crashkernel=auto rd.auto rd.auto=1 rhgb quiet"
GRUB_PRELOAD_MODULES="mdraid1x"


in this point i am having warning messages is that normal, why i am getting warns?
grub2-mkconfig -o /boot/grub2/grub.cfg
Screenshot from 2020-06-08 16-03-03.png
Screenshot from 2020-06-08 16-03-03.png (20.67 KiB) Viewed 273 times

dgnzcn
Posts: 15
Joined: 2017/01/05 08:36:44

Re: Convert non raid running system to software Raid 1

Post by dgnzcn » 2020/06/09 08:58:50

Nobody knows?

Post Reply

Return to “CentOS 8 - General Support”