HI,
This is more general linux related topic , i want to know few basic things.
1) How file systeem get corrupted on linux?
2) why,when and how fsck to be run without lossing data?
3) Is there is any other tool other than fsck available for file system check . 4) what are all the precaution to be made to prevent file system corruption.
5) why & when the system will get hanged and what are all the possible reasons?
If any one provide me suitable links providing all of the above information in detail it will be quite usefull.
On Thu, 2008-08-21 at 16:43 +0530, lingu wrote:
HI,
This is more general linux related topic , i want to know few basic things.
How file systeem get corrupted on linux?
why,when and how fsck to be run without lossing data?
Is there is any other tool other than fsck available for file
system check . 4) what are all the precaution to be made to prevent file system corruption.
- why & when the system will get hanged and what are all the
possible reasons?
If any one provide me suitable links providing all of the above information in detail it will be quite usefull.
<snip sig stuff>
I can only comment from my experience, which is primarily ext2 and ext3.
- How file systeem get corrupted on linux?
I've almost never seen corruption in a Linux file system, the primary reason is usually a hardware issue, the secondary reason (by far) is buggy code.
- why,when and how fsck to be run without lossing data?
fsck can never guarantee data will not be lost, it does the best it can, which is usually pretty good. Normally fsck is run in "single user mode". If you want to run it manually, you'd bring the system to single user mode (init 1) or it would run automatically during boot. There is a counter in the file system as to the last time fsck was run, during boot if this exceeds a certain vaule, fsck is run. There is also a clean shutdown bit which is set during a normal shutdown/dismount, if this is not se,t which indicates a possible system crash, fsck is run during system boot.
- what are all the precaution to be made to prevent file system
corruption.
Run a "production" distribution such as Redhat/CentOS vs. more of a bleeding edge distribution such as Fedora. More than this, assume there will be data loss or corruption at some point and take precautions such as running RAID 1, backups and use a UPS to avoid system crashes or hardware issues in the face of brown or black outs. Lastly choose a journaling file system such as ext3, use ext2 for partitions were performance over consistency is more important.
- why & when the system will get hanged and what are all the possible
reasons?
Usually hardware issues, particularly memory and hard drives. Most distributions come with memtest86 so that the hardware's memory can be thoroughly tested prior to installation of the operating system.
Brett
I can only answer some...
lingu schrieb:
HI,
This is more general linux related topic , i want to know few basic things.
- How file systeem get corrupted on linux?
Hardware-problems. Loss of power. Bugs in FS ;-)
why,when and how fsck to be run without lossing data?
Is there is any other tool other than fsck available for file
system check
Nope, you can just change filesystems. (and platforms...)
. 4) what are all the precaution to be made to prevent file system corruption.
UPS. BBWC.
- why & when the system will get hanged and what are all the
possible reasons?
What do you mean by "will get hanged"?
If any one provide me suitable links providing all of the above information in detail it will be quite usefull.
Is this your homework? ;-)
Rainer
lingu wrote:
- How file systeem get corrupted on linux?
The same way any file system gets corrupted: data gets damaged or lost on its way to the physical media.
- why,when and how fsck to be run without lossing data?
The purpose of fsck is to bring the file system back into a consistent state so you can continue to use it, not to guarantee to recover your data. If you need guaranteed data recovery, ship the drive to a data recovery house.
- Is there is any other tool other than fsck available for file
system check
I'm not aware of any. There may be other tools that incorporate fsck functionality, but nothing that's designed to do a better job, somehow.
- what are all the precaution to be made to prevent file system
corruption.
1. Put the computer on a UPS.
2. Configure nut (http://networkupstools.org/) to bring the system down safely well before the UPS's battery quits. You don't want to fully-discharge a lead-acid battery, which is what UPSes use. Shut down before it drops below about 20%.
3. Use some form of redundant RAID. (Not RAID-0!)
4. Run the RAID system's consistency check function periodically.
5. If the system's RAID card offers a battery backup option, get one.
6. If the system is experiencing kernel panics, fix the problem that's causing it. Kernel panics are almost always due to broken hardware. Replace the broken hardware. Very rarely, they may be due to a bad driver or a kernel bug, but when you hear hoof beats, think horses, not zebras.
7. Back up your system.
8. BACK UP YOUR SYSTEM.
9. BACK! UP! YOUR! SYSTEM!!! (And then, back it up again.)
- why & when the system will get hanged and what are all the possible
reasons?
There are an infinite number of answers to this question.
You can configure Linux to dump the kernel's memory state and other debugging information to disk in case of a crash. Do that, and convince someone to analyze the information for you.
P.S. Don't you think you could have thought up a better title for this thread? Even "fsck" would have been better.
On Thu, 2008-08-21 at 05:38 -0600, Warren Young wrote:
lingu wrote:
- what are all the precaution to be made to prevent file system
corruption.
Put the computer on a UPS.
Configure nut (http://networkupstools.org/) to bring the system down
safely well before the UPS's battery quits. You don't want to fully-discharge a lead-acid battery, which is what UPSes use. Shut down before it drops below about 20%.
Use some form of redundant RAID. (Not RAID-0!)
Run the RAID system's consistency check function periodically.
If the system's RAID card offers a battery backup option, get one.
If the system is experiencing kernel panics, fix the problem that's
causing it. Kernel panics are almost always due to broken hardware. Replace the broken hardware. Very rarely, they may be due to a bad driver or a kernel bug, but when you hear hoof beats, think horses, not zebras.
Back up your system.
BACK UP YOUR SYSTEM.
BACK! UP! YOUR! SYSTEM!!! (And then, back it up again.)
10. TEST the backups, preferably on another system. All the backup tapes in the world won't help if you think you've been doing it right for the past 5 months, but in reality all the tapes are either blank or damaged.
On Thu, Aug 21, 2008 at 4:13 AM, lingu hicheerup@gmail.com wrote:
HI,
This is more general linux related topic , i want to know few basic things.
Google is your friend. A good spell checker might not hurt, either. :-)
- How file systeem get corrupted on linux?
Pretty much the same way as it might happen under any other OS, but less frequently if you use a journaling file system. Also, since Linux is a significantly more reliable system than many others overall, the odds are lower for such a thing to happen at all.
- why,when and how fsck to be run without lossing data?
This really depends more on what kind of file system you are using than fsck. Fsck's purpose is to ensure file system integrity. YMMV.
- Is there is any other tool other than fsck available for file system
check
For file system integrity, not really. For any other purpose, you're on your own.
- what are all the precaution to be made to prevent file system
corruption.
Pretty much the same precautions you take under any other OS - reliable hardware and backups.
- why & when the system will get hanged and what are all the possible
reasons?
Pretty much the same as under any other OS - livelocks and deadlocks. Linux tends to have fewer of both.
If any one provide me suitable links providing all of the above information in detail it will be quite usefull.
http://www.google.com and http://centos.org are good places to start.
(IOW, don't expect to get all the answers handed to you. If you're going to play with computers in general, and Linux in particular, you need to do your homework before asking a question on this, and most any other, list, and then make the question specific if you want a good answer.)
Regards,
mhr