LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-29-2003, 01:22 PM   #1
cpeppler
LQ Newbie
 
Registered: Sep 2003
Location: S. Hamilton, MA USA
Distribution: RH 6.2, 8.0
Posts: 29

Rep: Reputation: 15
Can't write to /var/run/console


I have a really weird problem.

This morning, I couldn't use startx from a regular user account.

I received the error

"PAM authentication failed, cannot start X server.
Perhaps you do not have console ownership?"

I searched for the error message on google, and came up with a variety of possible causes, varying by Linux version
(I am running RH Linux 8.0).

I found a bad problem, in that I could not write to the /var/run/console directory (even as root). It said I had run out of disk space. I did a df, and it said I had plenty of space. I started thinking comething wasn't right, so I
did a:
shutdown -rF
in order to force an fsck on reboot.

Sure enough, the /var device had a serious problem, and it asked me to do a manual fsck on it. I did so, it found a massive size problem with an inode, and asked if I wanted to truncate it, which I did. It then ran an inode check, and came up with about 80K+ unattached inodes, which it connected to the /lost+found directory. Each inode had a ref count of 2, which should be 1, and fixed each one.

I finally got a healthy fsck on the /var directory, and everything rebooted cleanly. The lost+found directory seemed rather large (16384 blocks), but otherwise everything looked good.

Now, I tried again from the beginning, and got the same problem. Could not startx, same error message, everything.

I went into /var/run/console, and tried to do
echo "hello" > base, and it had the same error:

-bash: base: No space left on device

df indicates plenty of space available on /var. I tried a little later, and it worked! (what's going on here?!?!?)

Then I tried again later, and got the same error message!
-bash: base: No space left on device.

I have been pulling my hair out, and could really use some help.

What's happening.....help!
 
Old 10-02-2003, 10:37 PM   #2
clacour
Member
 
Registered: Sep 2003
Location: Dallas, Tx, USA
Distribution: Red Hat, Gentoo, Libranet
Posts: 98

Rep: Reputation: 16
No guarantees I'll be able to come up with a fix for this, but I'll chip in my 2 cents worth.

The first thought that pops to mind is inodes. Use "df -i" to see what kind of shape you're in there.

Second thought is a bad program corrupting the filesystem. Run up2date and get all your packages up to their latest and greatest.

Third thought is that there are some ext2/3 tools for working with the filesystem, and playing with some of those might at least get you more info. (I'm assuming it's either ext2 or ext3.)

At work, our main flavor of Unix is IBM's AIX. We occasionally get messages saying "Filesystem xyz cannot allocate space. Please compact filesystem." If something is chopping your space up into little bits, it might not be able allocate a file even though there's lots of space available total.

Whether ext2/3 is vulnerable to that problem is a question for a medium deep ext2 wizard, and I'm not one; but the idea is why I suggested the ext2 tuning and cleanup tools.

Fourth thought is to look at processes, and see if you can figure out any pattern between what's running and the problem.

I could go on for a quite a while throwing out things at random, but I think I'll wait and hear what came of what I've said so far.

Good luck,

CHL
 
Old 10-03-2003, 07:28 AM   #3
cpeppler
LQ Newbie
 
Registered: Sep 2003
Location: S. Hamilton, MA USA
Distribution: RH 6.2, 8.0
Posts: 29

Original Poster
Rep: Reputation: 15
Thanks for the reply...I've made some progress.

Quote:
Originally posted by clacour
No guarantees I'll be able to come up with a fix for this, but I'll chip in my 2 cents worth.

The first thought that pops to mind is inodes. Use "df -i" to see what kind of shape you're in there.

Second thought is a bad program corrupting the filesystem. Run up2date and get all your packages up to their latest and greatest.

Third thought is that there are some ext2/3 tools for working with the filesystem, and playing with some of those might at least get you more info. (I'm assuming it's either ext2 or ext3.)

At work, our main flavor of Unix is IBM's AIX. We occasionally get messages saying "Filesystem xyz cannot allocate space. Please compact filesystem." If something is chopping your space up into little bits, it might not be able allocate a file even though there's lots of space available total.

Whether ext2/3 is vulnerable to that problem is a question for a medium deep ext2 wizard, and I'm not one; but the idea is why I suggested the ext2 tuning and cleanup tools.

Fourth thought is to look at processes, and see if you can figure out any pattern between what's running and the problem.

I could go on for a quite a while throwing out things at random, but I think I'll wait and hear what came of what I've said so far.

Good luck,

CHL
I've made some progress. It turns out I had some badblocks, now I'm trying to figure out how to get the filesystem to map around them. Here are some additional details (I switched over to the hardware forum, since I think the source of the problem is badblocks on the disk).
Here's a link:
http://www.linuxquestions.org/questi...oto=nextoldest
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How does minicom write to /var/lock Wim Sturkenboom Linux - General 2 10-26-2005 03:28 AM
How to Run Win32 Console App in linux Console Lokie Linux - Software 2 08-12-2004 10:00 PM
rm cannot remove /var/run/atd.pid and /var/run/xdm.pid danishmr Linux - Software 1 05-04-2004 08:01 AM
cannot read/write to /var/www eddi Linux - Newbie 1 02-04-2004 03:08 PM
cannot write PID to var/run/news cruella Linux - Newbie 1 01-22-2002 06:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration