Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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 have been running a Web server with RH9 for about six months now. Everything has been going fine and I have not made any changes for a while. However, I have just noticed that Webalizer is no longer producing reports properly (they seem garbled) and now I cannot even copy files via FTP or even do a mkdir without getting an error (see below).
I tried to search for this and found people had similar errors but they mostly seemed to be tampering with their partitions and I have not been doing this. One previous entry mentioned the fix being...
Code:
mke2fs -c -b
From what I can tell this will create an ext2/3 filesystem. Will this format or wipe any of my existing data? This is a production Web server and I do not want to have to rebuild everything or lose any data.
I wouldn't make an FS...
Sounds like it could be a superblock/disk corruption in that partition. Can you create a simple file there? Also try running df, du and see if you get expected results.
Check /var/log/messages at the same time as trying the file and dir creates; ie open a separate xterm and run
tail -f /var/log/messages
and watch for any reports.
Is your logrotate working? Check the contents of /var/log dir.
Ultimately (after a full backup), try a machine reboot and see if it does a fsck.
HTH
This guy had the same prob and it was a bad disk block: http://www.webhostingtalk.com/archiv.../190656-1.html
If you check the /var/log/messages and /var/log/dmesg you may find warnings re your disk.
You're going to have to shutdown the apps if possible, and try backing up what you can (if you haven't already), then either try "fsck" from the cmd line (as root), or try "init 6" which should force a reboot.
Maybe trying the backup remotely will work (or not...)
Worst case, shutdown every service you can and pull the plug.... good luck
I tried the fsck command from a remote shell as root. I wasn't sure if it was safe to cause SEVERE filesystem damage or if this command should only be run when the server is starting up. Advice?
Code:
[root@tiger root]# fsck -A -V -a
fsck 1.32 (09-Nov-2002)
Checking all file systems.
[/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a /dev/hda2
/dev/hda2 is mounted.
WARNING!!! Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.
Do you really want to continue (y/n)? no
check aborted.
[/sbin/fsck.ext3 (1) -- /boot] fsck.ext3 -a /dev/hda1
/dev/hda1 is mounted. e2fsck: Cannot continue, aborting.
I did a cat on /var/log/dmesg like you said but did not see anything that struck me as obviously wrong. I noticed one line that mentioned adding swap though...
Code:
EXT3 FS 2.4-0.9.19, 19 August 2002 on ide0(3,2), internal journal
Adding Swap: 1044216k swap-space (priority -1)
kjournald starting. Commit interval 5 seconds
EXT3 FS 2.4-0.9.19, 19 August 2002 on ide0(3,1), internal journal
EXT3-fs: mounted filesystem with ordered data mode.
That other guys problem they didn't mention how they fixed it but he seemed pretty happy at the end. They did mention fsck again so I thought I might as well go ahead and try it. Looks like I have a bad block (possibly more). I am going to try using badblocks command to see if that will repair it.
Code:
[root@tiger root]# fsck -A -V -a
fsck 1.32 (09-Nov-2002)
Checking all file systems.
[/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a /dev/hda2
/dev/hda2 is mounted.
WARNING!!! Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.
Do you really want to continue (y/n)? yes
/: recovering journal
/: Attempt to read block from filesystem resulted in short read while reading block 5443
JBD: Failed to read block at offset 4910
fsck.ext3: Input/output error while recovering ext3 journal of /
Well restarting didn't fix it. But pulling the power plug out completely did. I'm not kidding. There must have been something funky going on with the hard drive but with the power cut completely it has been behaving fine ever since and fsck finds nothing wrong - all clean.
Certainly sounds odd. I'd do a full backup if I was you
Given that moving objects (disks) pull the most power, I suppose it's just possible that the power connection was slightly loose/out of position.
BTW, dmesg is more of a startup log I think. /var/log/messages is the on-going log.
Keep a strict eye on it for a week or so and see what happens...
This is the second time I've had this problem. Anyways, thought I could throw in some good information I picked up on the web, this time around. You can reboot even in this situation remotely (I did it over SSH) by doing a 'hard reboot.'
Forced Reboot
Code:
echo 1 > /proc/sys/kernel/sysrq
echo b > /proc/sysrq-trigger
Forced Shutdown
Code:
echo 1 > /proc/sys/kernel/sysrq
echo o > /proc/sysrq-trigger
/var/log/messages gives Input/output error when tried to open
Hi,
Still last day when i try to open /var/log/messages working fine with SLES10 sp3... after booting with some other server and i took back to native server.Itz bootin fine.. but when i try to open /var/log/messages .. it is giving me :/var/log/messages : Input/output error ..
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.