LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 12-05-2013, 02:17 AM   #1
kishorelinux
LQ Newbie
 
Registered: Jul 2013
Posts: 1

Rep: Reputation: Disabled
How to find fs corrupt or not & how torecover it


hi friends,
i am new to linux. and my question is how can we find the file system is corrupt or not, an how we recover it.

And is this same for RHEL 6 & RHEL 5

Thanks for consider

kishore BANGLORE
 
Old 12-05-2013, 03:21 AM   #2
gdejonge
Member
 
Registered: Aug 2010
Location: Netherlands
Distribution: Kubuntu, Debian, Suse, Slackware
Posts: 317

Rep: Reputation: 73
The program you are looking for is called fsck.

The normal process is unmount the filesystem you want to check. Run fsck on the correct device and after that mount the filesystem again.

EXAMPLE
Code:
umount /dev/sdd1
fsck /dev/sdd1
mount /dev/sdd1 /mountpoint
If you need to check your root filesystem use a live-cd to boot your system.

As about recovering:
If the problems are not to severe, fsck can probably correct them for you. Otherwise you get your backup out and restore your data from there.
 
1 members found this post helpful.
Old 12-05-2013, 04:35 AM   #3
kapilbajpai88
Member
 
Registered: Jul 2008
Location: Bangalore, India
Distribution: RHEL
Posts: 235

Rep: Reputation: 41
As suggested by Gerrard, the best idea is to boot from a live CD, if the failure is confirmed. General live CDs like Knoppix tend to come with a lot of data recovery tools, but there are also smaller CDs designed specifically for the task, such as SystemRescueCD. Once booted, you’ll find a range of options. If you’re particularly paranoid about your data, you can mount the damaged Filesystem in read-only mode and copy as many files as you can from it on to other local drives or across a network.

Another step to try before any Filesystem repair tools is a block scan of the hard drive. You can skip this if you’re sure the drive is fine, because it will take a while to run, but it doesn’t hurt to play it safe. Use the ‘badblocks’ command to run the block scan:
sudo badblocks -sv /dev/sdc

If you’re still not sure, run ‘dmesg’ in another console and look for I/O errors.
 
  


Reply



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
superblock is corrupt after attempted resize & move of ext3 partition ktat Linux - Hardware 2 01-14-2011 04:23 AM
[SOLVED] GRUB: Cannot find list of partitions && /usr/sbin/grub-setup: error w1k0 Linux Mint 26 12-21-2010 03:29 PM
Corrupt models, bad window focus w/wine & CS: Source mortrek Linux - Games 5 08-10-2006 12:26 PM
Disk in scsi raid1 fails-how torecover? Ezplan Linux - Hardware 2 01-19-2006 08:08 AM
Slackware & Debian ISO's corrupt? shlok Linux - Newbie 3 06-29-2003 12:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:36 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration