"running e2fsck is recommended"

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Goto page Previous  1, 2, 3  Next
Author Message
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2927
Location: Germany

PostPosted: Sun Jan 29, 2023 20:07    Post subject: Reply with quote
I don't know, what is the jffs partition used for?
There was a recent commit in the svn tracker that I didn't investigate but it might be related.

https://svn.dd-wrt.com/changeset/51511

Could of course also be due to flash wear out - who knows
Sponsor
Milax
DD-WRT User


Joined: 24 Oct 2020
Posts: 175

PostPosted: Sun Jan 29, 2023 20:20    Post subject: Reply with quote
ho1Aetoo wrote:
I don't know, what is the jffs partition used for?
There was a recent commit in the svn tracker that I didn't investigate but it might be related.

https://svn.dd-wrt.com/changeset/51511

Could of course also be due to flash wear out - who knows


My understanding was that jffs partition may be used to store some temporary files like log files, or data (metadata) from minidlna (i use minidlna service). May be i'm wrong
Milax
DD-WRT User


Joined: 24 Oct 2020
Posts: 175

PostPosted: Mon Jan 30, 2023 18:15    Post subject: Reply with quote
About MiniDLNA and jffs:



About logs on jffs(from "DDWRT USB storage and NAS v3.pdf", don't know if there's a newer version) :

ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2927
Location: Germany

PostPosted: Mon Jan 30, 2023 18:41    Post subject: Reply with quote
Well, the file system should not be damaged by a reboot.
If you reboot devices properly, processes are terminated and file systems are unmounted.

But if you simply disconnect the power while data is being written, this can cause errors.
And ext2 has no journal, if you use the filesystem as a drive on which you write regularly, you will always have problems with it - caused by power failures or your own flipping of the switch.

But usually not so much is written in the log.

It is also possible that your USB stick is worn out and slowly dying.
Or in the last dd-wrt builds something was defective.

I have no idea, I haven't read anything about USB problems and I don't use a USB stick at the moment.
Milax
DD-WRT User


Joined: 24 Oct 2020
Posts: 175

PostPosted: Mon Jan 30, 2023 19:37    Post subject: Reply with quote
ho1Aetoo wrote:
Well, the file system should not be damaged by a reboot.
If you reboot devices properly, processes are terminated and file systems are unmounted.

But if you simply disconnect the power while data is being written, this can cause errors.
And ext2 has no journal, if you use the filesystem as a drive on which you write regularly, you will always have problems with it - caused by power failures or your own flipping of the switch.

But usually not so much is written in the log.

It is also possible that your USB stick is worn out and slowly dying.
Or in the last dd-wrt builds something was defective.

I have no idea, I haven't read anything about USB problems and I don't use a USB stick at the moment.


Thanks ho1Aetoo,

May be the guide that i followed (https://forum.dd-wrt.com/phpBB2/download.php?id=50452) is outdated, it recommends ext2 for flash usb and ext4 for hard drives (don't know why):



The usb stick i use is from a good brand and less than 2 years old. Also, scan on Mac/PC don't detect any error. May be i should just try ext 4.

I'd have prefered formating disks directly from the router, may be i could install e2fsprogs on "opt" ?
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2927
Location: Germany

PostPosted: Mon Jan 30, 2023 19:45    Post subject: Reply with quote
I know the guide, the syslog code is from me.
It is often argued that a journal needs more write cycles and the flash memory is worn out faster.

Maybe, I personally don't use ext2.
I have used ext3 for years and since several years only ext4.

You can certainly install the e2fsprogs via entware.
But on an undamaged partition.
Milax
DD-WRT User


Joined: 24 Oct 2020
Posts: 175

PostPosted: Mon Jan 30, 2023 20:09    Post subject: Reply with quote
ho1Aetoo wrote:
I know the guide, the syslog code is from me.
It is often argued that a journal needs more write cycles and the flash memory is worn out faster.

Maybe, I personally don't use ext2.
I have used ext3 for years and since several years only ext4.

You can certainly install the e2fsprogs via entware.
But on an undamaged partition.


Ok, I'll convert to ext4 and see what happens
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6410
Location: UK, London, just across the river..

PostPosted: Mon Jan 30, 2023 23:13    Post subject: Reply with quote
hmmm i thought in ddwrt on thumb drives journaling fs is disabled by default ..in this case this is ext3 but as usual recognised as ext4, as this is the only lsmod all ext2, 3 are ext4

this is dmesg output

[ 52.810048] scsi 1:0:0:0: Direct-Access SanDisk Cruzer Blade 1.00 PQ: 0 ANSI: 6
[ 52.812675] sd 1:0:0:0: [sda] 15232000 512-byte logical blocks: (7.80 GB/7.26 GiB)
[ 52.818552] sd 1:0:0:0: [sda] Write Protect is off
[ 52.824674] sd 1:0:0:0: [sda] Mode Sense: 43 00 00 00
[ 52.825115] sd 1:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 52.839647] sda: sda1
[ 52.842960] sd 1:0:0:0: [sda] Attached SCSI removable disk
[ 54.210911] EXT4-fs (sda1): Ignoring removed nobh option
[ 54.227696] EXT4-fs (sda1): warning: mounting unchecked fs, running e2fsck is recommended
[ 54.232101] EXT4-fs (sda1): mounted filesystem without journal. Opts: init_itable=0,nobarrier,nobh,barrier=0

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55179 WAP
TP-Link WR1043NDv2 -DD-WRT 55303 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55460 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55460 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55363 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2927
Location: Germany

PostPosted: Tue Jan 31, 2023 9:40    Post subject: Reply with quote
there is nowhere the type of the file system mentioned and "EXT4-fs" is the name of the kernel module.

USB-stick with ext4


Code:
[ 1096.683566] sd 1:0:0:0: [sda] Attached SCSI removable disk
[ 1097.986767] EXT4-fs (sda2): Ignoring removed nobh option
[ 1097.987405] EXT4-fs (sda1): Ignoring removed nobh option
[ 1098.013475] EXT4-fs (sda2): barriers disabled
[ 1098.025799] EXT4-fs (sda1): barriers disabled
[ 1098.027786] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: init_itable=0,nobarrier,nobh,barrier=0
[ 1098.050232] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: init_itable=0,nobarrier,nobh,barrier=0


Quote:
data=ordered (*) All data are forced directly out to the main file system prior to its metadata being committed to the journal.

    root@DD-WRT:~# tune2fs -l /dev/sda1
    tune2fs 1.45.4 (23-Sep-2019)
    Filesystem volume name: opt
    Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
    Filesystem state: clean
Milax
DD-WRT User


Joined: 24 Oct 2020
Posts: 175

PostPosted: Tue Jan 31, 2023 21:26    Post subject: Reply with quote
I converted flash drive (opt, jffs) to ext 4, also installed entware then e2fsprogs and tune2fs packages. When executing tune2fs -l /dev/sda1 command, i have : Filesystem state: clean:

Quote:
root@DD-WRT:/opt# tune2fs -l /dev/sda1
tune2fs 1.46.5 (30-Dec-2021)
Filesystem volume name: Backup
Last mounted on: /tmp/mnt/sda1
Filesystem UUID: f0be6719-ece1-d601-60b0-6619ece1d601
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr filetype needs_recovery extent flex_bg sparse_super large_file huge_file extra_isize
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 268435456
Block count: 268435200
Reserved block count: 13421760
Free blocks: 31905576
Free inodes: 268435442
First block: 0
Block size: 4096
Fragment size: 4096
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 32768
Inode blocks per group: 2048
Last mount time: Thu Jan 1 01:00:42 1970
Last write time: Thu Jan 1 01:00:42 1970
Mount count: 597
Maximum mount count: 20
Last checked: Sun Jan 3 18:18:40 2021
Check interval: 15552000 (6 months)
Next check after: Fri Jul 2 18:18:40 2021
Lifetime writes: 1307 GB
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 256
Journal inode: 8


Same when executing tune2fs -l /dev/sda2:

Code:
root@DD-WRT:/opt# tune2fs -l /dev/sda2
tune2fs 1.46.5 (30-Dec-2021)
Filesystem volume name:   <none>
Last mounted on:          /tmp/mnt/sda2
Filesystem UUID:          f5ffff65-f0e1-d601-b0f7-e765f0e1d601
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr filetype needs_recovery extent flex_bg sparse_super large_file huge_file extra_isize
Default mount options:    (none)
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              708345856
Block count:              708318976
Reserved block count:     35415948
Free blocks:              590956814
Free inodes:              708331637
First block:              0
Block size:               4096
Fragment size:            4096
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         32768
Inode blocks per group:   2048
Last mount time:          Thu Jan  1 01:00:43 1970
Last write time:          Thu Jan  1 01:00:43 1970
Mount count:              597
Maximum mount count:      20
Last checked:             Sun Jan  3 18:49:27 2021
Check interval:           15552000 (6 months)
Next check after:         Fri Jul  2 18:49:27 2021
Lifetime writes:          181 GB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:             256
Journal inode:            8


However, i'm a bit lost and confused by message when executing e2fsck /mnt/sda2 (or sda1, same message, even whith command e2fsck -f -C 0 /mnt/sda2, same result:

Quote:
root@DD-WRT:~# e2fsck -b 32768 /mnt/sda2
e2fsck 1.46.5 (30-Dec-2021)
e2fsck: Is a directory while trying to open /mnt/sda2

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>


What is this superblock thing ? knowing that the files are accessible on the drive that seems to work properly ? The suggested commands e2fsck -b 8193 and e2fsck -b 32768 didn't help
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14125
Location: Texas, USA

PostPosted: Tue Jan 31, 2023 21:40    Post subject: Reply with quote
Milax wrote:
What is this superblock thing ?


Code:
superblock: A segment of metadata describing the file system on a block device.


And I don't recall ever running any kind of fsck utility on a partition or mounted file system.

https://linux.die.net/man/8/e2fsck

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
Milax
DD-WRT User


Joined: 24 Oct 2020
Posts: 175

PostPosted: Tue Jan 31, 2023 21:45    Post subject: Reply with quote
Alozaros wrote:
to be able to check those you'd need to unmount them first...

example:
umount /dev/sda1
e2fsck /dev/sda1

or

e2fsck -f -C 0 /dev/sdb1 --- checks and repairs error in partition linux


Checks were executed after umount command, as recommended by Alozaros
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14125
Location: Texas, USA

PostPosted: Tue Jan 31, 2023 22:10    Post subject: Reply with quote
Okay. Not sure what the significance of 0 is in his example, and wondering if he meant -c and not -C. The -b 32768 should be valid, but you can try without that and use -B 4096, since that is the reported block size.

EDIT: I didn't read the man page completely.
Quote:
If the file descriptor specified is 0, e2fsck will print a completion bar as it goes about its business. This requires that e2fsck is running on a video console or terminal.

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6410
Location: UK, London, just across the river..

PostPosted: Tue Jan 31, 2023 23:05    Post subject: Reply with quote
as your installations are on entware/usb-drive there is no way to unmount it and than use those app's Smile inn it.. Embarassed

Best bet scan those on proper linux installation..no idea how to make it with sucking Win..but there some progs like partition magic and ect. that can scan repair linux partitions...similar like...

and you can run a scan with -c too... Cool

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55179 WAP
TP-Link WR1043NDv2 -DD-WRT 55303 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55460 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55460 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55363 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
Milax
DD-WRT User


Joined: 24 Oct 2020
Posts: 175

PostPosted: Wed Feb 01, 2023 5:57    Post subject: Reply with quote
Alozaros wrote:
as your installations are on entware/usb-drive there is no way to unmount it and than use those app's Smile inn it.. Embarassed

Best bet scan those on proper linux installation..no idea how to make it with sucking Win..but there some progs like partition magic and ect. that can scan repair linux partitions...similar like...

and you can run a scan with -c too... Cool


After formatting flash drive with opt and jffs (sdb1, sdb2) (ext 4), there is no more issues at this stage on dmesg but running e2fsck is still recommended for the separate hard drive (sda 1, sda2), that's why i unmounted it and ran the scan. I'll try to run it with -c, thanks
Goto page Previous  1, 2, 3  Next Display posts from previous:    Page 2 of 3
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum