0

Hello I seem to be having a problem while connecting to a Ubuntu Server while connecting via ssh. When I login, I get this error.

Could not chdir to home directory /home/username: Input/output error

It seems like my home folder is corrupt or something. I cannot ls in the home folder directory, and in my usename directory, I can't cd into this. As root I cannot ls in the home directory as well or in any directory in Home.

I notice as well when I save in vim or quit, it get this error at the bottom of the page

E138: Cannot write viminfo file /home/root/.viminfo!

Any ideas?

EDIT: this is what happens if I type in these commands

mount

proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
/dev/mapper/RAID1-lvvar on /var type xfs (rw)
/dev/mapper/RAID5-lvsrv on /srv type xfs (rw)
/dev/mapper/RAID5-lvhome on /home type xfs (rw)
/dev/mapper/RAID1-lvtmp on /tmp type reiserfs (rw)

dmesg | tail

[1213273.364040] Filesystem "dm-3": xfs_log_force: error 5 returned.
[1213274.084081] Filesystem "dm-4": xfs_log_force: error 5 returned.
[1213309.364038] Filesystem "dm-3": xfs_log_force: error 5 returned.
[1213310.084041] Filesystem "dm-4": xfs_log_force: error 5 returned.
[1213345.364039] Filesystem "dm-3": xfs_log_force: error 5 returned.
[1213346.084042] Filesystem "dm-4": xfs_log_force: error 5 returned.
[1213381.365036] Filesystem "dm-3": xfs_log_force: error 5 returned.
[1213382.084047] Filesystem "dm-4": xfs_log_force: error 5 returned.
[1213417.364039] Filesystem "dm-3": xfs_log_force: error 5 returned.
[1213418.084063] Filesystem "dm-4": xfs_log_force: error 5 returned.

fdisk -l /dev/sda

Cannot open /dev/sda

3 Answers 3

1

It is probably due to home partition filesystem corrupted. Please, show outputs of following commands: mount, dmesg | tail, fdisk -l /dev/sda

0

If this is a problem with your ~ partition then you will need to create a new one, there is a nice howto on how to do this. In your case you may not be able to copy over the existing files but the howto is useful still.

0

Before you clean the partition, you should check /etc/fstab to see how /home is mounted. If it is listed there as a separate partition, then try "mount" to see if it is mounted or "mount -a" to force it to try and mount.

You should do all of this locally and not through ssh, in order to rule out ssh issues.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .