Fedora Linux Support Community & Resources Center
  #1  
Old 13th July 2010, 11:56 AM
glennzo's Avatar
glennzo Online
Un-Retired Administrator
 
Join Date: Mar 2004
Location: Salem, Mass USA
Posts: 13,974
linuxfedorafirefox
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
Reply With Quote
  #2  
Old 13th July 2010, 02:01 PM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,551
linuxfedorafirefox
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.
Reply With Quote
  #3  
Old 13th July 2010, 02:04 PM
glennzo's Avatar
glennzo Online
Un-Retired Administrator
 
Join Date: Mar 2004
Location: Salem, Mass USA
Posts: 13,974
windows_xp_2003firefox
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
Reply With Quote
  #4  
Old 13th July 2010, 02:52 PM
forkbomb's Avatar
forkbomb Offline
Registered User
 
Join Date: May 2007
Location: U.S.
Posts: 4,852
linuxgentoofirefox
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
Reply With Quote
  #5  
Old 13th July 2010, 03:30 PM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,551
linuxfedorafirefox
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.
Reply With Quote
  #6  
Old 13th July 2010, 03:37 PM
Dies Offline
Registered User
 
Join Date: Oct 2006
Posts: 4,752
macossafari
Re: e2fsck

Quote:
Originally Posted by stoat View Post
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.
Reply With Quote
  #7  
Old 13th July 2010, 03:48 PM
glennzo's Avatar
glennzo Online
Un-Retired Administrator
 
Join Date: Mar 2004
Location: Salem, Mass USA
Posts: 13,974
windows_xp_2003firefox
Re: e2fsck

Quote:
Originally Posted by stoat View Post
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
Reply With Quote
Reply

Tags
e2fsck

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

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)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat