I configured DRBD on default CentOS 7.3 Installation like following:

/dev/centos/home was taking all the space in sda2 so reduced it and created /dev/centos/home (20% space) and /dev/centos/drbd (remaining space using lvcreate -l 100%VG -n drbd centos)

DRBD resource device is /dev/drbd0 and disk is /dev/mapper/centos-drbd formatted as ext4.

Now everytime I reboot the system I get the errors:

Warning: /dev/centos/root does not exist
Warning: /dev/centos/swap does not exist
Warning: /dev/mapper/centos-root does not exist

From dracut shell I run :

$ lvm vgscan
$ lvm vgchange -ay 
$ exit

and system boots fine. But It fails again at reboot.

Any solution?

UPDATE: Found the cause, drbd device was causing the issue. I removed it from both servers and it fixed the 2nd server but not the 1st one. blkid still shows wrong UUID and Type of /dev/sda2

$ blkid

/dev/sda1: UUID="bdfa3672-b24b-41ec-88f8-d0f0a81057d1" TYPE="xfs"
/dev/sda2: UUID="d8d241f07976f3ce" TYPE="drbd"
/dev/mapper/centos-swap: UUID="3c8653bb-060a-4e46-8eaa-ce51637752ee" TYPE="swap"
/dev/mapper/centos-root: UUID="93941d8b-22e0-4ad7-8666-1ce8ba8d1109" TYPE="xfs"
/dev/mapper/centos-home: UUID="63c9a5ad-9b4b-4852-8e95-22b356d8729a" TYPE="xfs"

The reason why you’re seeing this is due of initramfs kernel image being build for the specific system it's running on, so migrating to a new hardware will cause it to fail to boot.

Rebuilding initramfs in emergency mode(or go to the Rescue Mode ):


1) List the initramfs images you have:

ls -ltrh /boot/initramfs-*

2) Locate the kernel version you’re using and create a backup of it:

cp -iv /boot/initramfs-3.10.0-1062.el7.x86_64.img /boot/initramfs-3.10.0-1062.el7.x86_64.img.back

3) Rebuild the kernel image for that specific kernel

dracut -f

4) Select the new kernel image

ls -ltrh /boot/initramfs-*

5) Specify the new kernel version (For Example):

dracut -f /boot/initramfs-3.10.0-1062.el7.x86_64.img 3.10.0-1062.el7.x86_64

6) Go to the Grub config

vim /boot/grub2/grub

7) Delete the old menuentry and make sure that the new menuentry is top of all

8) Generate a GRUB configuration file


9) Reboot

10) Done.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.