 |
 |
 |
 |
| Hardware & Laptops Help with your hardware, including laptop issues |

13th July 2010, 11:56 AM
|
 |
Un-Retired Administrator
|
|
Join Date: Mar 2004
Location: Salem, Mass USA
Posts: 13,974

|
|
|
e2fsck
Has anyone ever had any reason to use e2fsck? Doesn't seem to be something discussed here too often. I have a drive that the system suggested running e2fsck on so I'm currently doing so since there are some issues with the box, not necessarily related to hard disks. Other than reading the man page I know little about it. Just wondering...
__________________
Glenn
The Bassinator © ®
Laptop: Toshiba Satellite / Intel Core 2 Duo 1.73 GHz / 2GB / 160GB / Intel Mobile 945GM/GMS/GME/943/940GML Integrated Graphics
Desktop: BioStar MCP6PB M2+ / AMD Phenom 9750 Quad Core / 4GB / 1TB SATA / 500GB SATA / EVGA GeForce 8400 GS 1GB
|

13th July 2010, 02:01 PM
|
|
Registered User
|
|
Join Date: Jun 2006
Posts: 7,551

|
|
|
Re: e2fsck
I'm not the voice of authority on it, but I used it a lot recently during some experiments with cloning partitions using simple terminal commands. It's what actually does the work when you run fsck on ext2 and ext3 partitions. I ran it before and after cloning a partition. And the utility resize2fs required me to run e2fsck first.
|

13th July 2010, 02:04 PM
|
 |
Un-Retired Administrator
|
|
Join Date: Mar 2004
Location: Salem, Mass USA
Posts: 13,974

|
|
|
Re: e2fsck
Hi Stoat. I ran this today, as I stated. Never needed (or thought I needed) to use it in the past. Here's the result, which I believe is all good.
Code:
[root@phenom13 ~]# e2fsck /dev/sdc1
e2fsck 1.41.10 (10-Feb-2009)
FreeAgent contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
FreeAgent: 117526/15269888 files (1.6% non-contiguous), 30945085/61049000 blocks
[root@phenom13 ~]# e2fsck /dev/sdc1
e2fsck 1.41.10 (10-Feb-2009)
FreeAgent: clean, 117526/15269888 files, 30945085/61049000 blocks
[root@phenom13 ~]#
__________________
Glenn
The Bassinator © ®
Laptop: Toshiba Satellite / Intel Core 2 Duo 1.73 GHz / 2GB / 160GB / Intel Mobile 945GM/GMS/GME/943/940GML Integrated Graphics
Desktop: BioStar MCP6PB M2+ / AMD Phenom 9750 Quad Core / 4GB / 1TB SATA / 500GB SATA / EVGA GeForce 8400 GS 1GB
|

13th July 2010, 02:52 PM
|
 |
Registered User
|
|
Join Date: May 2007
Location: U.S.
Posts: 4,852

|
|
|
Re: e2fsck
I've had to run it a few times to fix file systems after cloning virtual machine disk images (for migrating from a small disk image to a bigger one for example).
In most distributions filesystem checks are done automatically after n mounts, n days, or if a file system appears to be dirty during the boot process (if you've ever suddenly lost power you probably saw this upon reboot). Hypothetically automatic checks shouldn't be done very often.
__________________
- Tom
"What is freedom? To have the will to be responsible for one's self." - Stirner
|

13th July 2010, 03:30 PM
|
|
Registered User
|
|
Join Date: Jun 2006
Posts: 7,551

|
|
|
Re: e2fsck
Quote:
|
Originally Posted by glennzo
Here's the result, which I believe is all good.
|
To me, e2fsck appears to check the "Filesystem state" in the superblock (see sudo dumpe2fs -h /dev/sdxy). It is either "clean" or "not clean". If it's "clean", then I think e2fsck just reports that and stops. If it's "not clean", then it does it's thing. Your result looks like what I saw over and over with several different partitions recently. So I believe it's okay, too. Maybe something caused the filesystem not to be cleanly unmounted leaving that "not clean" filesystem state for e2fsck to find in the superblock.
I recently had e2fsck find a bunch of broken links. The source files for the links had vanished. They weren't really important files, but they had been buried in some system directory that I never visit. I recovered them from the DVD and re-established the links. But I still worry about that incident meaning something bad about that hard drive.
Maybe some expert will come along and explain it all to us better. Things like what that "non-contiguous" percentage means.
|

13th July 2010, 03:37 PM
|
|
Registered User
|
|
Join Date: Oct 2006
Posts: 4,752

|
|
|
Re: e2fsck
Quote:
Originally Posted by stoat
Things like what that "non-contiguous" percentage means.
|
I'm no expert, but I believe that refers to how fragmented the drive is.
So in glennzo's case, not very.
|

13th July 2010, 03:48 PM
|
 |
Un-Retired Administrator
|
|
Join Date: Mar 2004
Location: Salem, Mass USA
Posts: 13,974

|
|
|
Re: e2fsck
Quote:
Originally Posted by stoat
To me, e2fsck appears to check the "Filesystem state" in the superblock (see sudo dumpe2fs -h /dev/sdxy). It is either "clean" or "not clean". If it's "clean", then I think e2fsck just reports that and stops. If it's "not clean", then it does it's thing. Your result looks like what I saw over and over with several different partitions recently. So I believe it's okay, too. Maybe something caused the filesystem not to be cleanly unmounted leaving that "not clean" filesystem state for e2fsck to find in the superblock.
I recently had e2fsck find a bunch of broken links. The source files for the links had vanished. They weren't really important files, but they had been buried in some system directory that I never visit. I recovered them from the DVD and re-established the links. But I still worry about that incident meaning something bad about that hard drive.
Maybe some expert will come along and explain it all to us better. Things like what that "non-contiguous" percentage means.
|
I'll buy the non-contigious stuff and the "not cleanly unmounted" claims too, especially since that machine (Quad Core Phenom) seems to like to lock up a lot lately, forcing a powercycle. The drive in question is an external USB Seagate FreeAgent, formatted EXT3 (obviously), and it is written to very often since it's the networked household backup device. This must be like defragmenting a Windows hard disk I'd imagine.
__________________
Glenn
The Bassinator © ®
Laptop: Toshiba Satellite / Intel Core 2 Duo 1.73 GHz / 2GB / 160GB / Intel Mobile 945GM/GMS/GME/943/940GML Integrated Graphics
Desktop: BioStar MCP6PB M2+ / AMD Phenom 9750 Quad Core / 4GB / 1TB SATA / 500GB SATA / EVGA GeForce 8400 GS 1GB
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
|
e2fsck may fix many dmesg's
|
SlowJet |
Fedora 13 Development Branch |
1 |
14th December 2009 09:00 AM |
|
e2fsck output
|
phpdan |
Hardware & Laptops |
0 |
28th August 2008 12:27 PM |
|
e2fsck hangs
|
December |
Hardware & Laptops |
5 |
26th February 2008 02:53 AM |
|
e2fsck on LVM?
|
ssdowd |
Using Fedora |
1 |
8th August 2007 03:13 PM |
Current GMT-time: 23:47 (Wednesday, 19-06-2013)
|
|
 |
 |
 |
 |
|
|