Saturday, 28 November 2015

Network Sharing - Samba, Linux and Macs

Just a quick one today. I've been having issues with my samba server here at home recently and I finally had to fix it today.

Problem:What was happening was my computers running Linux would be able to connect to the smb shares on my server and I have put my movie collection onto it that way. However my girlfriend's Mac could get onto the shares but could only paste small files. Nowhere near big enough for a movie.

What was happening is samba was sharing /media which has /media/part{1,2} in it which are both mounts to large hard drives that the movies are on. I have also set up the root partition to be very small and it has relatively little space left; which is fine because almost everything else is on other partitions.

When you tried to copy across a movie on the Mac it would say there was no space left on the device and it can't copy the files. When I turned on the status bar on finder I saw that no matter what folder I was in the space it was reporting free was small, about what df -h said was free on the server's root.

The solution? Share /media/part1 & /media/part2 separately so that the free space is reported correctly.

Why:It seems that samba only shares the free space for the root of the share. Unfortunately in this situation because there were partitions mounted within the share the free space was wrong. This wasn't an issue with my linux computers because they seem to just copy until an error is given, rather then testing for free space first. The problem with the Mac system is that because it seems to be testing to make sure it can copy first and it was seeing the incorrect size it just gave up at the beginning.

Sorry for the wordy post today. Hopefully this will help someone. Probably even me if I remember to look this up here.


No comments:

Post a Comment