Wrong free space on smb share

SMB, NFS, FTP, web file manager and Rsync server.
Locked
User avatar
realdvk
Posts: 16
Joined: 03 Jan 2024, 17:17
Russia

Wrong free space on smb share

Post by realdvk »

Hello!
Volume size is 7.91 TB and free space is 642 GB. There is 1 shared folder on this volume. Recycle bin is disabled. I mounted this shared folder on my ubuntu virtual machine as follows:

Code: Select all

//192.168.1.3/Collection /mnt/Collection cifs user=user_RW,password=p@ssw0rd,file_mode=0777,dir_mode=0777 0 0
The problem is that ubuntu shows the wrong amount of free space:

Code: Select all

root@ubuntu:/mnt/Collection# stat -f /mnt/Collection
  File: "/mnt/Collection"
    ID: 5a918d1300000000 Namelen: 255     Type: smb2
Block size: 1024       Fundamental block size: 1024
Blocks: Total: 8492111668 Free: 246510076  Available: 246510076
I tried to write 300 GB data there from my windows computer and its ok, but after that i had problems on ubuntu. I was unable to write data from ubuntu to this network share, although there was definitely still free space there.
I tried to mount this smb share on other ubuntu virtual machine and it was the same problem with free space calculations.
TOS veriosn is 5.1.103. Reboot does not help. I tried to increase volume size by 100 GB but it does not help. There is still 400 GB of missing space.
Please help me find the root cause and repair it.
T6-423: 4x4TB + 1x12TB + 1x250GB + 1x1TB
User avatar
TMeric
TM Product Manager
Posts: 227
Joined: 03 Jul 2023, 11:01

Re: Wrong free space on smb share

Post by TMeric »

Thank you for your feedback. We need to verify the issue you mentioned.
To contact our team, please send email to following addresses, remember to replace (at) with @:

Technical team: support(at)terra-master.com(for technical support)
Service team: service(at)terra-master.com(for purchasing, return, replacement, RMA service)
User avatar
realdvk
Posts: 16
Joined: 03 Jan 2024, 17:17
Russia

Re: Wrong free space on smb share

Post by realdvk »

Hello!
Some new info about this case. Just connected to my TNAS with SSH:

Code: Select all

df -h
/dev/mapper/vg3-lv6  8.0T  7.4T  133G  99% /Volume7
Wrong calculations! About 5% free space is missing.

Web interface gives different value:

Code: Select all

Free space 539 GB

Code: Select all

tune2fs -l /dev/mapper/vg3-lv6 | grep "Reserved block count"
Reserved block count:     106584226
 tune2fs -l /dev/mapper/vg3-lv6 | grep "Block size"
Block size:               4096
So, there is 5% reserved space for root.

I have 2 options:
1. Change "Reserved block count" via tune2fs command
2. Change "dfree" directive at /etc/samba/smb.conf to rewrite free space calculations

Is it safe to do option #1?
T6-423: 4x4TB + 1x12TB + 1x250GB + 1x1TB
User avatar
RyanYang
TM Support
Posts: 1141
Joined: 01 Dec 2020, 11:50
China

Re: Wrong free space on smb share

Post by RyanYang »

It is safe to execute option 1 in your current situation. In TOS6, we have already reduced this kind of usage to 1%.
As I understand it, option 2 only affects the available space information presented to clients by the Samba service and does not change the actual available disk space."
To contact our team, please send email to following addresses, remember to replace (at) with @
Technical team: support(at)terra-master.com (for technical support)
Service team: service(at)terra-master.com (for purchasing, return, replacement)
Locked

Return to “File Services”