Today I Faced Problem In My Company, My Linux RHEL5 Server was running suddenly power gone, UPS didn't worked properly, Server got crashed, When I was trying to start it was coming one screen and structuring on the same place, It was asking to give Root Password, When I given it was showing like System Repair.
I had tried with fsck -r & e2fsck -r /home command for checking and recovering/repairing corrupted files (e2fsck -r /home will warn you to fix it corrupted file, we can recover superblock files also). but it was showing error in /home drive, then later i reminded that i had mounted one directory in /home. checked error was getting in /home only with where i had mounted the one directory. When System got crashed that time /home directory had got unmounted and directory size was showing with 0 size, it was showing like total files 0. fsck & e2fsck commands also not recovered corrupted/superblock files.
Later thought to edit /etc/fstab file because system was getting problem with mounted directory in /home/xxx, I entered in single user mode by giving init 1 run level, but here i could not edit file, i was entering in file by vi editor but couldn't saved it, it was getting error read only permission, then i had done remounting /etc directory for getting permission to edit and save /etc/fstab file.
#mount -o remount,rw /etc
Now i can edit /etc/fstab file in single user mode, deleted mounted /home/xxx directory line from fstab file and restarted (init 6), Finally Server got up and started working fine....
Thanks & Regards,
Sandeep CC
I had tried with fsck -r & e2fsck -r /home command for checking and recovering/repairing corrupted files (e2fsck -r /home will warn you to fix it corrupted file, we can recover superblock files also). but it was showing error in /home drive, then later i reminded that i had mounted one directory in /home. checked error was getting in /home only with where i had mounted the one directory. When System got crashed that time /home directory had got unmounted and directory size was showing with 0 size, it was showing like total files 0. fsck & e2fsck commands also not recovered corrupted/superblock files.
Later thought to edit /etc/fstab file because system was getting problem with mounted directory in /home/xxx, I entered in single user mode by giving init 1 run level, but here i could not edit file, i was entering in file by vi editor but couldn't saved it, it was getting error read only permission, then i had done remounting /etc directory for getting permission to edit and save /etc/fstab file.
#mount -o remount,rw /etc
Now i can edit /etc/fstab file in single user mode, deleted mounted /home/xxx directory line from fstab file and restarted (init 6), Finally Server got up and started working fine....
Thanks & Regards,
Sandeep CC
thaks sadeep its heplfull ....
ReplyDeleteok thanks...
Delete