LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-08-2009, 02:30 PM   #1
Saint Simian
LQ Newbie
 
Registered: Feb 2009
Posts: 3

Rep: Reputation: 0
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
 
Old 02-08-2009, 03:00 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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
 
Old 02-08-2009, 05:37 PM   #3
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
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..
 
Old 02-09-2009, 10:04 PM   #4
Saint Simian
LQ Newbie
 
Registered: Feb 2009
Posts: 3

Original Poster
Rep: Reputation: 0
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?
 
Old 02-11-2009, 07:12 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
It might be a problem with the NAS device itself.
 
Old 02-12-2009, 02:50 AM   #6
Saint Simian
LQ Newbie
 
Registered: Feb 2009
Posts: 3

Original Poster
Rep: Reputation: 0
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.
 
  


Reply


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
Help removing free space to create Raw free space nightmare55 Linux - Newbie 11 10-01-2009 04:07 AM
How to find SMB mounted folder? RileyTheWiley Linux - Newbie 5 01-28-2008 05:47 PM
How to assign non-contiguous free space to a filesystem fab_lab_99 Linux - Server 2 06-28-2007 12:54 PM
Not enough free space on hard drive with 50g of free space??? auoq SUSE / openSUSE 5 10-13-2004 09:21 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

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:55 PM.

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