df and du commands hanging/very slow and not displaying all info

I have developed a Synology Package to move Packages from a volume to another. He suddenly became very slow when trying to display the list of Packages and Volumes existing on my NAS. I finally found that it was due to mount points not accessible and making the ‘df’ command not responsive.

Click to Read More

In my Package, named Package Mover (See Blog’s menu SPK Server), I am using the command ‘df’ to list the existing Volumes. This is the one that was extremely slow.

To investigate the problem, I did display the errors of the System Kernel with the command ‘dmesg’ and found plenty of messages like ”CIFS VFS: Unexpected lookup error -112″

I also noticed that when ‘df’ was finally displaying results, there was no information about the volume1.

As by accident, I remembered that I did use CIFS VFS to recently mount some shared drives of a remote Windows Server, I checked if there was any issue with those. And there was:

xxxx:~# ls -la /volume1/mount/Storage/
ls: cannot access /volume1/mount/Storage/Movies: Host is down
ls: cannot access /volume1/mount/Storage/Series TV: Host is down
ls: cannot access /volume1/mount/Storage/Series: Host is down

total 0
drwx——+ 1 admin users 42 Oct 15 19:00 .
d———+ 1 root root 42 Oct 14 11:56 ..
d?????????? ? ? ? ? ? Movies
d?????????? ? ? ? ? ? Series
d?????????? ? ? ? ? ? Series TV

I noticed how serious was this issue when my shell crashed while trying to autocomplete the name of a mounted folder:

umount /volume1/mount/Storage/^C
malloc: unknown:0: assertion botched
free: called with unallocated block argument
last command: ls /volume1/mount/
Aborting…Aborted (core dumped)

=> Shell killed !!

So, I did unmount and delete all the subfolders, and the problem disappeared

xxx:~# umount /volume1/mount/Storage/Movies
xxx:~# umount /volume1/mount/Storage/Series
xxx:~# umount /volume1/mount/Storage/Series\ TV
xxx:~# ls /volume1/mount/Storage/
Movies Series Series TV
xxx:~# rm -R /volume1/mount/Storage/Movies
xxx:~# rm -R /volume1/mount/Storage/Series
xxx:~# rm -R /volume1/mount/Storage/Series\ TV
xxx:~# ls /volume1/mount/Storage/

Now, ‘df’ executes within a ms and lists all the expected information!





Leave a Reply

Your email address will not be published. Required fields are marked *