LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   ext4 needs a fsck every other boot (https://www.linuxquestions.org/questions/linux-hardware-18/ext4-needs-a-fsck-every-other-boot-749186/)

con 08-20-2009 11:35 PM

ext4 needs a fsck every other boot
 
Having some problems with on of my harddrives, a 500gb samsung. I have to fsck almost everytime I boot. smartctl tells me the hd is healthy, badblocks returns no errors. I've run samsungs hd tool on the hd and it didnt find any errors. Is there some known bug in ext4 or something else that would cause this?

Slackware64-current with kernel 2.6.30.4

Thanks for any help :)

karamarisan 08-20-2009 11:45 PM

It's possible it's not unmounting cleanly, but I have one really stupid idea worth looking at real quicklike. Run `tune2fs -l` on the partition in question and look for the line that says 'Maximum mount count:'. That's the number of mounts you're allowed before the system will force a fsck, and if yours is 1 or 2... like I said, stupid idea. :)

con 08-21-2009 12:04 AM

Code:

tune2fs 1.41.8 (11-July-2009)               
Filesystem volume name:  <none>           
Last mounted on:          <not available>   
Filesystem UUID:          5906182a-0fe1-46fb-b2f5-6d409d26bebd
Filesystem magic number:  0xEF53                             
Filesystem revision #:    1 (dynamic)                       
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize               
Filesystem flags:        signed_directory_hash                                               
Default mount options:    (none)                                                             
Filesystem state:        clean                                                               
Errors behavior:          Continue                                                           
Filesystem OS type:      Linux                                                               
Inode count:              2444624                                                             
Block count:              9765511                                                             
Reserved block count:    488275                                                             
Free blocks:              7914790                                                             
Free inodes:              2107743                                                             
First block:              0                                                                   
Block size:              4096                                                               
Fragment size:            4096                                                               
Reserved GDT blocks:      1021                                                               
Blocks per group:        32768                                                               
Fragments per group:      32768                                                               
Inodes per group:        8176                                                               
Inode blocks per group:  511                                                                 
Flex block group size:    16
Filesystem created:      Sat Aug  8 02:41:28 2009
Last mount time:          Fri Aug 21 07:39:39 2009
Last write time:          Fri Aug 21 07:39:39 2009
Mount count:              2
Maximum mount count:      32
Last checked:            Fri Aug 21 06:43:01 2009
Check interval:          15552000 (6 months)
Next check after:        Wed Feb 17 05:43:01 2010
Lifetime writes:          8 GB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:              256
Required extra isize:    28
Desired extra isize:      28
Journal inode:            8
First orphan inode:      267504
Default directory hash:  half_md4
Directory Hash Seed:      e94ea8bf-4ff3-419e-8d4a-289e169948ba
Journal backup:          inode blocks

When I run fsck it finds errors and repairs them. In /lost+found theres 4 files with some of the content of fstab. Just ran badblocks again found 0 badblocks.

karamarisan 08-21-2009 12:57 AM

Alright; like I said, stupid idea. :)

Not sure where to go from here. Can you think of any reason why your shutdowns wouldn't be going as expected? One diagnostic you could try if you can afford to - don't do anything important in combination with this - is to change the on-error behavior (`man tune2fs`) and see if it's happening while the system's up. That's potentially dangerous, though, so think about it a lot before trying it.

jiml8 08-21-2009 02:29 AM

You had better believe fsck, and it is telling you that there is a problem.

If badblocks says you are OK, I would be trying something more basic, like spinrite. I also would be considering replacing the cable to the drive, and I would be taking a look at the voltages applied to the drive to make sure they are in spec. I also would be looking for dust bunnies, or a bent connector pin, or anything else that could cause an intermittent malfunction or data error.

You didn't specify the interface, but I'm guessing SATA. Does the drive have error logging? What does that say? You access it with the smartctl -a command. Does the drive have a self-test mode? Try that too.

Is your controller on the motherboard, or a plugin?

Actually, truth is that in your position I'd have spinrite running that drive in a heartbeat. However spinrite costs $89 and because of that many people don't want to use it. Personally I found it to be money well spent.


All times are GMT -5. The time now is 02:43 AM.