OpenWrt Forum Archive

Topic: filesystem become readonly

The content of this topic has been archived on 2 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

My Box is Atom D525 cpu , 16G CF compact Flash Card and has four carl9170 wireless netcard.
I compile the firmware from trunk 33311, running airodump-ng for a while, the rootfs filesystem become readonly.
After reboot, it becom normal!

Is there anyone who can tell me how to debug the problem.

(Last edited by zhuizhuhaomeng on 4 Sep 2012, 06:36)

My system Information
root@OpenWrt:/# fdisk -l

Disk /dev/sda: 16.0 GB, 16000221184 bytes
255 heads, 63 sectors/track, 1945 cylinders, total 31250432 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63       17135        8536+  83  Linux
/dev/sda2           17199      149183       65992+  83  Linux
/dev/sda3          150000    31250431    15550216   83  Linux


root@OpenWrt:/# cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 28
model name      : Intel(R) Atom(TM) CPU D525   @ 1.80GHz
stepping        : 10
microcode       : 0x107
cpu MHz         : 1800.190
cache size      : 512 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm dts
bogomips        : 3600.38
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 28
model name      : Intel(R) Atom(TM) CPU D525   @ 1.80GHz
stepping        : 10
microcode       : 0x107
cpu MHz         : 1800.190
cache size      : 512 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 2
apicid          : 1
initial apicid  : 1
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm dts
bogomips        : 3600.38
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 2
vendor_id       : GenuineIntel
cpu family      : 6
model           : 28
model name      : Intel(R) Atom(TM) CPU D525   @ 1.80GHz
stepping        : 10
microcode       : 0x107
cpu MHz         : 1800.190
cache size      : 512 KB
physical id     : 0
siblings        : 4
core id         : 1
cpu cores       : 2
apicid          : 2
initial apicid  : 2
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm dts
bogomips        : 3600.38
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 3
vendor_id       : GenuineIntel
cpu family      : 6
model           : 28
model name      : Intel(R) Atom(TM) CPU D525   @ 1.80GHz
stepping        : 10
microcode       : 0x107
cpu MHz         : 1800.190
cache size      : 512 KB
physical id     : 0
siblings        : 4
core id         : 1
cpu cores       : 2
apicid          : 3
initial apicid  : 3
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm dts
bogomips        : 3600.38
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

root@OpenWrt:/# mount
rootfs on / type rootfs (rw)
/dev/root on / type ext4 (ro,noatime,user_xattr,barrier=1)
none on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime,size=1032296k)
tmpfs on /dev type tmpfs (rw,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,noatime,mode=600)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
/dev/sda3 on /opt type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered)
none on /proc/bus/usb type usbfs (rw,relatime)


Reproduce Step

ifconfig wlan0 down
iwconfig wlan0 mode monitor
ifconfig wlan0 up

ifconfig wlan1 down
iwconfig wlan1 mode monitor
ifconfig wlan2 up

cd /opt
airodump-ng -w wifi wlan0,wlan1


root@OpenWrt:/opt# mount
rootfs on / type rootfs (rw)
/dev/root on / type ext4 (ro,noatime,user_xattr,barrier=1)
none on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime,size=1032296k)
tmpfs on /dev type tmpfs (rw,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,noatime,mode=600)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
/dev/sda3 on /opt type ext4 (ro,relatime,user_xattr,barrier=1,data=ordered)
none on /proc/bus/usb type usbfs (rw,relatime)

(Last edited by zhuizhuhaomeng on 4 Sep 2012, 06:41)

Look into the "dmesg" output for clues, it should contain the reason for the remounting.

wireless dirver has lot of "invalid plcp cck rate (0)", i don't wether is matters or not ?

[ 1749.019627] ieee80211 phy1: invalid plcp cck rate (0).
[ 1749.138697] ieee80211 phy2: invalid plcp cck rate (0).
[ 1752.553566] net_ratelimit: 8 callbacks suppressed
[ 1752.553576] ieee80211 phy2: invalid plcp cck rate (0).

[ 1752.946575] ata1.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[ 1752.946592] ata1.01: cmd ca/00:08:f0:4a:42/00:00:00:00:00/f0 tag 0 dma 4096 out
[ 1752.946595]          res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)

[ 1753.338951] ieee80211 phy2: invalid plcp cck rate (0).
[ 1755.975619] ieee80211 phy1: invalid plcp cck rate (0).

[ 1757.986489] ata1: link is slow to respond, please be patient (ready=0)

[ 1758.680132] net_ratelimit: 9 callbacks suppressed
[ 1758.680141] ieee80211 phy1: invalid plcp cck rate (0).
[ 1761.939510] ieee80211 phy1: invalid plcp cck rate (0).
[ 1762.180387] ieee80211 phy1: invalid plcp cck rate (0).

[ 1762.966846] ata1: device not ready (errno=-16), forcing hardreset
[ 1762.966860] ata1: soft resetting link
[ 1763.126708] ata1.01: both IDENTIFYs aborted, assuming NODEV
[ 1763.126715] ata1.01: revalidation failed (errno=-2)

[ 1763.801506] net_ratelimit: 4 callbacks suppressed
[ 1763.801515] ieee80211 phy0: invalid plcp cck rate (0).
[ 1763.841630] ieee80211 phy0: invalid plcp cck rate (0).
[ 1765.329759] ieee80211 phy1: invalid plcp cck rate (0).

[ 1768.126406] ata1: soft resetting link
[ 1768.286649] ata1.01: both IDENTIFYs aborted, assuming NODEV
[ 1768.286656] ata1.01: revalidation failed (errno=-2)
[ 1773.286348] ata1: soft resetting link
inode 130938 (offset 0 size 4096 starting block 575943)
[ 1773.475119] sd 0:0:1:0: [sda] Unhandled error code
[ 1773.475125] sd 0:0:1:0: [sda]  Result: hostbyte=0x04 driverbyte=0x00
[ 1773.475133] sd 0:0:1:0: [sda] CDB: cdb[0]=0x2a: 2a 00 00 46 4e 00 00 00 08 00
[ 1773.475149] end_request: I/O error, dev sda, sector 4607488
[ 1773.475157] Buffer I/O error on device sda3, logical block 557186
[ 1773.475168] EXT4-fs warning (device sda3): ext4_end_bio:250: I/O error writing to inode 130936 (offset 0 size 4096 starting block 575937)
[ 1773.475189] EXT4-fs error (device sda3): ext4_read_block_bitmap:396: comm flush-8:0: Cannot read block bitmap - block_group = 97, block_bitmap = 3145729
[ 1773.475204] EXT4-fs (sda3): delayed block allocation failed for inode 784936 at logical offset 0 with max blocks 2 with error -5
[ 1773.475212] EXT4-fs (sda3): This should not happen!! Data will be lost
[ 1773.475215]
[ 1773.475616] sd 0:0:1:0: [sda] Unhandled error code
[ 1773.475621] sd 0:0:1:0: [sda]  Result: hostbyte=0x04 driverbyte=0x00
[ 1773.475628] sd 0:0:1:0: [sda] CDB: cdb[0]=0x2a: 2a 00 00 06 75 f0 00 03 68 00
[ 1773.475643] end_request: I/O error, dev sda, sector 423408
[ 1773.475651] Buffer I/O error on device sda3, logical block 34176
[ 1773.475659] Buffer I/O error on device sda3, logical block 34177
[ 1773.475665] Buffer I/O error on device sda3, logical block 34178
[ 1773.475672] Buffer I/O error on device sda3, logical block 34179
[ 1773.475679] Buffer I/O error on device sda3, logical block 34180
[ 1773.475686] Buffer I/O error on device sda3, logical block 34181
[ 1773.475692] Buffer I/O error on device sda3, logical block 34182
[ 1773.475699] Buffer I/O error on device sda3, logical block 34183
[ 1773.475706] Buffer I/O error on device sda3, logical block 34184
[ 1773.475714] Buffer I/O error on device sda3, logical block 34185
[ 1773.475721] Buffer I/O error on device sda3, logical block 34186
[ 1773.475729] Buffer I/O error on device sda3, logical block 34187
[ 1773.475736] Buffer I/O error on device sda3, logical block 34188
[ 1773.475769] Buffer I/O error on device sda3, logical block 34189
[ 1773.475776] Buffer I/O error on device sda3, logical block 34190
[ 1773.475783] Buffer I/O error on device sda3, logical block 34191
[ 1773.475790] Buffer I/O error on device sda3, logical block 34192
[ 1773.475797] Buffer I/O error on device sda3, logical block 34193
[ 1773.475803] Buffer I/O error on device sda3, logical block 34194
[ 1773.475810] Buffer I/O error on device sda3, logical block 34195
[ 1773.475817] Buffer I/O error on device sda3, logical block 34196
[ 1773.475824] Buffer I/O error on device sda3, logical block 34197
[ 1773.475831] Buffer I/O error on device sda3, logical block 34198
[ 1773.475837] Buffer I/O error on device sda3, logical block 34199

(Last edited by zhuizhuhaomeng on 4 Sep 2012, 09:58)

Is there anyone who can tell me what should I do next?

Anyone has any suggestion

The discussion might have continued from here.