Upgrade to UCS-4.2 blocked due to separate /usr/ file system

ucs-4-2
systemd
usr

#1

UCS-4.2 uses systemd by default, which no longer supports /usr/ being a separate file system. Mounting file systems nowadays requires many helpers, which use libraries and other resources from /usr/ by default. With a separate /usr/ they often break in subtle ways or lead to hard to debug boot problems.

As such the content of /usr/ must be moved to the root file system before the system can be upgraded to UCS-4.2. This procedure should be performed manually and might require resizing the file systems.

####1. Make sure you have a recent backup

####2. Verify that / has enough free space for also containing /usr/:

 df -h / /usr 

If not, use

 lvresize -L +XXG / 

followed by

resize2fs / 

or similar commands to enlarge the root file system size. This works best when you’re already using LVM. Otherwise this might require editing the partition table through fdisk or parted, or moving and renaming other partitions, or doing a full backup and restore.

####3. Make sure you have access to the server console for emergency access and login as “root”.

####4. Switch the system to “single user mode” by issuing

telinit 1

####5. Verify that all daemons are stopped:

ps axf

####6. Move the old file system to /mnt/ by running

 mount --move /usr /mnt 

####7. Move the content over to the root file system:

mv /mnt/* /usr/

####8. Verify that /mnt/ is now empty:

 ls -al /mnt/ 

####9. Unmount the now empty file system:

umount /mnt

####10. Update /etc/fstab and remove the line for /usr, so it no longer gets mounted:

 $EDITOR /etc/fstab

####11. Reboot:

reboot