I tried to update a server over SSH, but when I ran
yum check-update I got an error:
[error 5] Input/output error
I think this means the RPM libraries may be damaged or corrupt, but I'm not sure how to resolve this.
As the comments mentioned its probably that there is something wrong with your disk. My first thought would be to check disk space. Double check file system too (btrfs snaps for example).
Then going into File permissions (chmod etc), and actual disk failures. Try to write or touch files in other directories/partitions
touch ~/yayfile.txt touch /yayfile.txt
I ran into this same issue across a number of VMs. The fix that worked for me was to clean up yum tmp files.
yum clean all