Cockpit UI - Fileshare total incorrect

One of my fileshares (Movies) shows an incorrect size in the new UI:

[root@Nethserver ibay]# du -hs *
2.9T    Backup
34G     F1_Grand_Prix
104G    Gamerz
162G    iTunes
3.8G    Lotus_Stuff
5.1T    Movies
900G    Original_Movies
1.7T    TV_Shows
[root@Nethserver ibay]# find Movies/ -type f | wc -l
742
[root@Nethserver ibay]#

Cheers.

2 Likes

I can’t reproduce, but it should be relative to this code: https://github.com/NethServer/nethserver-samba/blob/master/api/lib/samba_functions.pl#L34

I think it’s a bug in duc indexing or in our xml parser.

Could you please post on a gist (or somewhere else) the out of:

  • /usr/bin/duc xml -x -d /var/cache/duc/duc.db /var/lib/nethserver/ibay
  • du -hs /var/lib/nethserver/ibay/*

Think I found the issue.

One of my fileshares is called Movies. However, there is a subdirectory inside one of the other fileshares also called Movies.

And guess what, that subdirectory has 56 (yep, the duc counts are off by 1) files in it and is around 1.4G. So when traversing the duc output, the data for the top level Movies is then overwritten by the data from the embedded subdirectory.

Cheers.

2 Likes

Thanks, I will try to reproduce!

I’ve tried to create subdirectories with the same name but I didn’t reproduce it.

Can you give me a list of commands to reproduce?

Not a list of commands, but (what I think is) the condition needed.

Run the duc command you posted earlier. Note which ibay is listed first, then make a sub-directory of exactly the same name in one of the subsequent ibays that appear later in the output. Preferably not the only/first sub-directory as I think the parser has to process a child end-tag in the second ibay before it processes the duplicate directory name.

The code attempts to limit the parsing to only the top level directory, but a sub-directory end-tag breaks that. (I think, if I’m reading it correctly).

Cheers.

1 Like

@filippo_carletti opened a new issue: https://github.com/NethServer/dev/issues/5802

1 Like