The Community Forums

Interact with an entire community of cPanel & WHM users.
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Read Only Mode

Discussion in 'General Discussion' started by ManXP, Apr 24, 2007.

  1. ManXP

    ManXP Well-Known Member

    Joined:
    Feb 3, 2005
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    I'm not sure if this is related to cPanel, but I guess so.

    Everything was fine for months, but recently httpd started failing. It was failing for 2-3 times per week, now it fails 2-3 times per day. Each time error message comes when trying to start httpd:

    fopen: Read-only file system
    httpd: could not open error log file /usr/local/apache/logs/error_log.
    /etc/init.d/httpd start: httpd could not be started

    What is going on here? How to fix it permanently?
     
  2. ManXP

    ManXP Well-Known Member

    Joined:
    Feb 3, 2005
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    yes, disk was replaced last night and new install of CentOS made. Today disk went to read-only for unknown reasons again, that's why i'm curious why it happens.
     
  3. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    If /usr is in read-only mode then the disk that partition lives on could be about to fail. Linux protects the file-system if it detects an inordinate number of errors on it by remounting it read-only. If that's the case (/usr is indeed mounted read-only) then you should have the disk it resides on replaced as soon as possible.
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    When disks suddenly go to read-only you should usually get an error posted into /var/log/messages (unless /var goes read-only of course), so you could check in there for errors against that device. For example, if it's /dev/sda3 try:

    grep /dev/sda /var/log/messages
     
  5. ManXP

    ManXP Well-Known Member

    Joined:
    Feb 3, 2005
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    Thanks for ideas. This is what I got after running this command:

    Apr 23 09:26:13 server590 kernel: Kernel command line: ro root=/dev/sda2
    Apr 23 09:26:14 server590 smartd[2986]: Device: /dev/sda, opened
    Apr 23 09:26:14 server590 smartd[2986]: Device: /dev/sda, not found in smartd database.
    Apr 23 09:26:14 server590 smartd[2986]: Device: /dev/sda, is SMART capable. Adding to "monitor" list.
    Apr 23 09:26:15 server590 kernel: Adding 4192956k swap on /dev/sda6. Priority:-1 extents:1
    Apr 24 02:54:43 alpha kernel: Kernel command line: ro root=/dev/sda2
    Apr 24 02:54:45 alpha kernel: Adding 4192956k swap on /dev/sda6. Priority:-1 extents:1
    Apr 24 02:54:49 alpha smartd[3054]: Device: /dev/sda, opened
    Apr 24 02:54:49 alpha smartd[3054]: Device: /dev/sda, not found in smartd database.
    Apr 24 02:54:49 alpha smartd[3054]: Device: /dev/sda, is SMART capable. Adding to "monitor" list.
     
  6. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Those messages don't indicate a problem. Have you checked /usr/local/apache/logs/? Make sure that none of the log files are >2GB in size. If they are, remove/rename them and then try restarting apache. Oh, and make sure that /usr isn't low on space.
     
Loading...

Share This Page