Incorrect space reported on connecting to Qnap NAS
I'm using Expandrive to connect to a Qnap Turbostation NAS with openssh-sftp-server installed.
While I can connect ok, the Finder reports that the available disk space is 8TB. While I wish that it were so, the NAS only has 750GB installed. Otherwise, a very cool piece of software.
Steve
While I can connect ok, the Finder reports that the available disk space is 8TB. While I wish that it were so, the NAS only has 750GB installed. Otherwise, a very cool piece of software.
Steve
2
people have this problem
I have this problem, too!
Tell me when someone solves it.
The more people who report this problem, the more it gets noticed.
The more people who report this problem, the more it gets noticed.
The company marked this problem solved.
-
Inappropriate?The SFTP protocol version in use on most clients and servers doesn't support any operations that would allow us to determine free space. If the server allows shell access, we can run some commands over ssh to get that information, but in this case, the server must have shell access disabled. If that's not the case, I'd be interested to find out more about it. Anyway, when we can't get shell access to run our commands, we just return default values.
-
Inappropriate?Ok, thanks for the reply. The NAS does have ssh access - I use it all the time to manage it. What would you like to know about it?
-
Inappropriate?We need not only ssh access, but also the ability to run python on the remote machine in order to determine the free space available. While your NAS has ssh access, it's unlikely that it has python installed. We may be able to work around this in the future, but for now I’m afraid we can’t report free space on your NAS. Sorry.
-
Inappropriate?Does the df command work on your NAS? We currently run a python command,but we could configure ExpanDrive to attempt df as well, in which case we could return something like an accurate value for available space.
-
Inappropriate?Some updates for you.
(Matt) Yes, df does work on my NAS.
(Jon) It doesn't have Python installed by default, but through the wonders of ipkg it does now. However the free space is still reported as 8TB. Could there be a module that I'm missing? I have installed the default python-2.5 package (actually version 2.5.2).
-
Inappropriate?We must not be able to run the command we want to run, os.statfs, or it's returning values we don't understand. Can you login over ssh and run it yourself, then tell us what you see? The entire command, from the command line, is:
%% python -c "import os; print os.statvfs('.')"
Also try:
%% python -c "import os; print os.statvfs(os.path.expanduser('~'))"
and see if it returns anything different. -
Inappropriate?Both commands produced exactly the same output:
(1024, 1024, 9911L, 2855L, 2855L, 2560L, 1498L, 1498L, 0, 255) -
Inappropriate?My server runs Freebsd 5 and has python installed. Its reporting free space that's way off. Its returns for these python calls are as follows:
[GCC 3.4.2 [FreeBSD] 20040728] on freebsd5
>>> import os; print os.statvfs(os.path.expanduser('~'))
(16384, 2048, 126839L, 66371L, 56224L, 33022L, 23044L, 23044L, 0, 255)
>>> import os; print os.statvfs('.')
(16384, 2048, 17531282L, 4906458L, 3503956L, 4545534L, 4227105L, 4227105L, 0, 255)
Any tips on how this can be resolved?
I’m confident
-
Inappropriate?sdh:
This is very odd indeed. Are you logging into ExpanDrive with the same credentials as ssh? If that is what is returned by running that python command, I can't imagine what the problem is. If this is a still a big deal for you, we might have to do some one-on-one debugging.
bill:
It's extremely curious that those two commands return different values. The first one is the more relevant one, but did you change directory to something other than $HOME to run that command? Do you have your directory structure set up strangely?
The two free space values you would get from those python structures are 110MB and ~6.6GB, respectively. Which one is ExpanDrive showing? Or is it another value entirely? -
Inappropriate?Matt
Thanks for the reply. I've done a little more investigation, and I can see where the reported free space values are coming from for the different users, though I have no idea why they should be different.
The NAS is a QNAP TS-109. It has an embedded Linux system, but it is configured in such a way that Linux is somewhat incidental. The QNAP supplied sshd, for example, is crippled so that it will only allow the admin user to log in. It also stores a lot of its default configuration in flash and loads the system into RAM on rebooting, thus overwriting any changes one makes to the standard configuration. A recent QNAP firmware upgrade brought in support for Optware ipkg, thus allowing more permanent enhancements to the system to be made. I've used ipkg to install openssh and sftp-server.
Looking at the output of the df command, it appears that the free space as reported for a standard user is the free space on the largest, data partition (/dev/sda3) and is correct. currently 423.7G. Using Expandrive to connect as admin, though, (again to the optware ssh daemon, which has a default configuration) the free space is reported as only 2.8M, which is the free space on a different device (/dev/ram0). Expandrive also behaves like it should if there was only 2.8M free - a 3M file cannot be copied.
If I connect to the QNAP sshd as admin, which is the only user allowed to connect to this daemon, this is when I get 8TB of free space reported.
I'm happy to work with you to debug this on the optware ssh daemon. I could grant you access direct to my NAS box, and I'm happy to run any debugging scripts or try different builds of Expandrive. I don't think that it is worth pursuing the QNAP ssh daemon any more, though, on account that it is not a standard build of sshd. -
Inappropriate?I am just here to tell you that I also own a QNAP NAS server. I have the same issue :)
And I know the QNAP is very capable of all the basic bash commands out there, as I spend a lot of time in shell.
If you'd like, I can try run the python commands as well.
I’m confident
-
Inappropriate?TK can you run those python commands and email support@magnetk.com
We'll have to figure out exactly what's going on with its statvfs command, and make sure we're interpreting the results correctly -
Inappropriate?We wanted to take another crack at fixing this issue. To start, we'd love to extend the trial period of anyone willing to help. Please let us know if you're still interested!
-Jeff
-
Inappropriate?Hi Jeff
On my Qnap NAS, the latest version of Expandrive (1.3) now reports the correct free space (exactly the same as if I connect to it with SMB, for example). I'm now sure the problem was caused by the deliberately crippled ssh daemon that Qnap saw fit to install as the default. I used ipkg, which Qnap support, to install a new set of openssl libraries and sftp-server. Connecting to the NAS using this version of the ssh daemon Expandrive works perfectly.
Steve
I’m happy
1 person says
this solves the problem
Loading Profile...




EMPLOYEE


EMPLOYEE