LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 04-03-2012, 05:43 AM   #1
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Rep: Reputation: Disabled
cannot check for updates using yum in centos,gives unusual error


Hi again,

2day i tried checking for updates using the yum command in one of the name servers where centos is installed and it gave the following error:

Code:
Cannot open logfile /var/log/yum.log
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 309, in user_main
    
  File "/usr/share/yum-cli/yummain.py", line 166, in main
    
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 1150, in doLock
    
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 1203, in _lock
    
OSError: [Errno 30] Read-only file system: '/var/run/yum.pid'
Can anyone please tell me what has happened...i cant see anything in the logs either..

it says can't open var/log/yum.log but when i check it i can read it and even the permissions are correct and i cant evn edit the .bash_profile.

but ya the server is up and running..
 
Old 04-03-2012, 05:56 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
sounds like something is shafted on your disk, esp as you added you can't edit .bash_profile either. Run "dmesg", and you might see a pile of filesystem errors. Probably best to reboot the system and allow the fsck to scan the filesystem for errors, but obviously that depends *MASSIVELY* on what has actually gone on... It certainly could be very serious...
 
Old 04-03-2012, 06:18 AM   #3
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Original Poster
Rep: Reputation: Disabled
ya it gives following message wen i go to try to use service command n all
Code:
-bash: /root/.bash_profile: Input/output error
Can you please tell me how should i go about it?i don't know much abt dmesg and fsck also. I would be really grateful.
 
Old 04-03-2012, 06:29 AM   #4
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Original Poster
Rep: Reputation: Disabled
oh ya i ran dmesg command and it showed the following error:

Code:
end_request: I/O error, dev hda, sector 30608136
And i cant even write the error messages to a file which is usually possible with dmesg.

Can you please tell me what kind of error is that n wat should i do?
 
Old 04-03-2012, 06:40 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well, i already have. Something in that filesystem is shafted. How much, I couldn't say. Personally, *I* would reboot and hold my breath.
 
Old 04-03-2012, 07:05 AM   #6
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Original Poster
Rep: Reputation: Disabled
Oh wow..

I rebooted the server and now it worked,i even updated it.

ya i could edit my .bash_profile also,paths were missing and i added that by copying it from other user because i still don't know what kind of system path should we b giving. If you could explain me or provide me a link to study that,i would b really glad..

N do u have any idea why did that error happen before?i'm so confused..
 
Old 04-03-2012, 07:14 AM   #7
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
2answr U in Ur language:

ur hard disk is failin.


And now seriously:
Probably your hard disk is having BAD sectors that is why you should check it if you can shutdown the server and run some diagnostics on hard drive.

good luck
 
Old 04-04-2012, 12:44 AM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
The key msg was
Code:
OSError: [Errno 30] Read-only file system: '/var/run/yum.pid'
so, obviously you can't write to a read-only partition.
You need to fsck that partition, either manually by taking it off-line or by setting it to check in /etc/fstab, especially if this is the root partition; it can't be done online.
http://linux.die.net/man/8/fsck
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CentOS Yum Updates adiab Linux - Server 2 11-25-2010 05:45 AM
Transaction Check error installing GNOME via yum on Centos.. scratt Linux - Server 2 10-19-2009 03:28 AM
Yum Updates CentOS and Trixbox metallica1973 Linux - Server 4 02-15-2009 04:25 PM
CentOS 5 / RHEL 5 -- YUM updates through proxy. Rush_898 Red Hat 2 11-29-2008 07:44 PM
yum check-update says no updates when there are updates? MarkEHansen Linux - General 7 12-29-2006 05:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:51 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
Open Source Consulting | Domain Registration