"running e2fsck is recommended"

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


Joined: 24 Oct 2020
Posts: 175

PostPosted: Wed Feb 01, 2023 6:03    Post subject: Reply with quote
kernel-panic69 wrote:
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.


Thanks kernel-panic69, i'll try with -B 4096. If not successful, there's still an option to scan/repair on a computer. I was reluctant to do this because of the thousands of media files that i have on this drive.
Sponsor
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2963
Location: Germany

PostPosted: Wed Feb 01, 2023 10:20    Post subject: Reply with quote
Milax wrote:
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



/mnt/sda2 is a directory and not a drive, the drive would be /dev/sda2

Code:
root@DD-WRT:~# umount /dev/sda1
root@DD-WRT:~# e2fsck /dev/sda1

e2fsck 1.45.4 (23-Sep-2019)
clean, 11/248992 files, 33966/995328 blocks

# -f                   Force checking even if filesystem is marked clean

root@DD-WRT:~# e2fsck -f /dev/sda1
e2fsck 1.45.4 (23-Sep-2019)
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
opt: 11/248992 files (0.0% non-contiguous), 33966/995328 blocks


By the way, you cannot check /dev/sdb2 (/opt) if you have installed the e2fsprogs on it.
but if the file system is "clean" then it is "clean" and you do not need to check it as I have written before

Milax wrote:
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


yes because the maximum mount count is reached

Milax wrote:
root@DD-WRT:/opt# tune2fs -l /dev/sda1
tune2fs 1.46.5 (30-Dec-2021)

Mount count: 597
Maximum mount count: 20

[ 44.047995] EXT4-fs (sda2): warning: maximal mount count reached, running e2fsck is recommended
[ 44.310665] EXT4-fs (sda1): warning: maximal mount count reached, running e2fsck is recommended


but that means nothing at all and you can set the parameter yourself

Code:
tune2fs -c -1 /dev/sda1


the command sets the "max-mounts-count" to infinity

if the file system is damaged it is recommended to use the -p switch otherwise you have to confirm 1000 changes manually

Code:
#  -p                   Automatic repair (no questions)

e2fsck -p /dev/sda1
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2963
Location: Germany

PostPosted: Wed Feb 01, 2023 12:34    Post subject: Reply with quote
Another thing that came to mind...

Milax wrote:

Code:
root@DD-WRT:/opt# tune2fs -l /dev/sda1
tune2fs 1.46.5 (30-Dec-2021)

Reserved block count:     13421760


Code:
root@DD-WRT:/opt# tune2fs -l /dev/sda2
tune2fs 1.46.5 (30-Dec-2021)

Reserved block count:     35415948




You can still set the reserved blocks to 0.
This is a default setting for multiuser systems and for filesystems used as rootfs.
5% of the total capacity is reserved for processes running with root privileges.

Since neither of these applies, you can also set the reserved blocks to 0 and unlock the total capacity.


Code:
tune2fs -m 0 /dev/sda1
tune2fs -m 0 /dev/sda2


It might be noticeable if you connect the hard disk to a PC and try to copy data to it with a "non-root user".
Milax
DD-WRT User


Joined: 24 Oct 2020
Posts: 175

PostPosted: Wed Feb 01, 2023 12:58    Post subject: Reply with quote
Thanks all for the precious advices ! I'll try what's suggested and post feedback here
Milax
DD-WRT User


Joined: 24 Oct 2020
Posts: 175

PostPosted: Wed Feb 01, 2023 14:06    Post subject: Reply with quote
Some feed-back after the execution of most of the suggested commands:





DMESG:
Code:
[   39.817842] usb 1-2: new high-speed USB device number 2 using xhci-mtk
[   39.929436] usb-storage 2-1:1.0: USB Mass Storage device detected
[   39.942457] scsi host0: usb-storage 2-1:1.0
[   39.951413] usbcore: registered new interface driver usb-storage
[   40.009833] usb-storage 1-2:1.0: USB Mass Storage device detected
[   40.024096] scsi host1: usb-storage 1-2:1.0
[   40.959132] scsi 0:0:0:0: Direct-Access     Seagate  Backup+  Desk M  0406 PQ: 0 ANSI: 6
[   40.977294] sd 0:0:0:0: [sda] 976754645 4096-byte logical blocks: (4.00 TB/3.64 TiB)
[   40.993849] sd 0:0:0:0: [sda] Write Protect is off
[   41.003575] sd 0:0:0:0: [sda] Mode Sense: 4f 00 00 00
[   41.004243] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   41.039115] scsi 1:0:0:0: Direct-Access     SanDisk  Ultra Fit        1.00 PQ: 0 ANSI: 6
[   41.057121] sd 1:0:0:0: [sdb] 30031250 512-byte logical blocks: (15.4 GB/14.3 GiB)
[   41.073986] sd 1:0:0:0: [sdb] Write Protect is off
[   41.083713] sd 1:0:0:0: [sdb] Mode Sense: 43 00 00 00
[   41.084409] sd 1:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   41.138580]  sdb: sdb1 sdb2
[   41.149583] sd 1:0:0:0: [sdb] Attached SCSI removable disk
[   41.301675]  sda: sda1 sda2
[   41.311203] sd 0:0:0:0: [sda] Attached SCSI disk
[   41.549116] ksmbd: kill command received
[   43.469983] EXT4-fs (sda2): Ignoring removed nobh option
[   43.498112] EXT4-fs (sda1): Ignoring removed nobh option
[   43.512137] EXT4-fs (sdb2): Ignoring removed nobh option
[   43.513761] EXT4-fs (sda2): barriers disabled
[   43.524421] EXT4-fs (sdb1): Ignoring removed nobh option
[   43.542646] EXT4-fs (sda1): barriers disabled
[   43.545736] EXT4-fs (sdb2): barriers disabled
[   43.613333] EXT4-fs (sdb1): barriers disabled
[   43.634248] EXT4-fs (sdb2): mounted filesystem with ordered data mode. Opts: init_itable=0,nobarrier,nobh,barrier=0
[   43.733222] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: init_itable=0,nobarrier,nobh,barrier=0
[   43.781764] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: init_itable=0,nobarrier,nobh,barrier=0
[   43.976064] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: init_itable=0,nobarrier,nobh,barrier=0
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2963
Location: Germany

PostPosted: Wed Feb 01, 2023 14:13    Post subject: Reply with quote
Quote:
ignoring check interval, broken_system_clock set


you can also disable this
this will not work since the router does not have a reliable system clock (this will be ignored)

Code:
tune2fs -i 0 /dev/sda1
tune2fs -i 0 /dev/sda2
Milax
DD-WRT User


Joined: 24 Oct 2020
Posts: 175

PostPosted: Wed Feb 01, 2023 17:31    Post subject: Reply with quote
ho1Aetoo wrote:
Quote:
ignoring check interval, broken_system_clock set


you can also disable this
this will not work since the router does not have a reliable system clock (this will be ignored)

Code:
tune2fs -i 0 /dev/sda1
tune2fs -i 0 /dev/sda2


Thanks, done.
Goto page Previous  1, 2, 3 Display posts from previous:    Page 3 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