[svlug] fsck

Brian J. Tarricone bjt23 at cornell.edu
Thu Aug 11 21:57:39 PDT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Skip Evans wrote:
> Hey all,
> 
> I'm much more familiar with BSD than Linux as a server, so when a 
> client of mine said he thinks his HD is having problems, fsck was the 
> first thing I thought to run, but the following ensued:
> 
> [root at linux1 sbin]# fsck
> fsck 1.27 (8-Mar-2002)
> 
> No devices specified to be checked!
> [root at linux1 sbin]# df -h
> Filesystem            Size  Used Avail Use% Mounted on
> /dev/md1              146G  2.4G  136G   2% /
> /dev/md0               99M   14M   79M  15% /boot
> none                  495M     0  495M   0% /dev/shm
> [root at linux1 sbin]# fsck /dev/md1
> fsck 1.27 (8-Mar-2002)
> e2fsck 1.27 (8-Mar-2002)
> /dev/md1 is mounted.
> 
> WARNING!!!  Running e2fsck on a mounted filesystem may cause
> SEVERE filesystem damage.
> 
> Do you really want to continue (y/n)? no
> 
> check aborted.
> [root at linux1 sbin]#
> 
> 
> =-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-==-=
> This is SME Linux with a 2.4.20 kernel.
> 
> What would be the proper way to run fsck on this box?
> 
> On BSD you just run it with no args and it takes off.
> 
> Any help would be greatly appreciated.

Yeah, unmounting / is a bit difficult on a running system ^_^.  Two options:

1) Boot with a livecd (e.g. Knoppix), and fsck from there.  I'm not sure
if the livecd will detect the RAID volumes properly on its own, though.

2) Run 'mount / -o remount,ro'.  That'll remount / in read-only mode and
you should be able to fsck it without problems.

	-brian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFC/CxD6XyW6VEeAnsRAnHXAJ0bWtERNyPSA12nDgg50MxOapy5kgCbBdzH
e7dH05/nN9ZuQZqvuY5pHUw=
=Aip4
-----END PGP SIGNATURE-----




More information about the svlug mailing list