LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 09-24-2011, 05:13 PM   #1
NuWeb
Member
 
Registered: Nov 2006
Posts: 55

Rep: Reputation: 15
fsck


I'm no Linux expert but use it and get by. I now have a need to use fsck or e2fsck and I get:

# fsck
bash: fsck: command not found

What am I doing wrong.?

I'm having a problem with one of my servers and get:
'EXT3-fs: error loading journal'

and was told to use fsck or e2fsck to fix the problem. I have the drive on another server I have and it's not mounted and should be /dev/HDC
 
Old 09-24-2011, 05:16 PM   #2
anishkumarv
Member
 
Registered: Feb 2010
Location: chennai - India
Distribution: centos
Posts: 294

Rep: Reputation: 10
use /sbin/fsck to fix it.
 
Old 09-24-2011, 05:37 PM   #3
NuWeb
Member
 
Registered: Nov 2006
Posts: 55

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by anishkumarv View Post
use /sbin/fsck to fix it.
Thanks...

fsck worked on my /dev/hdc1 partition but on my /dev/hdc2 using fsck or e2fsck I get:

# /sbin/fsck /dev/hdc2
fsck 1.39 (29-May-2006)
e2fsck 1.39 (29-May-2006)
fsck.ext2: No such file or directory while trying to open /dev/hdc2

The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>


The /dev/hda drive from one server is having problems so I put it on my "sister" server and it's now /dev/hdc. This is how the drives were configured (df from sister server):
# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda2 113344072 13125148 94368456 13% /
/dev/hdb1 113544680 2401996 105281772 3% /home
/dev/hda1 101086 34408 61459 36% /boot
tmpfs 905696 0 905696 0% /dev/shm
none 905604 104 905500 1% /var/lib/xenstored
 
Old 09-24-2011, 09:31 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
"fdisk -l" - may need root/sudo (also in /sbin).
 
Old 09-24-2011, 10:22 PM   #5
NuWeb
Member
 
Registered: Nov 2006
Posts: 55

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by syg00 View Post
"fdisk -l" - may need root/sudo (also in /sbin).
/dev/hdc should be partitioned the same and basicly be the same as /dev/hda. Could it be someone hacked in to the server and repartition the disk.?


# /sbin/fdisk -l

Disk /dev/hda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 14580 117009427+ 83 Linux
/dev/hda3 14581 14593 104422+ 82 Linux swap / Solaris

Disk /dev/hdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 14593 117218241 83 Linux

Disk /dev/hdc: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 * 1 14593 117218241 83 Linux
 
Old 09-24-2011, 11:11 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
That's a pretty big leap - fsck worked, so the filesystem appears valid. Try mounting it, and do "df -hT" to see how big it is.

Use [code] tags to get the output formatted so it can be read.

Last edited by syg00; 09-24-2011 at 11:12 PM. Reason: final sentence.
 
Old 09-24-2011, 11:21 PM   #7
NuWeb
Member
 
Registered: Nov 2006
Posts: 55

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by syg00 View Post
That's a pretty big leap - fsck worked, so the filesystem appears valid. Try mounting it, and do "df -hT" to see how big it is.
The problem is the partitions for /dev/hdc should be the same as /dev/hda. The /dev/hdc is the drive from the crashed "sister" server. They we both built at the same time and should be the same. Seems the /dev/hdc is missing 2 partitions.
 
Old 09-25-2011, 12:05 AM   #8
NuWeb
Member
 
Registered: Nov 2006
Posts: 55

Original Poster
Rep: Reputation: 15
OK... My bad...

I'm no expert on Linux but I made a stupid hardware mistake. I put the wrong drive on /dev/hdc, They're all 120GB drives and if I try to put the bad drive on it shows 80026GB. I will try to swap drive controller boards tomorrow and see if that helps, if not I think the drive is toast...
 
Old 09-25-2011, 12:10 AM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Happens to all of us.

Doesn't look good for that drive.
 
  


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
help on fsck sdcc619 Linux - Newbie 3 01-26-2009 04:15 AM
help with FSCK laucian Linux - Newbie 3 02-05-2008 08:54 AM
fsck help mokku Linux - Server 6 08-22-2007 10:45 AM
automatic fsck on boot. fsck errors. nixel Slackware 1 05-17-2004 07:51 AM
Fsck scottpioso Linux - Newbie 7 06-01-2003 03:06 PM

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

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