Use a bind mount of /
to make the original /usr
(which should probably be empty there if /usr
was mounted over it before /usr
was ever populated) available and copy the mounted /usr
over it.
# mkdir /root/underlyingroot
# mount --bind --make-private / /root/underlyingroot
# cp -ax /usr /root/underlyingroot
# umount /root/underlyingroot
--make-private
is to cancel the case where /
is mounted with the shared
option, which it is when running systemd
. Else anything mounted (eg: automount of an inserted device etc.) between the mount
and umount
above will be reflected inside /root/underlyingroot
and prevent the simple umount /root/underlyingroot
working after.
Now that the copy is done at the final place you can edit /etc/fstab
and remove the /usr
mountpoint.
If nothing at all running is using /usr
you might be able to also umount
immediately /usr
and be done. But nowadays it's hard to have things running not using /usr
at all if not in single user or rescue mode and today not even even always (eg newer CentOS), so a reboot is probably needed anyway. You can also consider umount --lazy /usr
which would allow to immediately get rid of /usr
and have any new updates to /usr
done on the internal storage instead of external, but external would still be required until next reboot.