S
S
Shlyahten2017-03-15 20:05:22
linux
Shlyahten, 2017-03-15 20:05:22

Why is the memory size displayed incorrectly in OpenWrt?

I installed the firmware on Dir-320 A2 according to the instructions: webapp.org.ua/dev/openwrt-chaos-calmer-15-05-on-dl...
It hung on the point with extroot. I have a 2GB flash drive. I shared it in Windows in Partition manager Free. 1 partition 64 mb - swap, the rest in half are two ext4 partitions under overlay and data.
At first I used fstab from the instructions and nothing was mounted, then I took the manual from here https://wiki.openwrt.org/ru/doc/howto/extroot as a basis and everything seemed to be mounted, but the df - h output scares me:

[email protected]:/overlay# df -h
Filesystem                Size      Used Available Use% Mounted on
rootfs                  888.2M     16.0E    885.1M 100% /
/dev/root                 2.3M      2.3M         0 100% /rom
tmpfs                    14.2M     44.0K     14.2M   0% /tmp
/dev/sda2               888.2M     16.0E    885.1M 100% /overlay
overlayfs:/overlay      888.2M     16.0E    885.1M 100% /
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/sda3               888.2M     16.0E    892.6M 100% /data

Notice the Used/Use
column for some additional information:
[email protected]:/overlay# logread | grep "sda"
Tue Mar  1 08:30:14 2016 kern.notice kernel: [    7.280000] sd 0:0:0:0: [sda] 4030464 512-byte logical blocks: (2.06 GB/1.92 GiB)
Tue Mar  1 08:30:14 2016 kern.notice kernel: [    7.300000] sd 0:0:0:0: [sda] Write Protect is off
Tue Mar  1 08:30:14 2016 kern.debug kernel: [    7.300000] sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00
Tue Mar  1 08:30:14 2016 kern.err kernel: [    7.320000] sd 0:0:0:0: [sda] No Caching mode page found
Tue Mar  1 08:30:14 2016 kern.err kernel: [    7.320000] sd 0:0:0:0: [sda] Assuming drive cache: write through
Tue Mar  1 08:30:14 2016 kern.info kernel: [    7.370000]  sda: sda1 sda2 sda3
Tue Mar  1 08:30:14 2016 kern.notice kernel: [    7.380000] sd 0:0:0:0: [sda] Attached SCSI removable disk
Tue Mar  1 08:30:14 2016 kern.warn kernel: [   11.890000] EXT4-fs (sda2): warning: mounting fs with errors, running e2fsck is recommended
Tue Mar  1 08:30:14 2016 kern.info kernel: [   11.900000] EXT4-fs (sda2): recovery complete
Tue Mar  1 08:30:14 2016 kern.info kernel: [   11.910000] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts:
Tue Mar  1 08:30:14 2016 kern.crit kernel: [   11.940000] EXT4-fs error (device sda2): ext4_mb_generate_buddy:757: group 118, block bitmap and bg descriptor inconsistent: 7677 vs 65021 free clusters
Tue Mar  1 08:30:14 2016 kern.info kernel: [   13.630000] Adding 64508k swap on /dev/sda1.  Priority:-1 extents:1 across:64508k
Tue Mar  1 08:30:14 2016 kern.info kernel: [   13.920000] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts:
Tue Mar  1 08:30:14 2016 kern.warn kernel: [   17.060000] JBD2: Spotted dirty metadata buffer (dev = sda2, blocknr = 1). There's a risk of filesystem corruption in case of system crash.
Tue Mar  1 08:30:14 2016 kern.warn kernel: [   17.310000] JBD2: Spotted dirty metadata buffer (dev = sda2, blocknr = 1). There's a risk of filesystem corruption in case of system crash.
Tue Mar  1 08:30:18 2016 daemon.err block: /dev/sda2 is already mounted
Tue Mar  1 08:30:18 2016 daemon.err block: /dev/sda3 is already mounted
Tue Mar  1 08:35:05 2016 kern.notice kernel: [  312.800000] EXT4-fs (sda2): error count since last fsck: 12
Tue Mar  1 08:35:05 2016 kern.notice kernel: [  312.800000] EXT4-fs (sda2): initial error at time 1456820212: ext4_mb_generate_buddy:757
Tue Mar  1 08:35:05 2016 kern.notice kernel: [  312.810000] EXT4-fs (sda2): last error at time 11: ext4_mb_generate_buddy:757


[email protected]:/overlay# cat /etc/config/fstab
config 'global'
        option  anon_swap       '0'
        option  anon_mount      '0'
        option  auto_swap       '1'
        option  auto_mount      '1'
        option  delay_root      '5'
        option  check_fs        '0'

config 'swap'
        option  device  '/dev/sda1'
        option  enabled '1'

config 'mount'
        option  target  '/overlay'
        option  uuid    'd0df3d10-9b9d-d201-c0d6-3c109b9dd201'
        option  fstype  'ext4'
        option  enabled '1'

config 'mount'
        option  target  '/data'
        option  uuid    'd19d0335-9b9d-d201-d00d-03359b9dd201'
        option  enabled '1'

But block detect gives something else, even though I'm not a Linux expert:
[email protected]:/overlay# block detect
config 'global'
        option  anon_swap       '0'
        option  anon_mount      '0'
        option  auto_swap       '1'
        option  auto_mount      '1'
        option  delay_root      '5'
        option  check_fs        '0'

config 'swap'
        option  device  '/dev/sda1'
        option  enabled '0'

config 'mount'
        option  target  '/mnt/sda2'
        option  uuid    'd0df3d10-9b9d-d201-c0d6-3c109b9dd201'
        option  enabled '0'

config 'mount'
        option  target  '/mnt/sda3'
        option  uuid    'd19d0335-9b9d-d201-d00d-03359b9dd201'
        option  enabled '0'

I hope this information will be enough.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Shlyahten, 2017-03-17
@Shlyahten

The problem seems to be in the Partition Manager program. After I formatted the flash drive on a Debian 8 machine, everything began to display normally!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question