LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Cannot detect free space in mounted SMB filesystem (https://www.linuxquestions.org/questions/linux-networking-3/cannot-detect-free-space-in-mounted-smb-filesystem-703163/)

Saint Simian 02-08-2009 01:30 PM

Cannot detect free space in mounted SMB filesystem
 
Hi all,

I recently got a network HD which makes itself available as a Samba share. I'm able to access the share (read and write) via the network just perfectly. But when I try to mount the share to the local filesystem, it seems the FS cannot read the amount of available space. I can read files just fine, but when I try moving something to the mounted share I get the error "There is not enough space on the destination." I can right-click on the mounted folder and see the space statistics - it thinks there's no space. I can confidently say there are hundreds of gigs of free space on this drive - it's just my OS doesn't seem to know it.

The really weird behaviour starts when I try to copy using the terminal. It can copy single files to the mounted share, but when it copies a directory it cannot borks. The directory gets created with owner "99" and my poor user account is denied permission to write there.

All this functionality - read, write, delete, etc., worked perfectly over the network. But as soon as it's mounted, it turns into an explosion in a spaghetti tree. Does anyone know how I can fix this?

Specs of my client computer:
Debian Lenny (kernel 2.6.28.4)
smbfs 3.2.5 (need this to supply mount.cifs)
smbclient 3.2.5

Mount command:
mount -t cifs -o credentials=/root/.smbcredentials //server/share /media/share

I've seen a couple of other complaints along these lines on the net, but none of them seem to perfectly match (or solve) my problem. I tried different kernel versions, different mount permissions, everything I can think of. If you can help me sort this out, please pipe up!

Thanks,
Simian

jschiwal 02-08-2009 02:00 PM

I have a maxtor external drive with an ethernet interface. I can use the `df' program to determine the amount of free space available.

Here are the options I use to mount the podcasts share:
Code:

//192.168.1.106/podcasts        /mnt/maxtor/podcasts    cifs    rw,user,_netdev,noauto,cred=/home/jschiwal/.credentials,uid=jschiwal,gid=jschiwal,file_mode=0117,dir_mode=0007,nls=utf8

irishbitte 02-08-2009 04:37 PM

The mistake you are making is mounting it as root. If you allow it to be mounted as your user, you will see all your problems disappear I think. It's mainly a permissions issue, in that only the user who mounts a samba or CIFS share can write to it. The 'df' command is a write command, which writes to the null file, and asks how much space there is in the mounted drive.

If it is a network drive, you can mount it in a similar fashion to Jschiwal, as posted above..

Saint Simian 02-09-2009 09:04 PM

Alas, it's a nice thought, but I've been over the permissions business. I've set the uid and gid as my user account - no dice. I set rw and all permissions 0777 - no dice. Just to confirm it's not a user permissions problem, I used my root account to do a df on the mounted system, and it reported 100% of the space was used. It reports 15 GB in use out of 15 GB, only it's a 500 GB drive.

Something is stopping cifs getting the correct amount of free space from the drive. I'm not sure whether this is a kernel/driver bug or a bug in smbfs. I've tried kernels 2.6.25, 2.6.26 and 2.6.28 without any difference. Does anyone know if this is an issue with the smbfs/cifs packages?

jschiwal 02-11-2009 06:12 AM

It might be a problem with the NAS device itself.

Saint Simian 02-12-2009 01:50 AM

I doubt it's a problem with the network drive. When I view it over the network all functions seem fine.

I've been hitting this for days and found I can save files to the mounted share from Firefox as well as several other programs. Not insignificant files either - I tried one that was 60 MB. If the space weren't there or the drive weren't allowing writing, then I would never have been able to save there.

So where does that leave me? A bug in the cifs implementation? I continue to have troubles copying files via GNOME and the terminal.


All times are GMT -5. The time now is 11:51 AM.