OVH servers can require additional configurations after converting to CloudLinux 7 and CloudLinux 8. Also, use this KB article if you are getting the following warning with cldeploy:
Invalid /etc/mdadm.conf file detected
Complete this checklist to successfully run CloudLinux 7 and CloudLinux 8 kernel.
1. Check for proper UUIDs and correct mdadm.conf file formatting:
Take UUIDs for RAID devices with mdadm utility:
# mdadm --detail --scan
ARRAY /dev/md2 metadata=0.90 UUID=70160d35:1398d208:a4d2adc2:26fd5302 ARRAY /dev/md3 metadata=0.90 UUID=5ccb84a1:516cc4d3:a4d2adc2:26fd5302 ARRAY /dev/md5 metadata=0.90 UUID=ae269fab:c345c72d:a4d2adc2:26fd5302
Modify /etc/mdadm.conf
file to make it look like in the example below. Note that AUTO
command is required.
# vi /etc/mdadm.conf
MAILADDR root AUTO +imsm +1.x -all ARRAY /dev/md2 level=raid1 num-devices=2 UUID=70160d35:1398d208:a4d2adc2:26fd5302 ARRAY /dev/md3 level=raid1 num-devices=2 UUID=5ccb84a1:516cc4d3:a4d2adc2:26fd5302 ARRAY /dev/md5 level=raid1 num-devices=2 UUID=ae269fab:c345c72d:a4d2adc2:26fd5302
Please note that above is only an example, you need to use ARRAY entries from the output of mdadm --detail --scan
command.
2. Check for the proper command line in grub.cfg file:
Check that rd.auto=1
is present in grub.cfg file:
# grep "rd.auto=1" /boot/grub2/grub.cfg
If no output returned, you have to edit default grub:
# vi /etc/default/grub
And add those options to cmdline:
GRUB_CMDLINE_LINUX="rd.auto=1"
Regenerate grub.cfg:
# grub2-mkconfig -o /boot/grub2/grub.cfg
In some cases, you may want to also add net.ifnames=0
together with rd.auto=1
But make sure that you do that only when needed. CentOS 7/8 and Cloudlinux 7/8 use systemd
's Predictable Network Interface naming scheme. This is described in detail in these guides:
Usenet.ifnames=0
with caution and only if you really need to revert back to the old interface naming scheme.
It is safe to set net.ifnames=0
only under a few specific circumstances:
-
-
If the alternate naming scheme, such as
biosdevname
, is enabled and able to identify the needed interface properties. -
If the system only has a single interface and will never have more than a single interface.
- There are some other cases when you might need this, but they are applicable to KVM machines and custom network interface naming schemes, this guide doesn't cover those cases.
-
3. Check if RAID drivers added:
Make sure raid.conf contains all the required options. In most cases $add_drivers is missing:
# vi /etc/dracut.conf.d/raid.conf
It should look as follows:
add_drivers="$add_drivers raid5 raid1 raid0"
Note that if you use not only raid1
and raid0
setups on this server, you will need to make sure that the corresponding driver is added to this line. For example, if you use raid5
or raid10
, add them as well.
After this, regenerate initramfs file, change kernel version in the example above to the latest one installed on your server:
# dracut -f /boot/initramfs-3.10.0-427.18.2.lve1.4.24.el7.x86_64.img 3.10.0-427.18.2.lve1.4.24.el7.x86_64
or regenerate all initramfs files with
# dracut --regenerate-all -f -v
4. (OPTIONAL) Switch to UUIDs in /etc/fstab:
Take block IDs for md devices:
# blkid | grep md
/dev/md2: LABEL="/boot" UUID="d154fcbd-7802-47a6-8d49-4be2688eee73" TYPE="ext4" /dev/md3: LABEL="/tmp" UUID="ea5e8258-7be3-42ea-984f-3e1fc83f35d1" TYPE="ext4" /dev/md5: LABEL="/" UUID="7936780f-36cc-4c13-a59e-3e599ba847d2" TYPE="ext4"
Open /etc/fstab
and replace md* with UUIDs:
# <file system> <mount point> <type> <options> <dump> <pass> UUID=7936780f-36cc-4c13-a59e-3e599ba847d2 / ext4 errors=remount-ro,usrquota 0 1 UUID=d154fcbd-7802-47a6-8d49-4be2688eee73 /boot ext4 errors=remount-ro 0 1 UUID=ea5e8258-7be3-42ea-984f-3e1fc83f35d1 /tmp ext4 defaults 1 2 proc /proc proc defaults 0 0 sysfs /sys sysfs defaults 0 0 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts defaults 0 0
5. Check if CloudLinux kernel is going to be booted with grub
If needed - choose the CloudLinux kernel. Please follow https://cloudlinux.zendesk.com/hc/en-us/articles/115004534329-How-do-I-choose-which-kernel-to-boot-on-CloudLinux-7- If you experience any issues during server boot with CloudLinux 7 kernel - reboot the server into rescue console and create a ticket at https://cloudlinux.zendesk.com/hc/en-us/requests/new.
Comments
1 comment
This is the network OVH kernel.
Please boot from the disk:
https://docs.ovh.com/asia/en/dedicated/ovh-rescue/
Please sign in to leave a comment.