Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I accidentally ran fsck -A on Redhat 6 machine and and now unable to run any command shows below error msgs. It would be great if any one would suggest how to resolve this issue and proceed further..
@server var]# df -i
-bash: /bin/df: Input/output error
[root@server var]#
----
[root@server ~]# cd /
[root@server /]# ls
[root@server /]# cd var
[root@server var]# ls
account cache crash cvs db empty ftp games gdm lib local lock log lost+found mail named nis opt preserve run spool tmp www yp
[root@server var]#
I can able to enter all directories under / but unable to find through ls under /..
---------- Post added 07-28-15 at 04:22 AM ----------
[root@server ~]# fsck -A
fsck from util-linux-ng 2.17.2
e2fsck 1.41.12 (17-May-2010)
/dev/sda2 is mounted.
WARNING!!! The filesystem is mounted. If you continue you ***WILL***
cause ***SEVERE*** filesystem damage.
Do you really want to continue (y/n)? yes
/dev/sda2: recovering journal
fsck.ext4: Bad magic number in super-block while trying to re-open /dev/sda2
e2fsck: io manager magic bad!
[root@server ~]# mount
-bash: /bin/mount: Input/output error
[root@server ~]# cd
[root@server ~]#
[root@server ~]# mount
-bash: /bin/mount: Input/output error
[root@server ~]# fsck
fsck from util-linux-ng 2.17.2
fsck.ext4: Unable to resolve 'UUID=601e2d6f-7a01-4200-b9c9-e26684716173'
[root@server ~]# df -h
-bash: /bin/df: Input/output error
[root@server ~]#
[root@server ~]# fsck -A
fsck from util-linux-ng 2.17.2
e2fsck 1.41.12 (17-May-2010)
/dev/sda2 is mounted.
WARNING!!! The filesystem is mounted. If you continue you ***WILL***
cause ***SEVERE*** filesystem damage.
Do you really want to continue (y/n)? yes
Re-format and either restore from backup or reinstall. As was promised, your filesystem is now severely damaged. Options for recovery are quite limited. If you want to try, you should first save a copy of the entire /dev/sda2 partition to a separate device. Then, you can see whether "fsck.ext4 -f /dev/sda2" is able to recover anything. If there are important files that still aren't recovered, photorec is about the only option.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.