Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

Samba disk space problem
Thank you for your donation

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Samba disk space problem
8th Jun, 2013, 09:59 PM
Post: #1
danell Offline
Registered
Posts: 37
Joined: Jun 2013
Reputation: 3
Samba disk space problem
Hi! I have a really irritating problem and I have looked for the solution for 2 days but without any success!

I have a 2TB external harddrive plugged into my Raspberry (xbian) and it works correct and so on, but when I'm trying to access it by samba to transfer files it only shows that I have 2,79gb left (of 3,59gb total) in media/usb and media/usb0
I'm using a 4gb sdhc card on the Raspberry so I'm guessing that's what's going wrong.
I have tried going trough WinSCP to transfer by ssh but the same problem there.
I tried downloading a 8gb movie from CouchPotato and that worked without any problems, so it's the Samba's problem now.
The drive is in Ext4 so the windows can't read it. I installed Ext2 Volume Manager to mount it in windows but the drive was write-protected. I tried a lot of chmod and chown but nothing worked.

DF shows
Code:
xbian@xbian ~ $ df
Filesystem      1K-blocks   Used  Available Use% Mounted on
rootfs            3774672 845332    2929340  23% /
/dev/mmcblk0p2    3774672 845332    2929340  23% /
tmpfs               38284    396      37888   2% /run
tmpfs                5120      0       5120   0% /run/lock
tmpfs               10240      0      10240   0% /dev
tmpfs               76560      0      76560   0% /run/shm
/dev/mmcblk0p1      34662  10973      23689  32% /boot
/dev/sda1      1922860816 200028 1824985068   1% /media/usb0

so it's there with the correct space!

Please help!
Find all posts by this user
Quote this message in a reply
9th Jun, 2013, 02:41 AM
Post: #2
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: Samba disk space problem
create a file named xbian-smb-free in /usr/local/bin, do a chmod +x on it. content as follows
Code:
#!/bin/sh
df $1 | tail -1 | awk '{print $2" "$4}'

edit smb.conf under /etc/samba and put this under [global] section
Code:
dfree command = /usr/local/bin/xbian-smb-free

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
9th Jun, 2013, 07:27 PM
Post: #3
danell Offline
Registered
Posts: 37
Joined: Jun 2013
Reputation: 3
RE: Samba disk space problem
It didn't work correctly. It stops after copying a while. Maybe it's something with my smb.conf file. Here it is:

Code:
    [global]
    workgroup = WORKGROUP
    usershare allow guests = yes
    security=share
    follow symlinks = yes
    wide links = yes
    unix extensions = no
    lock directory = /var/cache/samba
    dfree command = /usr/local/bin/xbian-smb-free

    [xbian]
    browsable = yes
    read only = no
    guest ok = yes
    path = /home/xbian
    force user = xbian

    [devices]
    browsable = yes
    read only = no
    guest ok = yes
    path = /media
    force user = root
Find all posts by this user
Quote this message in a reply
15th Jun, 2013, 11:48 AM
Post: #4
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: Samba disk space problem
- I don't know how this plays with "wide links", try to remove it from smb.conf (default is "no")
- is the /usr/local/bin/xbian-smb-free +x (executable bit set)? do a "ls -la /usr/local/bin/xbian-smb-free" and post here
- what is version of your samba package installed? do "apt-cache policy samba" (latest available is 3.6.6-6)

if all this is ok and you have still wrong "free space" readings, no idea.

update: ok, I see your problem. I now realized you are exporting /media, which includes all the usb devices mounted. this will not work. You have to share /media/usb0 something. Probably you exported /media because the always changing /media/usbX mount dir. but this can be solved by:

- installing xbian-package-usbmount package (part of beta1 release ) from git. with this your usb devices mountpoints should be static under /media
- checking if /var/run/usbmount exists. there should be a link (with static name) pointing to always the actual /media/usbX
- editing /etc/fstab by adding entry like:
Code:
UUID=xxxxx         /media/my_usb_disk        ext4               defaults,rw,noatime          0    0

where xxxx you can find by launching "blkid" from terminal. then the partition will always be mounted even with the old usbmount under the same directory.

mk

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Possibly Related Threads...
Thread: Author Replies Views: Last Post
Question [PROBLEM] Another Samba Problem wallacemckart 9 20,523 31st Dec, 2014 07:33 PM
Last Post: mk01
  Samba and Disk spin down halibut 2 8,604 12th Oct, 2014 04:01 AM
Last Post: halibut
  [SOLVED] Space in Samba share maybeme 2 9,219 17th Jul, 2014 02:28 AM
Last Post: IriDium
  [SOLVED] 100% disk space in use (even after deleting some files) josch 6 20,055 6th Jun, 2014 06:55 AM
Last Post: josch
  [PROBLEM] Samba - problem with mounting 2 partitions koper89 2 7,237 2nd Feb, 2014 04:03 AM
Last Post: koper89

  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 12th May, 2025, 04:58 AM Powered By MyBB, © 2002-2025 MyBB Group.