Messages in this thread | | | Subject | fsck error on flashcard with ext2 filesystem | Date | Thu, 10 Mar 2005 10:56:25 -0800 | From | "Santosh Gupta" <> |
| |
Hi All, I am facing filesystem corruption on flashcard ext2 filesystem. How could I get rid of these fsck error messages? Any help would be greatly appreciated.
Problem ------------ The rw partition on flashcard shows fsck errors if a file is deleted from it. Its fixed only on umount and mount of the partition.
Detailed Description ----------------------------- I am using Core Linux system on flashcard. Its another minimal linux distribution. Root filesystem is cramfs and a rw partition on flash is ext2. The system is always shutdown properly and initial fsck upon bootup shows no error. But if I delete a file on flash card and run fsck, it gives error in fsck. On umount and mounting again (or reboot), fsck shows no problem. Issuing "sync" command doesnt make any difference. Why is the disk not getting updated with filesystem metadata even after I wait for so long?
Keywords -------------- ext2 fsck flashcard bdflush kupdated /sbin/update filesystem corruption
How to reproduce the problem ------------------------------------------- Screendump is appended at end of the mail.
Environment ------------------ output of /usr/src/linux/scripts/ver_linux script [root@WSG-2503-75 sgupta]# ./ver_linux If some fields are empty or look unusual you may have an old version. Compare to the current minimal requirements in Documentation/Changes.
Linux WSG-2503-75 2.4.26 #2 Mon Oct 25 12:20:32 PDT 2004 i686 unknown
Gnu C gcc (GCC) 3.2 Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Gnu make 3.80 util-linux 2.11w mount 2.11w modutils 2.4.21 e2fsprogs 1.29 PPP 2.4.1 Linux C Library 2.3.1 Dynamic linker (ldd) 2.3.1 Linux C++ Library 5.0.0 Procps 3.0.4 Net-tools 1.60 Kbd 60: Sh-utils 2.0 Modules Loaded ipt_MARK ipt_MASQUERADE ipt_REDIRECT ipt_state iptable_mangle iptable_filter ip_nat_ftp iptable_nat ip_conntrack_ftp ip_conntrack ip_tables natsemi tun pppoe pppox ppp_generic slhc
[root@WSG-2503-75 sgupta]# cat /proc/cpuinfo processor : 0 vendor_id : CentaurHauls cpu family : 6 model : 7 model name : VIA Samuel 2 stepping : 3 cpu MHz : 598.486 cache size : 64 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu de tsc msr cx8 mtrr pge mmx 3dnow bogomips : 1192.75 [root@WSG-2503-75 sgupta]# cat /proc/ioports 0000-001f : dma1 0020-003f : pic1 0040-005f : timer 0060-006f : keyboard 0080-008f : dma page reg 00a0-00bf : pic2 00c0-00df : dma2 00f0-00ff : fpu 0170-0177 : ide1 02f8-02ff : serial(auto) 0376-0376 : ide1 03c0-03df : vga+ 03f8-03ff : serial(auto) 0400-040f : PCI device 1106:3057 0c00-0c7f : PCI device 1106:3057 0cf8-0cff : PCI conf1 dc00-dcff : PCI device 100b:0020 dc00-dcff : eth4 e000-e0ff : PCI device 100b:0020 e000-e0ff : eth3 e400-e4ff : PCI device 100b:0020 e400-e4ff : eth2 e800-e8ff : PCI device 100b:0020 e800-e8ff : eth0 ec00-ec1f : PCI device 1106:3038 ec00-ec1f : usb-uhci fc00-fc0f : PCI device 1106:0571 [root@WSG-2503-75 sgupta]# cat /proc/iomem 00000000-0009fbff : System RAM 0009fc00-0009ffff : reserved 000a0000-000bffff : Video RAM area 000c0000-000c7fff : Video ROM 000cc000-000ccfff : Extension ROM 000cd000-000cdfff : Extension ROM 000ce000-000cefff : Extension ROM 000cf000-000cffff : Extension ROM 000d0000-000d1fff : reserved 000f0000-000fffff : System ROM 00100000-0f7effff : System RAM 00100000-002391da : Kernel code 002391db-0028bdc3 : Kernel data 0f7f0000-0f7f7fff : ACPI Tables 0f7f8000-0f7fffff : ACPI Non-volatile Storage dde00000-dfefffff : PCI Bus #01 de800000-deffffff : PCI device 1023:8500 df000000-df7fffff : PCI device 1023:8500 dfee0000-dfefffff : PCI device 1023:8500 dfffc000-dfffcfff : PCI device 100b:0020 dfffc000-dfffcfff : eth4 dfffd000-dfffdfff : PCI device 100b:0020 dfffd000-dfffdfff : eth3 dfffe000-dfffefff : PCI device 100b:0020 dfffe000-dfffefff : eth2 dffff000-dfffffff : PCI device 100b:0020 dffff000-dfffffff : eth0 e0000000-e3ffffff : PCI device 1106:0601 fff80000-ffffffff : reserved [root@WSG-2503-75 sgupta]# cat /proc/pci PCI devices found: Bus 0, device 0, function 0: Class 0600: PCI device 1106:0601 (rev 5). Master Capable. Latency=8. Prefetchable 32 bit memory at 0xe0000000 [0xe3ffffff]. Bus 0, device 1, function 0: Class 0604: PCI device 1106:8601 (rev 0). Master Capable. No bursts. Min Gnt=12. Bus 0, device 7, function 0: Class 0601: PCI device 1106:0686 (rev 64). Bus 0, device 7, function 1: Class 0101: PCI device 1106:0571 (rev 6). Master Capable. Latency=32. I/O at 0xfc00 [0xfc0f]. Bus 0, device 7, function 2: Class 0c03: PCI device 1106:3038 (rev 26). IRQ 10. Master Capable. Latency=32. I/O at 0xec00 [0xec1f]. Bus 0, device 7, function 4: Class 0680: PCI device 1106:3057 (rev 64). Bus 0, device 8, function 0: Class 0200: PCI device 100b:0020 (rev 0). IRQ 11. Master Capable. Latency=32. Min Gnt=11.Max Lat=52. I/O at 0xe800 [0xe8ff]. Non-prefetchable 32 bit memory at 0xdffff000 [0xdfffffff]. Bus 0, device 9, function 0: Class 0200: PCI device 100b:0020 (rev 0). IRQ 12. Master Capable. Latency=32. Min Gnt=11.Max Lat=52. I/O at 0xe400 [0xe4ff]. Non-prefetchable 32 bit memory at 0xdfffe000 [0xdfffefff]. Bus 0, device 10, function 0: Class 0200: PCI device 100b:0020 (rev 0). IRQ 5. Master Capable. Latency=32. Min Gnt=11.Max Lat=52. I/O at 0xe000 [0xe0ff]. Non-prefetchable 32 bit memory at 0xdfffd000 [0xdfffdfff]. Bus 0, device 11, function 0: Class 0200: PCI device 100b:0020 (rev 0). IRQ 10. Master Capable. Latency=32. Min Gnt=11.Max Lat=52. I/O at 0xdc00 [0xdcff]. Non-prefetchable 32 bit memory at 0xdfffc000 [0xdfffcfff]. Bus 1, device 0, function 0: Class 0300: PCI device 1023:8500 (rev 106). IRQ 11. Master Capable. Latency=32. Non-prefetchable 32 bit memory at 0xdf000000 [0xdf7fffff]. Non-prefetchable 32 bit memory at 0xdfee0000 [0xdfefffff]. Non-prefetchable 32 bit memory at 0xde800000 [0xdeffffff]. [root@WSG-2503-75 sgupta]# cat /proc/modules ipt_MARK 696 3 (autoclean) ipt_MASQUERADE 1240 1 (autoclean) ipt_REDIRECT 696 4 (autoclean) ipt_state 472 2 (autoclean) iptable_mangle 2008 1 (autoclean) iptable_filter 1612 1 (autoclean) ip_nat_ftp 2608 0 (unused) iptable_nat 15448 2 [ipt_MASQUERADE ipt_REDIRECT ip_nat_ftp] ip_conntrack_ftp 3728 1 ip_conntrack 19272 1 [ipt_MASQUERADE ipt_REDIRECT ipt_state ip_nat_ftp iptable_nat ip_conntrack_ftp] ip_tables 11552 9 [ipt_MARK ipt_MASQUERADE ipt_REDIRECT ipt_state iptable_mangle iptable_filter iptable_nat] natsemi 14464 4 tun 3968 0 pppoe 7276 0 pppox 1096 1 [pppoe] ppp_generic 17880 0 [pppoe pppox] slhc 4832 0 [ppp_generic] [root@WSG-2503-75 sgupta]# uname -a Linux WSG-2503-75 2.4.26 #2 Mon Oct 25 12:20:32 PDT 2004 i686 unknown
SCREEN DUMP OF THE PROBLEM
---------------------------------------------------------------------------- After a fresh boot. ---------------------------------------------------------------------------- [root@WSG-2503-75 sgupta]# fsck -fn /dev/hdc1 fsck 1.29 (24-Sep-2002) e2fsck 1.29 (24-Sep-2002) Warning! /dev/hdc1 is mounted. 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 /dev/hdc1: 207/272 files (1.9% non-contiguous), 979/2160 blocks [root@WSG-2503-75 sgupta]# cd /etc/rc.d [root@WSG-2503-75 rc.d]# rm rc.firewall~ rm: remove `rc.firewall~'? y [root@WSG-2503-75 rc.d]# cd / ---------------------------------------------------------------------------- After a deleting a file. ---------------------------------------------------------------------------- [root@WSG-2503-75 /]# fsck -fn /dev/hdc1 fsck 1.29 (24-Sep-2002) e2fsck 1.29 (24-Sep-2002) Warning! /dev/hdc1 is mounted. Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Entry 'rc.firewall~' in /rc.d (76) has deleted/unused inode 73. Clear? no
Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information
/dev/hdc1: ********** WARNING: Filesystem still has errors **********
/dev/hdc1: 206/272 files (1.9% non-contiguous), 963/2160 blocks ---------------------------------------------------------------------------- All mounted fs. Note that /dev/hdc1 is mounted rw,sync,dirsync. So there should be no caching. ---------------------------------------------------------------------------- [root@WSG-2503-75 /]# mount /dev/hdc1 on /etc type ext2 (rw,sync,dirsync) proc on /proc type proc (rw) /dev/hdc3 on /boot type ext2 (ro) devpts on /dev/pts type devpts (rw) tmpfs on /tmp type tmpfs (rw) /dev/hdc6 on /home type ext2 (rw) ---------------------------------------------------------------------------- bdflush and kupdated is running. ---------------------------------------------------------------------------- [root@WSG-2503-75 /]# ps -ef | grep bdflush root 5 1 0 15:01 ? 00:00:00 [bdflush] [root@WSG-2503-75 /]# ps -ef | grep kupdated root 6 1 0 15:01 ? 00:00:00 [kupdated] [root@WSG-2503-75 /]# /home/sgupta/bdflush -d bdflush version 1.4 0: 30 Max fraction of LRU list to examine for dirty blocks 1: 500 Max number of dirty blocks to write each time bdflush activated 2: 0 Num of clean buffers to be loaded onto free list by refill_freelist 3: 0 Dirty block threshold for activating bdflush in refill_freelist 4: 500 Percentage of cache to scan for free clusters 5: 3000 Time for data buffers to age before flushing 6: 60 Time for non-data (dir, bitmap, etc) buffers to age before flushing 7: 20 Time buffer cache load average constant 8: 0 LAV ratio (used to determine threshold for buffer fratricide). ---------------------------------------------------------------------------- Setting the flush values to 5 seconds in case its not set to defaults. ---------------------------------------------------------------------------- [root@WSG-2503-75 /]# /home/sgupta/bdflush -s 5 -f 5 [root@WSG-2503-75 /]# date Thu Mar 3 16:12:49 UTC 2005 [root@WSG-2503-75 /]# date Thu Mar 3 16:13:33 UTC 2005 ---------------------------------------------------------------------------- Running fsck after 5 seconds shows up same error in fsck. ---------------------------------------------------------------------------- [root@WSG-2503-75 /]# !fsck fsck -fn /dev/hdc1 fsck 1.29 (24-Sep-2002) e2fsck 1.29 (24-Sep-2002) Warning! /dev/hdc1 is mounted. Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Entry 'rc.firewall~' in /rc.d (76) has deleted/unused inode 73. Clear? no
Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information
/dev/hdc1: ********** WARNING: Filesystem still has errors **********
/dev/hdc1: 206/272 files (1.9% non-contiguous), 963/2160 blocks ---------------------------------------------------------------------------- Unmount /dev/hdc1 and remount. This _fixes_ the fsck error issues. ---------------------------------------------------------------------------- [root@WSG-2503-75 scripts]# cd / [root@WSG-2503-75 /]# !fuser fuser -mv /etc [root@WSG-2503-75 /]# umount /etc [root@WSG-2503-75 /]# mount -n /dev/hdc1 /etc [root@WSG-2503-75 /]# mount /dev/hdc1 on /etc type ext2 (rw,sync,dirsync) proc on /proc type proc (rw) /dev/hdc3 on /boot type ext2 (ro) devpts on /dev/pts type devpts (rw) tmpfs on /tmp type tmpfs (rw) /dev/hdc6 on /home type ext2 (rw) [root@WSG-2503-75 /]# !fsck fsck -fn /dev/hdc1 fsck 1.29 (24-Sep-2002) e2fsck 1.29 (24-Sep-2002) Warning! /dev/hdc1 is mounted. 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 /dev/hdc1: 206/272 files (1.9% non-contiguous), 963/2160 blocks [root@WSG-2503-75 /]# df -k Filesystem 1k-blocks Used Available Use% Mounted on /dev/hdc1 2121 923 1090 46% /etc /dev/hdc3 1058 129 875 13% /boot tmpfs 124324 26300 98024 22% /tmp /dev/hdc6 187210 99520 78025 57% /home [root@WSG-2503-75 /]# df -i Filesystem Inodes IUsed IFree IUse% Mounted on /dev/hdc1 272 205 67 76% /etc /dev/hdc3 136 16 120 12% /boot tmpfs 31081 198 30883 1% /tmp /dev/hdc6 48384 76 48308 1% /home
---------------------------------------------------------------------------- On a normal HARDDISK Redhat 7.2 Linux box running 2.4.16 kernel. ---------------------------------------------------------------------------- [root@budda root]# mount /dev/hda7 on / type ext3 (rw) none on /proc type proc (rw) usbdevfs on /proc/bus/usb type usbdevfs (rw) /dev/hda1 on /boot type ext3 (rw) none on /dev/pts type devpts (rw,gid=5,mode=620) none on /dev/shm type tmpfs (rw) /dev/hda2 on /tmp type ext3 (rw) /dev/hda3 on /usr type ext3 (rw) /dev/hda5 on /var type ext3 (rw) /dev/hdb1 on /tmp/hdb1 type ext2 (rw) [root@budda root]# !fsck fsck -fn /dev/hdb1 Parallelizing fsck version 1.23 (15-Aug-2001) e2fsck 1.23, 15-Aug-2001 for EXT2 FS 0.5b, 95/08/09 Warning! /dev/hdb1 is mounted. 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 /dev/hdb1: 17/2056320 files (0.0% non-contiguous), 64542/4112640 blocks You have new mail in /var/spool/mail/root [root@budda root]# rm /tmp/hdb1/lolo/xxx rm: remove `/tmp/hdb1/lolo/xxx'? y [root@budda root]# !fsck fsck -fn /dev/hdb1 Parallelizing fsck version 1.23 (15-Aug-2001) e2fsck 1.23, 15-Aug-2001 for EXT2 FS 0.5b, 95/08/09 Warning! /dev/hdb1 is mounted. 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 /dev/hdb1: 16/2056320 files (0.0% non-contiguous), 64541/4112640 blocks [root@budda root]# mount /dev/hda7 on / type ext3 (rw) none on /proc type proc (rw) usbdevfs on /proc/bus/usb type usbdevfs (rw) /dev/hda1 on /boot type ext3 (rw) none on /dev/pts type devpts (rw,gid=5,mode=620) none on /dev/shm type tmpfs (rw) /dev/hda2 on /tmp type ext3 (rw) /dev/hda3 on /usr type ext3 (rw) /dev/hda5 on /var type ext3 (rw) /dev/hdb1 on /tmp/hdb1 type ext2 (rw)
.config file attached with mail. Please let me know if you need some more details.
Thanks, santosh
[unhandled content-type:application/octet-stream] | |