Page 1 of 1

SMB share not showing real size of External HDD

Posted: Sat Aug 04, 2012 10:55 pm
by denial86
Dear all,

I'm having issues with sharing my external hdd (1 TB, formatted Ext4 file system) over a samba server using Raspbian. I went through all the steps as described here: http://elinux.org/R-Pi_NAS All went well and I can access my external harddrive on two macbooks (one lion, one mountain lion) and share its media to another raspberry pi running raspbmc, so it is safe to say that all is well with the protocol itself.

However, the mounted volume shows only a size of 6.5 GB and I cannot write large files too it due to the size constrictions. However, all the smaller files that I write to it all work and show up in Raspbian to populate the harddrive. Needless to say that the harddrive shows the full 1 TB in Raspbian. I have a strong feeling that these 6.5 GB that are available on the samba share is in fact the size of the SD card (8GB, class 10, Kingston) where Raspbian runs on. How can I mend this issue? Is it a problem with the mount? I really followed the exact steps in the linked tutorial so that is all I can say about the setup process. Could it be an issue with the EXT4 file system and should I format it differently?

Thanks for the advises!

Re: SMB share not showing real size of External HDD

Posted: Sun Aug 05, 2012 7:41 am
by bredman
This may have been caused by the fact that instructions (for some bizarre reason) tell you to mount the HDD inside your home area. The standard practice is to mount drives at the / point.

Try the following
sudo umount /dev/sdxx
sudo mkdir /disk1
sudo mount /dev/sdxx /disk1

If this works for you, I will edit the wiki.

Re: SMB share not showing real size of External HDD

Posted: Sun Aug 05, 2012 8:29 am
by jojopi
When you share a directory tree that has mount points within it, it is normal for a free space report to be about the filesystem at the root of that tree only. This is only a cosmetic problem, and should not prevent writing. If it bothers you, then create a separate share for the root of each mounted disk.

Re: SMB share not showing real size of External HDD

Posted: Sun Aug 05, 2012 9:41 am
by denial86
bredman wrote:This may have been caused by the fact that instructions (for some bizarre reason) tell you to mount the HDD inside your home area. The standard practice is to mount drives at the / point.

Try the following
sudo umount /dev/sdxx
sudo mkdir /disk1
sudo mount /dev/sdxx /disk1

If this works for you, I will edit the wiki.
Thanks, I will try this and report back on my findings. Before I do, just one question, does this affect any of the other steps in the guide at all, or will all still be working after a samba restart?

Re: SMB share not showing real size of External HDD

Posted: Sun Aug 05, 2012 6:27 pm
by denial86
The instructions here worked a treat and my external harddrive is being served over the samba network as we speak. I ended up mounting the disk at /disk1 as suggested and changed the necessary line here:

[public]
comment = Public Storage
path = /disk1
valid users = @users
force group = users
create mask = 0660
directory mask = 0771
read only = no

By all means, go ahead and change the wiki if you like. Thanks very much for the explanation and assistance!

Re: SMB share not showing real size of External HDD

Posted: Mon Aug 06, 2012 10:09 am
by jojopi
There is nothing wrong with the instructions on the wiki, and it does not matter where the disk is mounted. The difference is that you are now sharing the mount-point itself, instead of its parent directory. The advantage of that is that the reported free space is for the correct drive. The disadvantage is that if you mount a disk2 or disk3 you need to share each one separately, instead of as one tree.

Re: SMB share not showing real size of External HDD

Posted: Thu Apr 18, 2013 8:21 pm
by Nate14
At least for me, it was not obvious that the text in [ ] needs to match the folder name. In order for me to mount this directory on Win8, I used this...

[disk1]
comment = Public Storage
path = /disk1
valid users = @users
force group = users
create mask = 0660
directory mask = 0771
read only = no

I am now able to map a network share as \\<ip>\disk1 .

Re: SMB share not showing real size of External HDD

Posted: Wed Dec 31, 2014 3:14 pm
by JQLeitch
Thanks for everyone's help on this post, I too have made a Raspberry Pi NAS and just upgraded the hard drive from 50GB to 2TB.

Re: SMB share not showing real size of External HDD

Posted: Tue Aug 25, 2015 5:42 am
by peewee44
This technique has overcome my problem of incorrect sizing being reported by Windows. Many thankss.

Can you explain how I mount two drives in light of the comment below?

"The disadvantage is that if you mount a disk2 or disk3 you need to share each one separately, instead of as one tree."

I don't seem to be able to do it properly.

Re: SMB share not showing real size of External HDD

Posted: Tue Aug 25, 2015 8:27 am
by peewee44
Reply to myself

Problem resolved.

cd /

Create mount directories for each disk eg Disk1 Disk2 at this directory level.

Modify
Samba shares configuration [Disk1] and [Disk2]

[Disk1]
comment = Raspberry Pi shares
path = /Disk1
valid users = @users
force group = users
create mask = 0660
directory mask = 0771
read only = no

((Same template for Disk2))

Modify fstab

UUID=?????insertyours?? /Disk1 auto uid=pi,gid=pi,noatime 0 0
UUID=?????insertyours?? /Disk2 auto uid=pi,gid=pi,noatime 0 0

Enjoy!