[NTLUG:Discuss] fsck while the system is running

Johnie Stafford jms at pobox.com
Tue Jan 25 16:05:20 CST 2000



 bh> On Tue, 25 Jan 2000, J. Reeves Hall wrote:

 >> Is it possible to run fsck (and make changes) on an ext2 partition
 >> without shutting down? I suspect some inode corruption, but I don't want
 >> to bring the server down.

>>> On Tue, 25 Jan 2000 15:48:39 -0600 (CST), Bug Hunter <bughuntr at one.ctelcom.net> said:

 bh>   If you want to turn your system into swiss cheese, go ahead.

 bh>   I would recommend logging in as root, and executing 

 bh> telinit 1

 bh>  to bring the system to single user mode.  fsck could be run safely at
 bh> that point.   after finishing, run

 bh> telinit 3

 bh>  to get it back to multiuser mode.  If you autoboot into X, I believe it
 bh> is telinit 5.

I would be careful about doing the fsck after the init 1. If the run
levels aren't set up exactly right, lots of services will still be
running. After doing the 'init 1' I would do a ps -ef and kill any
processes that are hanging around. The best way is still to boot into
single user mode first. 

File system corruption is definately a reason to take a maintenance
outage on a server. I've never seen it happen under Linux so I'm not
sure if it is even possible, but I know I have seen plenty of Solaris
systems panic due to file system corruption. I would think it would be
better to take the system down gracefully, do the checks and then
bring it back up.

Just my $.02 :)

Johnie






More information about the Discuss mailing list