3XSSD Cache - Total Size Incorrect


Trites

Recommended Posts

Hello,

 

Sorry if this has been asked/answered before but I just setup an unRaid box. I have three SSDs (240GB) setup for cache. I figured I would get (360GB) usable space but its reporting that I only have 268GB. I've attached a photo for reference. When I click on Cache its showing that the btrfs filesystem df is:

Data, RAID1: total=81.00GiB, used=80.48GiB 
System, RAID1: total=32.00MiB, used=16.00KiB
Metadata, RAID1: total=1.00GiB, used=12.03MiB
GlobalReserve, single: total=16.00MiB, used=0.00B

If you need any more information. let me know.

 

Thanks.

Capture.PNG

Link to comment

Total size is correctly reported by df, but available is not, I did some quick testing with raid1 only and the issue seems limited to pools with an odd number of devices, you can still use all the space, but both total and free space are incorrectly reported on the GUI, the reported free and used spaces will get closer to real as the pool gets filled.

 

One possible issue is if you do a transfer from e.g. Windows where the total transfer size is below the actual free space but above the reported free space will get an out of space error.

 

Correct free space is reported by btrfs usage, if you run this you'll get it:

 

btrfs fi usage /mnt/cache

 

Don't know if it's possible for LT to display the GUI stats from that in the future.

Link to comment
2 hours ago, johnnie.black said:

Don't know if it's possible for LT to display the GUI stats from that in the future.

 

I have a cache pool of 4x 250GB devices, configured in raid10 mode.

# df --si /mnt/cache
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdn1       501G  132G  369G  27% /mnt/cache

# btrfs filesystem usage --si /mnt/cache
Overall:
    Device size:                            1.00TB
    Device allocated:                     268.57GB
    Device unallocated:                   731.67GB
    Device missing:                          0.00B
    Used:                                 265.97GB
    Free (estimated):                     366.36GB      (min: 366.36GB)
    Data ratio:                               2.00
    Metadata ratio:                           2.00
    Global reserve:                       101.32MB      (used: 0.00B)

Data,RAID10: Size:133.14GB, Used:132.62GB
   /dev/sdf1       33.28GB
   /dev/sdi1       33.28GB
   /dev/sdn1       33.28GB
   /dev/sdp1       33.28GB

Metadata,RAID10: Size:1.07GB, Used:366.15MB
   /dev/sdf1      268.43MB
   /dev/sdi1      268.43MB
   /dev/sdn1      268.43MB
   /dev/sdp1      268.43MB

System,RAID10: Size:67.11MB, Used:16.38kB
   /dev/sdf1       16.78MB
   /dev/sdi1       16.78MB
   /dev/sdn1       16.78MB
   /dev/sdp1       16.78MB

Unallocated:
   /dev/sdf1      216.49GB
   /dev/sdi1      216.49GB
   /dev/sdn1      216.49GB
   /dev/sdp1      216.49GB

Seems to me that df reports the correct size, while btrfs is not. Care to explain?

 

Link to comment
3 hours ago, bonienl said:

Seems to me that df reports the correct size, while btrfs is not. Care to explain?

 

It's correct on btrfs usage:

 

free space

3 hours ago, bonienl said:

Free (estimated): 366.36GB (min: 366.36GB)

df reports 369GB

 

used space you must divide by 2 since all data is duplicated:

3 hours ago, bonienl said:

Used: 265.97GB

 

So used it's about 133GB,  df reports 132GB

 

Small differences but close enough.

  • Upvote 1
Link to comment

Here are the results from btrfs

Overall:
    Device size:                 670.71GiB
    Device allocated:            204.06GiB
    Device unallocated:          466.65GiB
    Device missing:                  0.00B
    Used:                        183.63GiB
    Free (estimated):            242.52GiB      (min: 242.52GiB)
    Data ratio:                       2.00
    Metadata ratio:                   2.00
    Global reserve:               16.00MiB      (used: 0.00B)
Data,RAID1: Size:101.00GiB, Used:91.80GiB
   /dev/sdc1      68.00GiB
   /dev/sdh1      67.00GiB
   /dev/sdi1      67.00GiB
Metadata,RAID1: Size:1.00GiB, Used:17.19MiB
   /dev/sdc1       1.00GiB
   /dev/sdh1       1.00GiB
System,RAID1: Size:32.00MiB, Used:16.00KiB
   /dev/sdc1      32.00MiB
   /dev/sdh1      32.00MiB
Unallocated:
   /dev/sdc1     154.54GiB
   /dev/sdh1     155.54GiB
   /dev/sdi1     156.57GiB

I'm guessing everything is okay. Although I would have figured the Device size would be 720GB instead of 670.71GB

Link to comment
3 hours ago, Trites said:

I'm guessing everything is okay. Although I would have figured the Device size would be 720GB instead of 670.71GB

 

You're not paying attention to the units. GiB is not the same as GB.

 

https://en.wikipedia.org/wiki/Gibibit

 

1 gibibit = 230 bits = 1073741824bits

670.71 Gib = 720 169 378 775 bits

 

1 gigabit = 109bits = 1000000000bits.

720GB = 720 000000000 bits

 

 

 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.