Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[6.3.5] User share reporting wrong free space (Solved)

Featured Replies

Hi everyone. I'm new at using unraid, and I'm still moving my files over.

 

I have a user share "Media" split across 2 disks (4TB + 3TB) using Fill-Up.

5a160d641b553_unraidmediashare.thumb.JPG.fd0ffdfef1fc885e4bbb6e59e4bf0e2d.JPG

 

5a160d9a8cdbb_unraiddisks.thumb.JPG.7397c5521ac959bced89ac1a5324dde3.JPG

 

Everything was working fine until now, meaning I didn't change anything.

But now my Media share in windows (multiple pcs) is not reporting the correct amount of free space and won't allow me to copy files over, when I should have something like 2.4TB free.

 

 

5a16104aacc43_unraidwindowsshare.JPG.c1676788da72f4f919fdbd43a7343f37.JPG

 

Thanks.

Post your diagnostics and the output of:


 

btrfs fi show /mnt/disk1

btrfs fi df /mnt/disk1

 

Same for disk2

 

 

 

 

  • Author

DISK 2

# btrfs fi show /mnt/disk2
Label: none  uuid: d682bf18-e46f-4489-b800-f6ea542b3cae
        Total devices 1 FS bytes used 3.64TiB
        devid    1 size 3.64TiB used 3.64TiB path /dev/md2

 

# btrfs fi df /mnt/disk2
Data, single: total=3.63TiB, used=3.63TiB
System, single: total=4.00MiB, used=416.00KiB
Metadata, single: total=5.01GiB, used=3.83GiB
GlobalReserve, single: total=512.00MiB, used=0.00B

DISK 3

# btrfs fi show /mnt/disk3
Label: none  uuid: 037b0908-4206-4eb4-91a7-8257edf83f7c
        Total devices 1 FS bytes used 498.62GiB
        devid    1 size 2.73TiB used 505.02GiB path /dev/md3

 

# btrfs fi df /mnt/disk3
Data, single: total=504.01GiB, used=498.12GiB
System, single: total=4.00MiB, used=80.00KiB
Metadata, single: total=1.01GiB, used=517.30MiB
GlobalReserve, single: total=512.00MiB, used=0.00B

coruscant-diagnostics-20171123-0503.zip

It's a strange issue that happened a few times before, still can't find the reason for it but the solution is easy, df for disk3 is reporting it as full, though it correctly reports only 500GB used:

 

Filesystem      Size  Used Avail Use% Mounted on
/dev/md3        2.8T  500G     0 100% /mnt/disk3

To fix it copy a large file locally from one disk to another, e.g., use midnight commander (mc) and copy a large file from /mnt/disk2 to /mnt/disk3, you should now be able to copy files from Windows and see the correct free size.

 

@limetechthis another strange btrfs issue that has come up a few times, don't know if you can do anything about it on your side.

  • Author

Thanks a lot! 
You were right, it immediately changed the free size after copying a 10GB file.

 

Now hopefully limetech can try to actually fix it.

  • RicaFett changed the title to [6.3.5] User share reporting wrong free space (Solved)
26 minutes ago, RicaFett said:

Now hopefully limetech can try to actually fix it.

Really don't know if it's an unRAID issue or a btrfs quirk, I did notice that when it does happen it usually stops at a round used number, like 500GB in you case, don't know if that's a clue.

2 hours ago, johnnie.black said:

Really don't know if it's an unRAID issue or a btrfs quirk, I did notice that when it does happen it usually stops at a round used number, like 500GB in you case, don't know if that's a clue.

 

Ahhh btrfs free space reporting.... I already have a headache...

 

Last time we investigated this, we came up with this algorithm which seems to work to reliably report used/free in the webGui:

 

stat -f /mnt/mdN  [single btrfs/xfs/reiserfs device]

or

stat -f /mnt/cache  [single or multi-device btrfs pool or single non-btrfs device]

 

That will give you Blocks, Free, and Available.

 

Here's what webGui does:

 

  if file system type is not btrfs then:

    report disk size = Blocks

    report disk free = Free

else if file system type is btrfs then:

    report disk size = Blocks - Free + Available

    report disk free = Available

 

This was gleened by looking at source code of the 'df' command which seemed to report that stuff correctly.

 

In looking at 'shfs', there is a "statfs" api call which is used by that 'stat' command, as well as by, e.g., samba to get file system statistics.  That code is not making our "adjustments"

3 minutes ago, limetech said:

Ahhh btrfs free space reporting.... I already have a headache...

lol

 

4 minutes ago, limetech said:

In looking at 'shfs', there is a "statfs" api call which is used by that 'stat' command, as well as by, e.g., samba to get file system statistics.  That code is not making our "adjustments"

 

Yeah, the GUI reports the free space correctly, the problem looks limited to how Samba reports it.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.