Home / Why does CentOS 6 to 7 upgrade fail if /usr is on separate partition ?

Why does CentOS 6 to 7 upgrade fail if /usr is on separate partition ?

Due to technological restrictions, upgrades are not supported if /usr or child folders are distinct partitions from /. It is a fixed condition that cannot be altered.
The whole contents of the /usr partition can be moved to the /usr directory using rescue mode as a solution.

The contents of /usr can be online relocated to the root filesystem as a workaround.

# mkdir /mnt/usr/
# mkdir /mnt/root
# mount --bind / /mnt/root
# mount --bind /usr /mnt/usr
# rsync -aHAXv /mnt/usr/* /mnt/root/usr/

You can follow the same steps in rescue mode as well.
Remove the /usr line from /etc/fstab, reboot the computer, and preupg should now recognize that /usr isn't a separate partition. Don't just comment out the /usr line; remove it entirely.

The entry in /etc/fstab needs to be deleted entirely. Commenting it out won't make upgrade utility work.

Due to the complexity and the range of use cases depending on the layers influencing the situation, the CentOS In-place Upgrade tool does not support /usr as a distinct partition for the upgrade process (systemd,Filesystem, LVM, Drivers, Block Devices).

In this case, it was decided to have CentOS OS preupgrade-assistant output "FAIL".

Leave a Reply