/home partition faild mount

Hi dears
I tried change my /home username so I switch to tty0 and change the username by usermod command but because some pid is active , can’t modify user. So I kill those proccess with kill command. After this i reboot mu machine. Now for booting my machine, /home partition (XFS type) failed mount. So try fix that with

$ sudo xfs_repair /dev/sda5
print_req_error: IO error dev sda sector 1070323416
xfs_repair : Read failed input/output error
the log head and/or tail cannot discovered

Then:

$sudo xfs_repair -L /dev/sda5
print_req_error: IO error dev sda sector 1070323416
xfs_repair: Read failed: Input/output error
zero_log cannot find log head_tail (xlog_find_tail=-5)

How iresolve this to boot correctly my machine without lost any data from corrupted partition?

mutsuhito,

It appears that in the past few days you have not received a response to your
posting. That concerns us, and has triggered this automated reply.

These forums are peer-to-peer, best effort, volunteer run and that if your issue
is urgent or not getting a response, you might try one of the following options:

Be sure to read the forum FAQ about what to expect in the way of responses:
http://forums.suse.com/faq.php

If this is a reply to a duplicate posting or otherwise posted in error, please
ignore and accept our apologies and rest assured we will issue a stern reprimand
to our posting bot…

Good luck!

Your SUSE Forums Team
http://forums.suse.com

Hi,

[QUOTE]I tried change my /home username so I switch to tty0 and change the username by usermod command but because some pid is active , can’t modify user. So I kill those proccess with kill command. After this i reboot mu machine. Now for booting my machine, /home partition (XFS type) failed mount. So try fix that with
[/QUOTE]

that was obviously a bad idea to simply kill that process. What kind of process was it? What exact command did you run to change the username?
You probably didn’t log out of your session when switching to tty0, did you? I would assume that you corrupted the ownerships when changing the user with a mounted home directory (which is a very bad idea, but I guess you just learned that :wink: ). I hope you have a backup of your data.

I’m not too familiar with XFS, unfortunately. Does the system boot when you comment the home partition in /etc/fstab? Did you run xfs_repair from that stage? Have you tried to boot from iso into rescue mode and then try the repair command?
If you have enough space (or an external drive) you could try to copy the data from /dev/sda5 to another partition/drive with dd and see if you can mount that partition/drive or repair it. If that works you could copy the data back to its original place. Of course there is a chance you could copy corrupted data back to the partition. It’s really tricky, maybe someone else has other suggestions.

Hi mutsuhito,

may I assume that you have checked that /dev/sda5 is truly the device for your “home” file system and that it’s an XFS file system? You might want to double-check by looking into /etc/fstab.

Like eblock already asked - do you recall what process it was that you needed to kill in order to change your username? Assuming that you called “usermod -l newusername oldusername”, it’d be interesting to know what process might be interfering with that operation.

Also, did you shut down your machine properly for the reboot? Or was is a simple power cycle?

Just for the records - if it was all about the directory name, you might have simply changed that using “usermod -m -d /home/newdirname username”

Regards,
J

Please read carefully # man xfs_repair:

[QUOTE]If the filesystem has not been unmounted cleanly, mount it and unmount it cleanly before running xfs_repair[/QUOTE] or
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/storage_administration_guide/xfsrepair

[CODE]# umount /dev/sda5

mount /dev/sda5

umount /dev/sda5

dmesg |grep -i xfs

=> [ ] XFS (sda5): Mounting V5 Filesystem
=> [ ] XFS (sda5): Ending clean mount

xfs_repair /dev/sda5[/CODE]

Probably hardware issue:

Use the more robust XFS v5 (mkfs.xfs parameter “-m crc=1”):
https://www.suse.com/documentation/sles-12/singlehtml/stor_admin/stor_admin.html#sec.filesystems.major.xfs