Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 04-05-2006, 06:52 AM   #1
LQ Newbie
Registered: Jan 2006
Distribution: Slackware Linux
Posts: 21

Rep: Reputation: 15
sshfs reports invalid free space on remote machine

I'm mounting remote windows machine, via sshfs.
everything is fine, but when i try to get free space on remote machine (df -h)
it gives remote free space:
size: 7,5T (7999999992 bytes)
used: 0
free: 7,5T (7999999992 bytes)
this is not correct offcourse (remote hdd is 6.4 Gb.)
How can I obtain the real free space on remote machine using sshfs. I do not want to use samba. I want encrypted connection with public keys.

The remote machine have sshd version:
remote operating sysetem is windows 2000 SP4 with latest patches

Local ssh version is:
OpenSSH_4.3p1, OpenSSL 0.9.7g 11 Apr 2005

shfs --version gives:
SSHFS version 1.4
FUSE library version: 2.5.1
fusermount version: 2.5.1
using FUSE kernel interface version 7.5

my linux box is Slackware 10.2
kernel version is:
FUSE is compiled with the kernel

Trying to mount linux box gives the same strange result
I thing the problem is with fuse, or sshfs.

I hope somebody have the idea how to fix the problem
10x in advance and sorry for my bad english.

Last edited by +Yan; 04-05-2006 at 07:13 AM.
Old 04-06-2006, 04:27 PM   #2
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
That's a workaround, because the current free space is not available via sftp (the protocol used by sshfs). If the destination runs out of space you will get an error, but at least this way GUI applications continue to function. SSH's sftp will need to be enhanced to provide the available free space information before sshfs can report a correct value.
Old 04-10-2006, 06:37 AM   #3
LQ Newbie
Registered: Jan 2006
Distribution: Slackware Linux
Posts: 21

Original Poster
Rep: Reputation: 15
10x macemoneta, I found some workaround:

free_space=`ssh linux@$mashine 'cmd /c dir' | grep "bytes free" | grep "Dir(s)" | tr -s " " | cut -d ")" -f2 -s | cut -d " " -f 2 -s | tr -d \\\\000-\\\\057 | tr -d \\\\072-\\\\377`

This is not very scientific, but works for me
Hope it helps anybody too


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Not enough free space on hard drive with 50g of free space??? auoq SUSE / openSUSE 5 10-13-2004 09:21 PM
Samba: 70 Gb free space, samba reports no space left? HansLuijten Linux - Networking 1 08-18-2004 05:40 PM
Formating free space: WinXP pro and RH9 dualboot with free space on 3rd drive Vermicious Linux - General 2 03-22-2004 06:10 AM
How much free space do I have in my machine? Nosram Linux - General 1 02-08-2004 10:31 AM
Samba: Windows reports wrong free space avantman42 Linux - Networking 2 11-17-2003 10:48 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:04 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration