LinuxQuestions.org
Visit Jeremy's Blog.
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 08-01-2005, 08:29 PM   #1
Palula
Member
 
Registered: May 2005
Location: Brazil
Distribution: Fedore Core 3
Posts: 138

Rep: Reputation: 15
Talking File System Integrity Check


Hi everybody.
I am a new proud owner of a Linux Router/Firewall at my home. And I have to thank very much the Linuxquestions.org community and a special thank to Mara (moderator) for her patience and support.

But with every new solution, problems come along. And here it comes!!!

My Linux firewall doesnt work on nobreaks (they are far too expensive here in Brazil for me to by one on a home basis), so sometimes the connection can drop because of electrical failures/blackouts... So, now Im worried about the integrity of my file system and would like to know how can I monitor/fix file system inconsistencies?

Is there anything that works sort of like windows 95/98 scandisk?

I worry a lot about this because of the time and work put on to my router for it to work. So I would like to periodically (lets say on a weekly basis, for a start) check for the integrity of my file system. :-)

My file system is ext3, by the way.

Thanks again!!!
Palula Brasil.
 
Old 08-01-2005, 08:31 PM   #2
rshaw
Senior Member
 
Registered: Apr 2001
Location: Perry, Iowa
Distribution: Mepis , Debian
Posts: 2,694

Rep: Reputation: 45
http://www.die.net/doc/linux/man/man8/fsck.8.html
 
Old 08-01-2005, 09:14 PM   #3
Palula
Member
 
Registered: May 2005
Location: Brazil
Distribution: Fedore Core 3
Posts: 138

Original Poster
Rep: Reputation: 15
Okay, Ive already read about fsck, but the thing is that when I run it, this message appears:

WARNING!!! Running E2FSCK on mounted filesystem may cause SEVERE filesystem damage.
Is this a joke? Im a newbie!!! Of course I will not run that thing on my file system.

Can anybody help?
 
Old 08-02-2005, 12:50 AM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,133

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
You shouldn't run fsck on a mounted filesystem, like the message says (if you remount the filesystewm read only, though, it should be OK). Fsck will give you an option to run at boot if there's an unclean shutdown, before filesystems are mounted, if you choose, Generally, if you have a journalling filesystem like ext3 or reiserfs the chance of corruption is greatly lessened.
 
Old 08-02-2005, 01:29 AM   #5
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Buy an in-line UPS device. They are expensive but they are much better than stand-by UPS devices. An in-line UPS always draws its power from the battery while the battery is getting charged, so the computer power supply will get constant power. A stand-by UPS is just there waiting to make its move to switch from AC to battery. When it switches, there is a slight pause. Many power supplies have problems with this, so the computer could have some stability problems.
 
Old 08-02-2005, 06:37 AM   #6
Palula
Member
 
Registered: May 2005
Location: Brazil
Distribution: Fedore Core 3
Posts: 138

Original Poster
Rep: Reputation: 15
How do I unmount my hdxs?
I mean... What would be the command line?

umount /dev/hda
umount /dev/hdb

And how do I remount it... To work just as it works when I boot? I took a look at fstab and that is just really awkward, full of codes etc...

Thank You.
 
Old 08-02-2005, 09:35 AM   #7
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,017

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Palula,
You can't unmount your /dev/hda- because this is where your system is running!
But fsck needs the disk unmounted......

The solution is to go to a console, become root and enter

shutdown -Fr

This will shutdown the computer, Force a filesystem check at the next boot and reboot for you. fsck will run as the system starts up.

HTH
 
Old 08-02-2005, 10:37 AM   #8
Palula
Member
 
Registered: May 2005
Location: Brazil
Distribution: Fedore Core 3
Posts: 138

Original Poster
Rep: Reputation: 15
Thank you very much.
That was exactly what I was looking for. :-)
 
Old 08-02-2005, 11:08 AM   #9
Boow
Member
 
Registered: Feb 2004
Distribution: Slackware 10.2
Posts: 669

Rep: Reputation: 32
The ext3 filesystem is a journalizing filesystem If its unmounted uncleanly it recovers lost data from the journal. It will fsck itself after 30 days or so many mounts so you should'nt worry too much but forcing fsck wont hurt.
 
Old 08-03-2005, 08:29 PM   #10
Palula
Member
 
Registered: May 2005
Location: Brazil
Distribution: Fedore Core 3
Posts: 138

Original Poster
Rep: Reputation: 15
Well I did the "shutdown -Fr 0" and it started to work and did fine. It worked just like when the machine is booted unclean. And after that first part is started to show a lot of text I have never seened it. Its really a lot of text/messages etc...

But the system halted at some place and this message appeared:

Recursive die failure, output supressed
<0> Kernel panic - not syncing: Fatal exception in interrupt.

What should I do?
Thanks.
 
Old 08-03-2005, 08:35 PM   #11
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,133

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
It would help if you could paste a few lines of text above the kernel panic. Also try cold booting the system.
 
Old 08-05-2005, 06:33 AM   #12
Palula
Member
 
Registered: May 2005
Location: Brazil
Distribution: Fedore Core 3
Posts: 138

Original Poster
Rep: Reputation: 15
It worked!!!!!

For some reason when I put: shutdown -Fr 0 it goes all wrong (should work too). But when I put shutdown -Fr now, it works.

But I still need some help regarding the messages... My FC3 is in portuguese so Ill try to write in an understandable way. I have two partitions in my Linux.

1 - Root partition (with all system files etc.);
2 - Home partition (all particular user files).

When I run reboot with fsck, the system show these messages:

Checking filesystem root 3.7% (non-contiguous).
Checking filesystem home 9.1% (non-contiguous).

Is this correct? I think the best choice would be to have nothing non-contiguous.

Another question is how can I put fsck to run on the next boot automatically, if the previous boot has been done unclean. It asks like this: Press a key in five second to run fsck. Or something like that. I want it to run imperatively.
 
Old 08-06-2005, 06:49 PM   #13
Boow
Member
 
Registered: Feb 2004
Distribution: Slackware 10.2
Posts: 669

Rep: Reputation: 32
Checking filesystem root 3.7% (non-contiguous).
Checking filesystem home 9.1% (non-contiguous).

I wouldn't worry about that I've never seen ext3 filesystem go above 10 percent fragmentation. I think that is what it was before fsck repaired it.
 
Old 08-07-2005, 04:07 AM   #14
bp12345
Member
 
Registered: Jun 2005
Distribution: Debian testing, Kubuntu 5.04
Posts: 104

Rep: Reputation: 15
If you don't mind reinstalling everything, I'd reccommend Debian. It has very fast boot and shutdown times, and it is very stable. Also, the filesystem has never been so corrupted that it took more than 30 seconds or so to repair it. I'd also reccommend ReiserFS. It's journal is much more comprehensive, it is more effieient and it is faster, too.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Redhat 7.3 File System Integrity check /usr failed while booting up Chandran Red Hat 3 06-09-2005 12:36 AM
NTFS integrity check RomanG Mandriva 2 02-16-2005 09:19 AM
NTFS integrity check RomanG Linux - Software 1 02-16-2005 04:36 AM
How do I do a filesystem integrity check on XFS? Thaidog Linux - Newbie 2 08-27-2004 01:25 AM
Every reboot starts an integrity check mustang05 Linux - Software 1 01-24-2004 09:34 AM


All times are GMT -5. The time now is 12:48 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration