LinuxQuestions.org
Help answer threads with 0 replies.
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 05-09-2012, 12:39 PM   #1
svenxix
LQ Newbie
 
Registered: Feb 2012
Distribution: Debian, Fedora
Posts: 24

Rep: Reputation: 0
Why use fsck?


When and why would I need to run fsck?

My understanding is that fsck can be used when a files data and meta-data are inconsistent. But I understand that fsck can take a really long time.

What is the harm in losing a little metadata (such as access time and created time) on a few files?

What other problems can be caused by a few inconsitent files?

There is plenty of documentation on how to use fsck, but I am more interested on knowing when and why I should use it.
 
Old 05-09-2012, 12:58 PM   #2
Nermal
Member
 
Registered: Jan 2009
Distribution: Debian
Posts: 59
Blog Entries: 2

Rep: Reputation: 6
fsck is like scandisk. It checks that the file system is correct and you have no loose data nodes (lost data). On my servers I run a fsck every 6 months(ish) just to make sure that all is well in the world. I can't remember the last time anything was fixed by it.

My servers at home run 24/7 unless I have a power outage greater than 20 minutes, my ups's are rated for 30 mins but I do like to shut things down nicely, some of my databases can take 5 mins to commit and shut down.

Work wise my servers are customer facing and I have a strict quarterly process to power down and bring each server back up after full backups and cleaning up stuff that shouldn't be their. I have over 100 servers in my estate 90%/10% split *nix and Windoze.

So in short it does a File System Check. Good for checking the file system is good.
 
Old 05-09-2012, 03:57 PM   #3
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,568

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
You should always ALWAYS make a backup before running fsck. Especially if you run it with -y(not advisable in most cases), it does have a potential to make data irrecoverable depending upon the errors in the filesystem. As with anything, backup before you run a command.
 
Old 05-09-2012, 04:57 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,311
Blog Entries: 54

Rep: Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860
Quote:
Originally Posted by svenxix View Post
What is the harm in losing a little metadata (such as access time and created time) on a few files?
Apart from "creation" time not existing in Linux (it's "change" time): a file ("everything is a file") may be polled by a process waiting to Do Something based on say modification time. Change time is for instance used by the 'dump' utility.


Quote:
Originally Posted by svenxix View Post
What other problems can be caused by a few inconsitent files?
Think of the results as the computer equivalent of amnesia an epilepsy combined. Basically everything that can fail will. On a small level that may just mean you not being able to open your previous OGG, MKV or SVG files, or your smartphone no longer working or on a larger level Gmail or Yahoo mail serving you your emails but partially mixed with somebody elses emails or critical infrastructure failures and I don't mean just the Internet.
 
  


Reply

Tags
fsck


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
How to use fsck? odiseo77 Linux - Software 4 11-07-2009 01:13 AM
2 fsck or not 2 fsck? naps Suse/Novell 4 03-18-2005 02:11 PM
automatic fsck on boot. fsck errors. nixel Slackware 1 05-17-2004 07:51 AM
How to do fsck Please help Zi5 Linux - Distributions 2 05-13-2004 06:47 PM
How to use Fsck pembo13 Linux - General 4 04-20-2004 11:00 AM


All times are GMT -5. The time now is 01:47 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