Forum

Full Version: Samba disk space problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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!
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
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
- 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
Reference URL's