≡ Menu

Ask nixCraft

Why my Linux server ext3 filesystem go read-only?

From my mailbag:

We have 5 Dell server collocated running CentOS 4.x and 5.x server operating system. Sometime my file system (ext3) goes read-only. I’d like to know what could be causing such a problem?

My guess:
a) Hardware problem / hard disk problem, check harddisk for errors.

b) High disk I/O aka busy I/O retry error can mark low level disk call as failed. This will force ext3 to go into read only mode.

c) High disk I/O on SAN

d) SAN is not configured properly for the path failover.

In all sort of problems ext3 goes read-only to protect the filesystem and further damage. If you are using VMWARE, check out official webpage to download SCSI patches or workaround for vmware problems.

So what could be causing the file system on Linux go read-only?

Apart from above generic problem, any other error can trigger filesystem on Linux go read only. I hope our reader / seasoned Linux admin can help to answer this question. Please share the experiences and advice in the comments.

Camira asks:

Where can I find the Linux distribution for the ppc architecture?

I guess the best distro for the PowerPC based PC is Yellow Dog Linux (YDL). Just like other distro it is a free software and open-source Linux distribution for Power Architecture hardware. It is based on Fedora Linux. According to wikipedia:

PowerPC is a RISC microprocessor architecture created by the 1991 Apple–IBM–Motorola alliance, known as AIM. Originally intended for personal computers, PowerPC CPUs have since become popular embedded and high-performance processors as well. PowerPC was the cornerstone of AIM's PReP and Common Hardware Reference Platform initiatives in the 1990s, but the architecture found the most success in the personal computer market in Apple's Macintosh lines from 1994 to 2006 (before Apple's transition to Intel).

PowerPC based system includes Sony PlayStation PS3, IBM Power and pSeries, Mercury Cell, Apple Macintosh G3, G4 & G5 computers, including iBooks, PowerBooks and Apple PowerPC etc.

Download PowerPC Linux distributions

Please note that you can also try out FreeBSD, OpenBSD and NetBSD for the PPC architecture based system.

Lighttpd block wget useragent for specific urls

One of regular reader asks a question:

My website powered by Lighttpd web server. I’d like to block Wget useragent for entire my domain.com site except for /downloads/ url section. How do I configure lighttpd?

You need to use $HTTP filed useragent and url combination. Just open your lighttpd.conf file and append code as follows.

Lighttpd block useragent wget configuration

# vi /etc/lighttpd/lighttpd.conf
Append config directive as follows:

$HTTP["useragent"] =~ "Wget" {
        $HTTP["url"] !~ "^/download($|/)" {
                url.access-deny = ( "" )
        }
  }

Where,

  • $HTTP["useragent"] : Match on useragent i.e. Wget
  • $HTTP["url"] : Match on url section such as /download/*. If there are nested blocks, this must be the most inner block.
  • =~ : Perl style regular expression match
  • !~ : Perl style regular expression not match

Just restart the webserver, enter:
# /etc/init.d/lighttpd restart

Now user can run wget on http://domain.com/download/* urls but not on http://domain.com/file.html or http://domain.com/dir/file

Does any one know if the Evolution will work with Microsoft Exchange Server 2007? I’ve client and she needs to connect to corporate Microsoft Exchange Server 2007. The problem is - connectivity doesn’t work. If anyone has any information or workaround please comment back.

Update 31/Dec/2007: Rocky pointed me to a thread about MAPI based plugin. It claims to works with Exchange server 2007.

How do you disconnect inactive user sessions?

One of our regular reader hall sends an interesting question:

I work for a small company and most user login to centralized Linux server. I’d like to
automatically log out all inactive users from server for various reasons. How do I disconnect inactive user sessions?

To be frank, I don’t have any clear cut answer to question. There are at least 4-5 shells installed on a typical Linux installation. Also most user have has control over their own environment and user can switch to a different shell.

I hope our reader or seasoned UNIX admin can help to answer this question. Please share the experiences and advice in the comments.

Update: Checkout answer below in comments!

There is some debate going on and the question is:

What is the most efficient Linux file system for laptops?

I think ext3 doing well but again I don’t have complete answer here.

We have some smart people around here. So please add your thoughts and suggestion in comments. If you can't offer a complete answer it's still helpful to get things started and point people in the right direction for more information :)