[FIXED][SPLIT] Wrong HDD capacity reported

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


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

PostPosted: Mon Aug 01, 2022 17:31    Post subject: Reply with quote
There's this:

Windows 10 now lets you mount Linux ext4 filesystems in WSL 2

Or, you could just tell Mr. Gates' monopoly to stick it and migrate to Linux.

_________________
"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
Sponsor
FireStorm@
DD-WRT User


Joined: 12 Mar 2018
Posts: 88

PostPosted: Thu Aug 11, 2022 9:35    Post subject: Reply with quote
kernel-panic69 wrote:
There's this:

Windows 10 now lets you mount Linux ext4 filesystems in WSL 2

Or, you could just tell Mr. Gates' monopoly to stick it and migrate to Linux.


That's a progress, however, sometimes it is simply necessary to unplug the hdd and use it on a windows machine, without the need to do anything just plug and play. That's why I prefer NTFS. Sometimes I get a feeling we are going backwards instead of forward in terms of usability. Actually, I just want it as it used to be / work.
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Thu Aug 11, 2022 16:24    Post subject: Reply with quote
Perhaps you can then determine if repairing the filesystem suffices for your reported issue, you have been advised of it, if it does, you will need to find a way to run a repair script automatically on router boot.

Then there should be no problem.

If problem persists DD-WRT the only thing that it could do is perhaps handle this repair for you assuming the necessary module are available. Other than that these are all 3rd party developed components, and if any of those are determined to be at fault a bug report upstream is needed, however we have no such indication.

If its NTFS itself that cant handle power-failures or whatever its again not a DD-WRT issue, so idk what DD-WRT could do for you.

Like you said, it use to work, so its possible the issue is with a recent 3rd party component update, and if it is it, you need to find out if yes/no and report the issue upstream. That way on next component update the bug will be autofixed assuming it was patched upstream.

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
FireStorm@
DD-WRT User


Joined: 12 Mar 2018
Posts: 88

PostPosted: Sat Aug 13, 2022 11:32    Post subject: Reply with quote
Thx for your support.

However, how can i create such script? I am not a programmer.

Where can I report such bug?
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5660

PostPosted: Sat Aug 13, 2022 12:20    Post subject: Reply with quote
I provided links twice in this thread also a third time in a build thread. Wrong hdd capacity bug is ksmbd not dd-wrt.
Script is not programming. Without learning commands, or search, highly suggested to take advice of many others.

Use ext4, a native linux file system. Use a dedicated drive for the router. Do not unplug for other tasks usage or OS.

In Linux chkdsk command does not exist, Paragon has chkntfs not free, ntfsfix both are not replacement, equivalent.
Even if you do manage a script to fix NTFS partition(s) flagged as dirty then properly mount a ksmbd bug still exists.
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Sat Aug 13, 2022 12:37    Post subject: Reply with quote
@blkt Is it really ksmbd?

@FireStorm@ to determine if the DD-WRT interface USB Disk Info reports wrong size, then we known its not ksmbd but ntfs-3g or ntfs3 depending on router. Then we will have a better idea where you need to report bug.

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)


Last edited by the-joker on Sat Aug 13, 2022 12:38; edited 1 time in total
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5660

PostPosted: Sat Aug 13, 2022 12:37    Post subject: Reply with quote
https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1267845#1267844
blkt wrote:
egc wrote:
ksmbd update dealing with sector size? :
https://svn.dd-wrt.com/changeset/48606

Also see @Phil9992 reports from same Broadcom r48607 build thread.

https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1260710#1260704

The last known build to show correctly is r48567, thanks to @alkanbw.

https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1265054#1265015

https://github.com/cifsd-team/ksmbd-tools/issues
https://github.com/cifsd-team/ksmbd/issues

https://github.com/namjaejeon/ksmbd-tools/issues
https://github.com/namjaejeon/ksmbd/issues

https://github.com/cifsd-team/ksmbd-tools
https://github.com/cifsd-team/ksmbd

https://github.com/namjaejeon/ksmbd-tools
https://github.com/namjaejeon/ksmbd

https://svn.dd-wrt.com/log?rev=48607&stop_rev=48568

https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1233562#1233490

https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=332584&start=15

https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1268355#1268344
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Sat Aug 13, 2022 13:05    Post subject: Reply with quote
Well so report issue on ksmbd and refer to https://github.com/cifsd-team/ksmbd/commit/cca2e29823daf5d4d91c07c43117339865461f7d commit which changed how sector_size is handled
Quote:
Currently ksmbd is using ->f_bsize from vfs_statfs() as sector size.
If fat/exfat is a local share, ->f_bsize is a cluster size that is too
large to be used as a sector size. Sector sizes larger than 4K cause
problem occurs when mounting an iso file through windows client.

The error message can be obtained using Mount-DiskImage command,
the error is:
"Mount-DiskImage : The sector size of the physical disk on which the
virtual disk resides is not supported."

This patch reports fixed 4KB sector size if ->s_blocksize is bigger
than 4KB.

Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>


I just checked, my router RT-AC68U is running ntfs3 which does not include ntfsfix since that is part of ntfs-3g and if this is the case on yours, not even a chance to do any scripted solution to see if ntfs volume is clean/dirty and repair.

So in order to fix dirty NTFS volumes you need to do it on a Windows machine or Linux machine with ntfsfix.

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
kernel-panic69
DD-WRT Guru


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

PostPosted: Sat Aug 13, 2022 17:04    Post subject: Reply with quote
The public config file, if the ASRock G10 is using the generic ipq806x file says that it's using samba3:

https://svn.dd-wrt.com/browser/src/router/configs/ipq806x/.config_ipq806x#L60

But I'll take that with a grain of salt since all the configs are probably not completely sync'd 100% and because of kernel version in use - which is actually which kernel? Linux 4.9?

_________________
"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
FireStorm@
DD-WRT User


Joined: 12 Mar 2018
Posts: 88

PostPosted: Mon Aug 15, 2022 13:27    Post subject: Reply with quote
the-joker wrote:
@blkt Is it really ksmbd?

@FireStorm@ to determine if the DD-WRT interface USB Disk Info reports wrong size, then we known its not ksmbd but ntfs-3g or ntfs3 depending on router. Then we will have a better idea where you need to report bug.


dd-wrt shows the right size, but I get two information

--- /dev/sda
Block device, size 4.548 TiB (5000981078016 bytes)
DOS/MBR partition map
Partition 1: 582.2 GiB (625121148928 bytes, 1220939744 sectors from 256)
Type 0x07 (NTFS/HPFS)
First 896 KiB are blank
/dev/sda not mounted Unsupported Filesystem

--- /dev/sda1
Block device, size 4.548 TiB (5000969191424 bytes)
Windows BOOTMGR boot loader
NTFS file system
UUID XXXXXXXXXXXXXXXXXXXXXXXX
Volume size 4.548 TiB (5000969187328 bytes, 1220939743 sectors of 4 KiB)
/dev/sda1 mounted to /jffs
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Mon Aug 15, 2022 13:56    Post subject: Reply with quote
If you format a drive for NTFS in Windows, windows always makes more hidden partitions for EFI and Recovery etc.

That is what you probably see here, it should also show in Windows Drive management.

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
kernel-panic69
DD-WRT Guru


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

PostPosted: Mon Aug 15, 2022 15:01    Post subject: Reply with quote
You'd get that same information in a Linux desktop after plugging that drive in with the appropriate utilities as well as in the same Windows utilities as @egc stated. I guess we should petition the master wizard to not display the root physical drive partition information (sda) in the webUI?
_________________
"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
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Mon Aug 15, 2022 17:24    Post subject: Reply with quote
I have several NTFS formatted drives, I dont actually plug them into the router, but I will run a test to see how it shows up samba side.
_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2927
Location: Germany

PostPosted: Mon Aug 15, 2022 17:44    Post subject: Reply with quote
But /dev/sda so the entire disk should be shown because the master boot record or the GUID partition table is in this area.

FireStorm@ disk shows that the disk has a MBR - so I wonder how that fits with the 2TB limitation.

The hard disk should have a GPT
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Mon Aug 15, 2022 18:01    Post subject: Reply with quote
OK tested, So The size thing is real, my 500GB Drive shows up as 1.81TB thank you very much ksmbd for making my drive bigger. This happens only when share is mapped to a drive, but tbh I never saw any value in mapping samba shares to a drive letter, Im quite happy with the Networking folders Windows side, and if anything needs mounting I do it directly on the target applications like VLC.

Anyway HDD size bug is real via kmsbd so bug needs to be reported upstream. (Im looking at the op)

As for share NOT showing up on Android, I guess this depends on Android, app or user?

On my android File manager it shows up just fine on auto detect, VLC side, not so much even though all my other shares show up fine, but this is a VLC bug and its a long standing bug (I'm a beta tester), the trick is to add your share manually, and VLC side its an interesting way to do it, you need to add any share as a favorite and edit that share with correct IP blablabla and voilla.

Laptop side Linux OS, no issues, share available and visible and works, Can't test on SmartTV cause my TV doent pretend to be smart, it knows its just a TV and is very happy being just a TV and doesn't want to be smart either, Ill assume those last parts, I dont have conversations with the TV Wink.

Media Center side (KODI) running on my home grown custom rolled distro Linux based, Share appears just fine and is obviously working.

Only real issue is the HDD size when share is mapped to a letter, the rest, works and keeps working.

I dont particularly think the DD-WRT drive detection via ntfs3 is all that, but it works.

Attached is my basic test config.

Code:
~# mount
/dev/sda1 on /tmp/mnt/sda1 type ntfs3 (rw,noatime,nls=utf8,nodiratime)


There were some issues which I have corrected by fixing it directly connected to a Windows machine, but appears ntfs3 didn't like my umount /dev/sda1
Code:
 dmesg| grep sda1
[   44.776348]  sda: sda1
[ 2847.648862] Buffer I/O error on dev sda1, logical block 786436, lost async page write
[ 2847.657006] Buffer I/O error on dev sda1, logical block 786441, lost async page write
[ 2847.665149] Buffer I/O error on dev sda1, logical block 786442, lost async page write
[ 2847.673292] Buffer I/O error on dev sda1, logical block 786443, lost async page write
[ 2847.681445] Buffer I/O error on dev sda1, logical block 786444, lost async page write
[ 2847.689693] Buffer I/O error on dev sda1, logical block 786445, lost async page write
[ 2847.697867] Buffer I/O error on dev sda1, logical block 786446, lost async page write
[ 2847.697886] Buffer I/O error on dev sda1, logical block 786447, lost async page write
[ 2847.697900] Buffer I/O error on dev sda1, logical block 786449, lost async page write
[ 2847.697913] Buffer I/O error on dev sda1, logical block 786450, lost async page write
[ 2924.431369] Buffer I/O error on dev sda1, logical block 19342, lost async page write
[ 2924.439161] Buffer I/O error on dev sda1, logical block 19624, lost async page write
[ 2924.446918] Buffer I/O error on dev sda1, logical block 19627, lost async page write
[ 2924.454754] Buffer I/O error on dev sda1, logical block 19628, lost async page write
[ 2924.462622] Buffer I/O error on dev sda1, logical block 20600, lost async page write
[ 2924.470697] Buffer I/O error on dev sda1, logical block 2, lost async page write
[ 2924.478364] VFS: Dirty inode writeback failed for block device sda1 (err=-5).


Things to investigate?!
Code:
~# dmesg| grep ksmbd
[ 1622.085093] Out of memory in ksmbd_auth_ntlmv2:476
[ 1623.272589] Out of memory in ksmbd_auth_ntlmv2:476
[ 2846.932092] ksmbd: kill command received
[ 2849.903648] ksmbd: Server reset is in progress, can't start daemon
[ 2850.631429] ksmbd: sock_read failed: -108

Syslog
Code:
Aug 15 20:15:14 Nexus local5.err ksmbd: [ksmbd-worker/5170]: ERROR: Recv() error Invalid input data or parameter [-7]
Aug 15 20:15:14 Nexus local5.err ksmbd: [ksmbd-manager/5169]: ERROR: WARNING: child process exited abnormally: 5170
Aug 15 20:15:14 Nexus local5.err ksmbd: [ksmbd-manager/5169]: ERROR: Fatal IPC error. Terminating. Check dmesg.
Aug 15 20:15:14 Nexus local5.err ksmbd: [ksmbd-manager/5169]: ERROR: can't execute kill 5170: No such process
Aug 15 20:15:14 Nexus local5.info ksmbd: [ksmbd-manager/5169]: INFO: Exiting. Bye!

Aug 15 19:32:38 Nexus local5.err ksmbd: [ksmbd-manager/2763]: ERROR: Can't open `/tmp/ksmbd.subauth': No such file or directory
Aug 15 19:32:38 Nexus local5.info ksmbd: [ksmbd-worker/2764]: INFO: User already exists
Aug 15 19:33:11 Nexus local5.err ksmbd: [ksmbd-worker/2764]: ERROR: Unsupported share info level (write): 2
Aug 15 19:33:11 Nexus local5.err ksmbd: [ksmbd-worker/2764]: ERROR: Unsupported share info level (read): 2



Capture.PNG
 Description:
 Filesize:  22.02 KB
 Viewed:  1058 Time(s)

Capture.PNG



Capture.PNG
 Description:
 Filesize:  94.1 KB
 Viewed:  1115 Time(s)

Capture.PNG



_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
Goto page Previous  1, 2, 3, 4, 5, 6  Next Display posts from previous:    Page 3 of 6
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